Skip to content

Commit be2760a

Browse files
committed
f2fs: Configure dentry operations at dentry-creation time
This was already the case for case-insensitive before commit bb9cd91 ("fscrypt: Have filesystems handle their d_ops"), but it was changed to set at lookup-time to facilitate the integration with fscrypt. But it's a problem because dentries that don't get created through ->lookup() won't have any visibility of the operations. Since fscrypt now also supports configuring dentry operations at creation-time, do it for any encrypted and/or casefold volume, simplifying the implementation across these features. Reviewed-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20240221171412.10710-9-krisman@suse.de Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
1 parent 04aa5f4 commit be2760a

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

fs/f2fs/namei.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
531531
}
532532

533533
err = f2fs_prepare_lookup(dir, dentry, &fname);
534-
generic_set_encrypted_ci_d_ops(dentry);
535534
if (err == -ENOENT)
536535
goto out_splice;
537536
if (err)

fs/f2fs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4660,6 +4660,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
46604660
goto free_node_inode;
46614661
}
46624662

4663+
generic_set_sb_d_ops(sb);
46634664
sb->s_root = d_make_root(root); /* allocate root dentry */
46644665
if (!sb->s_root) {
46654666
err = -ENOMEM;

0 commit comments

Comments
 (0)