]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ubifs: Configure dentry operations at dentry-creation time
authorGabriel Krisman Bertazi <krisman@suse.de>
Wed, 21 Feb 2024 17:14:11 +0000 (12:14 -0500)
committerGabriel Krisman Bertazi <krisman@suse.de>
Tue, 27 Feb 2024 21:55:35 +0000 (16:55 -0500)
fscrypt now supports configuring dentry operations at dentry-creation
time through the preset sb->s_d_op, instead of at lookup time.
Enable this in ubifs, since the lookup-time mechanism is going away.

Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20240221171412.10710-10-krisman@suse.de
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
fs/ubifs/dir.c
fs/ubifs/super.c

index 3b13c648d4900efeca9f17f118f2dbd0c5e1e8be..51b9a10a9851c23f70674937229338131c62d87b 100644 (file)
@@ -205,7 +205,6 @@ static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry,
        dbg_gen("'%pd' in dir ino %lu", dentry, dir->i_ino);
 
        err = fscrypt_prepare_lookup(dir, dentry, &nm);
-       generic_set_encrypted_ci_d_ops(dentry);
        if (err == -ENOENT)
                return d_splice_alias(NULL, dentry);
        if (err)
index 09e270d6ed0258923ccc7680025fad26d1cac5c6..304646b03e9992b626e34c890ebe7218551a2599 100644 (file)
@@ -2239,6 +2239,7 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
                goto out_umount;
        }
 
+       generic_set_sb_d_ops(sb);
        sb->s_root = d_make_root(root);
        if (!sb->s_root) {
                err = -ENOMEM;