From c76f648dad690b5156971d93dce318a78f2831fc Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Mon, 15 Aug 2011 22:45:37 -0400 Subject: [PATCH] Unionfs: support LOOKUP_RCU in ->d_revalidate Signed-off-by: Erez Zadok --- fs/unionfs/dentry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c index c0205a45bcc..1628dad9050 100644 --- a/fs/unionfs/dentry.c +++ b/fs/unionfs/dentry.c @@ -315,12 +315,15 @@ bool is_newer_lower(const struct dentry *dentry) } static int unionfs_d_revalidate(struct dentry *dentry, - struct nameidata *nd_unused) + struct nameidata *nd) { bool valid = true; int err = 1; /* 1 means valid for the VFS */ struct dentry *parent; + if (nd && nd->flags & LOOKUP_RCU) + return -ECHILD; + unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); -- 2.34.1