On Sat, Feb 22, 2025 at 09:24:12AM +0800, Hongbo Li wrote:
> Checking the i_size of the last directory entry when fsck.
> 
> Fixes: b9ddb3e1a8aa ("bcachefs: Fix fsck directory i_size checking")
> Signed-off-by: Hongbo Li <[email protected]>

Applied

> ---
>  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 9bf316e7b845..a9480bb308b2 100644
> --- a/fs/bcachefs/fsck.c
> +++ b/fs/bcachefs/fsck.c
> @@ -2470,7 +2470,8 @@ int bch2_check_dirents(struct bch_fs *c)
>                               POS(BCACHEFS_ROOT_INO, 0),
>                               BTREE_ITER_prefetch|BTREE_ITER_all_snapshots, k,
>                       check_dirent(trans, &iter, k, &hash_info, &dir, 
> &target, &s)) ?:
> -             check_subdir_count_notnested(trans, &dir));
> +             check_subdir_count_notnested(trans, &dir) ?:
> +             check_dir_i_size_notnested(trans, &dir));
>  
>       snapshots_seen_exit(&s);
>       inode_walker_exit(&dir);
> -- 
> 2.33.0
> 

Reply via email to