summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fsck.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-09-19 16:20:38 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:27 -0400
commit9c37b63207e4257cf5a14a412c6b586ae47680be (patch)
tree6b2d05a32e6f9d65057f94edbb36820537269629 /fs/bcachefs/fsck.c
parent059e4134d26a3ada46dc29a849c8cfa5e0b7fd42 (diff)
bcachefs: Check for extents past eof correctly
bcachefs used to work mostly in terms of PAGE_SIZE, not block size at the vfs level - but that has since been fixed. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fsck.c')
-rw-r--r--fs/bcachefs/fsck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index e3738757b6a0..50a7d8c1faba 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -509,7 +509,7 @@ retry:
if (fsck_err_on(w.have_inode &&
!(w.inode.bi_flags & BCH_INODE_I_SIZE_DIRTY) &&
k.k->type != KEY_TYPE_reservation &&
- k.k->p.offset > round_up(w.inode.bi_size, PAGE_SIZE) >> 9, c,
+ k.k->p.offset > round_up(w.inode.bi_size, block_bytes(c)) >> 9, c,
"extent type %u offset %llu past end of inode %llu, i_size %llu",
k.k->type, k.k->p.offset, k.k->p.inode, w.inode.bi_size)) {
bch2_trans_unlock(&trans);