summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-03-17 03:31:15 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:28 +0300
commitf8494d253534d3c49e80a483b74469bbeb01367f (patch)
tree154f3aca6fea168471a7c6d0d7dd4758bb4c8e41 /fs/bcachefs/fs-io.c
parent062afcbae3b269a7d01cf5087df92d5bd8732012 (diff)
downloadlinux-f8494d253534d3c49e80a483b74469bbeb01367f.tar.xz
bcachefs: Convert some WARN_ONs to WARN_ON_ONCE
These warnings are symptomatic of something else going wrong, we don't want them spamming up the logs as that'll make it harder to find the real issue. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r--fs/bcachefs/fs-io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index 77a893260fd8..14550ac610c6 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -1247,7 +1247,7 @@ static void bch2_writepage_io_done(struct bch_write_op *op)
* racing with fallocate can cause us to add fewer sectors than
* expected - but we shouldn't add more sectors than expected:
*/
- WARN_ON(io->op.i_sectors_delta > 0);
+ WARN_ON_ONCE(io->op.i_sectors_delta > 0);
/*
* (error (due to going RO) halfway through a page can screw that up
@@ -1434,8 +1434,8 @@ do_io:
sectors << 9, offset << 9));
/* Check for writing past i_size: */
- WARN_ON((bio_end_sector(&w->io->op.wbio.bio) << 9) >
- round_up(i_size, block_bytes(c)));
+ WARN_ON_ONCE((bio_end_sector(&w->io->op.wbio.bio) << 9) >
+ round_up(i_size, block_bytes(c)));
w->io->op.res.sectors += reserved_sectors;
w->io->op.i_sectors_delta -= dirty_sectors;