Re: [PATCH v15 2/9] f2fs: Simplify the handling of cached insensitive names

From: Eric Biggers
Date: Tue Apr 02 2024 - 23:31:09 EST


On Tue, Apr 02, 2024 at 06:48:35PM +0300, Eugen Hristev wrote:
> diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
> index d0f24ccbd1ac..7e53abf6d216 100644
> --- a/fs/f2fs/recovery.c
> +++ b/fs/f2fs/recovery.c
> @@ -153,11 +153,8 @@ static int init_recovered_filename(const struct inode *dir,
> if (err)
> return err;
> f2fs_hash_filename(dir, fname);
> -#if IS_ENABLED(CONFIG_UNICODE)
> /* Case-sensitive match is fine for recovery */
> - kmem_cache_free(f2fs_cf_name_slab, fname->cf_name.name);
> - fname->cf_name.name = NULL;
> -#endif
> + f2fs_free_casefolded_name(fname);
> } else {
> f2fs_hash_filename(dir, fname);
> }

This change makes the declaration of f2fs_cf_name_slab in recovery.c
unnecessary. It can be removed.

- Eric