mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 04:21:03 -04:00
bcachefs: Small fsck fix
The check_dirents pass handles transaction restarts at the toplevel - check_subdir_count() was incorrectly handling transaction restarts without returning -EINTR, meaning that the iterator pointing to the dirent being checked was left invalid. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
committed by
Kent Overstreet
parent
aa8982c3f2
commit
9e34316156
@@ -1316,8 +1316,9 @@ static int check_subdir_count(struct btree_trans *trans, struct inode_walker *w)
|
||||
if (i->inode.bi_nlink == i->count)
|
||||
continue;
|
||||
|
||||
count2 = lockrestart_do(trans,
|
||||
bch2_count_subdirs(trans, w->cur_inum, i->snapshot));
|
||||
count2 = bch2_count_subdirs(trans, w->cur_inum, i->snapshot);
|
||||
if (count2 < 0)
|
||||
return count2;
|
||||
|
||||
if (i->count != count2) {
|
||||
bch_err(c, "fsck counted subdirectories wrong: got %llu should be %llu",
|
||||
|
||||
Reference in New Issue
Block a user