From 5897505e67f542452b4f26b6eba949c71e3da7d5 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 16 Jul 2023 14:33:57 -0400 Subject: [PATCH] bcachefs: check_extents(): make sure to check i_sectors for last inode Signed-off-by: Kent Overstreet --- fs/bcachefs/fsck.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index bc769b3e932a..f0a760a1701d 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -1426,7 +1426,8 @@ int bch2_check_extents(struct bch_fs *c) BTREE_INSERT_LAZY_RW|BTREE_INSERT_NOFAIL, ({ bch2_disk_reservation_put(c, &res); check_extent(&trans, &iter, k, &w, &s, &extent_ends); - })); + })) ?: + check_i_sectors(&trans, &w); bch2_disk_reservation_put(c, &res); extent_ends_reset(&extent_ends);