From: Erez Zadok Date: Tue, 6 Sep 2011 04:59:42 +0000 (-0400) Subject: Unionfs: support LOOKUP_RCU in ->d_revalidate X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=45af59160438ab41798b9dc47a95df71d4b13ed2;p=unionfs-3.17.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 c0205a45bcc6..1628dad90500 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);