Whamcloud - gitweb
LU-506 kernel: FC15 - support dcache scalability changes.
[fs/lustre-release.git] / lustre / llite / file.c
index 5498217..109d3b9 100644 (file)
@@ -2356,13 +2356,8 @@ int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
                    do_lookup() -> ll_revalidate_it(). We cannot use d_drop
                    here to preserve get_cwd functionality on 2.6.
                    Bug 10503 */
-                if (!dentry->d_inode->i_nlink) {
-                        cfs_spin_lock(&ll_lookup_lock);
-                        spin_lock(&dcache_lock);
-                        ll_drop_dentry(dentry);
-                        spin_unlock(&dcache_lock);
-                        cfs_spin_unlock(&ll_lookup_lock);
-                }
+               if (!dentry->d_inode->i_nlink)
+                       d_lustre_invalidate(dentry);
 
                 ll_lookup_finish_locks(&oit, dentry);
         } else if (!ll_have_md_lock(dentry->d_inode, &ibits, LCK_MINMODE)) {
@@ -2523,7 +2518,7 @@ lustre_check_acl(struct inode *inode, int mask)
         int rc;
         ENTRY;
 
-#ifdef HAVE_GENERIC_PERMISSION_4ARGS
+#ifdef IPERM_FLAG_RCU
         if (flags & IPERM_FLAG_RCU)
                 return -ECHILD;
 #endif
@@ -2556,6 +2551,11 @@ int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd)
         int rc = 0;
         ENTRY;
 
+#ifdef IPERM_FLAG_RCU
+       if (flags & IPERM_FLAG_RCU)
+               return -ECHILD;
+#endif
+
        /* as root inode are NOT getting validated in lookup operation,
         * need to do it before permission check. */