Commit 80fe580c authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix a spurious warning

Fixes fstests generic/648
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 353448f3
......@@ -1428,7 +1428,8 @@ static int __bch2_writepage(struct folio *folio,
/* 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment