Whamcloud - gitweb
Branch b1_8_gate
authoryangsheng <yangsheng>
Tue, 11 Nov 2008 07:43:42 +0000 (07:43 +0000)
committeryangsheng <yangsheng>
Tue, 11 Nov 2008 07:43:42 +0000 (07:43 +0000)
b=17153
i=adilger, robert.read

Remove 2.4 check.
Author: tappro
CVSooi=<inspected_by>

lustre/llite/dcache.c

index 5ca9760..fb7235a 100644 (file)
@@ -234,14 +234,6 @@ int ll_drop_dentry(struct dentry *dentry)
                  * sys_getcwd() could return -ENOENT -bzzz */
 #ifdef DCACHE_LUSTRE_INVALID
                 dentry->d_flags |= DCACHE_LUSTRE_INVALID;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-                __d_drop(dentry);
-                if (dentry->d_inode) {
-                        /* Put positive dentries to orphan list */
-                        list_add(&dentry->d_hash,
-                                 &ll_i2sbi(dentry->d_inode)->ll_orphan_dentry_list);
-                }
-#endif
 #else
                 if (!dentry->d_inode || !S_ISDIR(dentry->d_inode->i_mode))
                         __d_drop(dentry);
@@ -332,21 +324,17 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry)
 
         /* drop lookup or getattr locks immediately */
         if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR) {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
                 /* on 2.6 there are situation when several lookups and
                  * revalidations may be requested during single operation.
                  * therefore, we don't release intent here -bzzz */
                 ll_intent_drop_lock(it);
-#else
-                ll_intent_release(it);
-#endif
         }
 }
 
 void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft)
 {
         struct lookup_intent *it = *itp;
-#if defined(HAVE_VFS_INTENT_PATCHES)&&(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+#ifdef HAVE_VFS_INTENT_PATCHES
         if (it) {
                 LASSERTF(it->it_magic == INTENT_MAGIC, "bad intent magic: %x\n",
                          it->it_magic);
@@ -677,7 +665,6 @@ out_sa:
         return;
 }
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 #ifdef HAVE_VFS_INTENT_PATCHES
 static int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
 {
@@ -761,14 +748,9 @@ out_it:
         RETURN(rc);
 }
 #endif
-#endif
 
 struct dentry_operations ll_d_ops = {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
         .d_revalidate = ll_revalidate_nd,
-#else
-        .d_revalidate_it = ll_revalidate_it,
-#endif
         .d_release = ll_release,
         .d_delete = ll_ddelete,
 #ifdef DCACHE_LUSTRE_INVALID