Wrapfs: use d_set_d_op
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 6 Sep 2011 04:10:31 +0000 (00:10 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 27 Dec 2016 19:04:56 +0000 (14:04 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/wrapfs/lookup.c
fs/wrapfs/main.c

index 594c16bd01f6186dc29c5e50ef474209bd9da40f..21820d9aaf8a5b03546dcd687ccc234d841d2661 100644 (file)
@@ -272,7 +272,7 @@ static struct dentry *__wrapfs_lookup(struct dentry *dentry, int flags,
        struct qstr this;
 
        /* must initialize dentry operations */
-       dentry->d_op = &wrapfs_dops;
+       d_set_d_op(dentry, &wrapfs_dops);
 
        if (IS_ROOT(dentry))
                goto out;
index 6281840432ce27b053f7b76e5d0b7498f702e61f..19fc074449251e6ee225bf502e4118eff42bce58 100644 (file)
@@ -30,7 +30,7 @@ static struct dentry *wrapfs_d_alloc_root(struct super_block *sb)
 
                ret = d_alloc(NULL, &name);
                if (ret) {
-                       ret->d_op = &wrapfs_dops;
+                       d_set_d_op(ret, &wrapfs_dops);
                        ret->d_sb = sb;
                        ret->d_parent = ret;
                }