Unionfs: use d_set_d_op
authorErez Zadok <ezk@cs.sunysb.edu>
Sat, 13 Aug 2011 19:03:52 +0000 (15:03 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sat, 13 Aug 2011 19:03:52 +0000 (15:03 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/lookup.c
fs/unionfs/main.c

index 3cbde56a48e91e2aca4d2191472061eb187d2f13..6633803c04dae2c9bd7318602928c78417eb393d 100644 (file)
@@ -311,7 +311,7 @@ struct dentry *unionfs_lookup_full(struct dentry *dentry,
        verify_locked(parent);
 
        /* must initialize dentry operations */
-       dentry->d_op = &unionfs_dops;
+       d_set_d_op(dentry, &unionfs_dops);
 
        /* We never partial lookup the root directory. */
        if (IS_ROOT(dentry))
index 1a435712135a2b84fafe3904d9fdd9bc32ea6d66..d1d6126d2bc8c795a9e288dad48b685611d9a65d 100644 (file)
@@ -145,7 +145,7 @@ skip:
                         * properly.  Finally we must return this new
                         * dentry.
                         */
-                       spliced->d_op = &unionfs_dops;
+                       d_set_d_op(spliced, &unionfs_dops);
                        spliced->d_fsdata = dentry->d_fsdata;
                        dentry->d_fsdata = NULL;
                        dentry = spliced;
@@ -543,7 +543,7 @@ static struct dentry *unionfs_d_alloc_root(struct super_block *sb)
 
                ret = d_alloc(NULL, &name);
                if (likely(ret)) {
-                       ret->d_op = &unionfs_dops;
+                       d_set_d_op(ret, &unionfs_dops);
                        ret->d_sb = sb;
                        ret->d_parent = ret;
                }