From: Erez Zadok Date: Tue, 16 Aug 2011 02:45:37 +0000 (-0400) Subject: Unionfs: support LOOKUP_RCU in ->d_revalidate X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=c76f648dad690b5156971d93dce318a78f2831fc;p=unionfs-2.6.39.y.git Unionfs: support LOOKUP_RCU in ->d_revalidate Signed-off-by: Erez Zadok --- 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);