From: Kent Overstreet Date: Mon, 24 Oct 2022 19:10:14 +0000 (-0400) Subject: bcachefs: Fix a spurious warning X-Git-Tag: io_uring-6.7-2023-11-10~119^2~684 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=80fe580c8db02059d833d2ded6143e90641184ab;p=linux-block.git bcachefs: Fix a spurious warning Fixes fstests generic/648 Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 49b0fb6522e7..9e9ada8f007a 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -1428,7 +1428,8 @@ do_io: /* Check for writing past i_size: */ WARN_ON_ONCE((bio_end_sector(&w->io->op.wbio.bio) << 9) > - round_up(i_size, block_bytes(c))); + round_up(i_size, block_bytes(c)) && + !test_bit(BCH_FS_EMERGENCY_RO, &c->flags)); w->io->op.res.sectors += reserved_sectors; w->io->op.i_sectors_delta -= dirty_sectors;