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 03:11:34 +0000 (22:11 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/wrapfs/lookup.c
fs/wrapfs/main.c

index 7fca6dfcf32581dd55bb0a6b18d1c7d9365c55e8..570481eb00b04dcdd87f955d7a46e6fea8ff3eb5 100644 (file)
@@ -205,7 +205,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;
                }