From fb84569ffbd91bf1280c2cbdb8ea056d8b197061 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Mon, 15 Aug 2011 22:45:05 -0400 Subject: [PATCH] Unionfs: use d_set_d_op Signed-off-by: Erez Zadok --- fs/unionfs/lookup.c | 3 ++- fs/unionfs/main.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c index 3cbde56a48e..9040394adec 100644 --- a/fs/unionfs/lookup.c +++ b/fs/unionfs/lookup.c @@ -311,7 +311,8 @@ struct dentry *unionfs_lookup_full(struct dentry *dentry, verify_locked(parent); /* must initialize dentry operations */ - dentry->d_op = &unionfs_dops; + if (lookupmode == INTERPOSE_LOOKUP) + d_set_d_op(dentry, &unionfs_dops); /* We never partial lookup the root directory. */ if (IS_ROOT(dentry)) diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c index fa52f611789..f4bcd894986 100644 --- a/fs/unionfs/main.c +++ b/fs/unionfs/main.c @@ -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; } -- 2.34.1