Whamcloud - gitweb
LU-506 dcache: check lookup_instantiate_filp() return value
[fs/lustre-release.git] / lustre / llite / dcache.c
index 830eca1..45543de 100644 (file)
@@ -676,21 +676,12 @@ int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
                                                (struct ptlrpc_request *)
                                                   it->d.lustre.it_data);
                         } else {
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
-/* 2.6.1[456] have a bug in open_namei() that forgets to check
- * nd->intent.open.file for error, so we need to return it as lookup's result
- * instead */
-                                struct file *filp;
-
-                                nd->intent.open.file->private_data = it;
-                                filp = lookup_instantiate_filp(nd, dentry,NULL);
-                                if (IS_ERR(filp)) {
-                                        rc = PTR_ERR(filp);
-                                }
-#else
-                                nd->intent.open.file->private_data = it;
-                                (void)lookup_instantiate_filp(nd, dentry,NULL);
-#endif
+                               struct file *filp;
+
+                               nd->intent.open.file->private_data = it;
+                               filp = lookup_instantiate_filp(nd, dentry,NULL);
+                               if (IS_ERR(filp))
+                                       rc = PTR_ERR(filp);
                         }
                 }
                 if (!rc && (nd->flags & LOOKUP_CREATE) &&