Unionfs: support LOOKUP_RCU in ->d_revalidate
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 16 Aug 2011 02:45:37 +0000 (22:45 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 16 Aug 2011 02:45:37 +0000 (22:45 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/dentry.c

index c0205a45bcc62ecc744a027c05430c2e5bc70fac..1628dad90500832d41c83c38b33dc4cb6584edd9 100644 (file)
@@ -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);