mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
bcachefs: Drop racy warning
Checking for writing past i_size after unlocking the folio and clearing the dirty bit is racy, and we already check it at the start. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
0475c7639e
commit
6542afe299
|
|
@ -625,15 +625,6 @@ static int __bch2_writepage(struct folio *folio,
|
|||
BUG_ON(!bio_add_folio(&w->io->op.wbio.bio, folio,
|
||||
sectors << 9, offset << 9));
|
||||
|
||||
/* Check for writing past i_size: */
|
||||
WARN_ONCE((bio_end_sector(&w->io->op.wbio.bio) << 9) >
|
||||
round_up(i_size, block_bytes(c)) &&
|
||||
!test_bit(BCH_FS_emergency_ro, &c->flags),
|
||||
"writing past i_size: %llu > %llu (unrounded %llu)\n",
|
||||
bio_end_sector(&w->io->op.wbio.bio) << 9,
|
||||
round_up(i_size, block_bytes(c)),
|
||||
i_size);
|
||||
|
||||
w->io->op.res.sectors += reserved_sectors;
|
||||
w->io->op.i_sectors_delta -= dirty_sectors;
|
||||
w->io->op.new_i_size = i_size;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user