From c8cacd0713dd6ca12866e040c7b835d9323bf4e3 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Mon, 4 Feb 2008 02:53:19 +0000 Subject: [PATCH] Branch b1_4 b=14714 i=scjody i=yangsheng Move __d_rehash to d_rehash_cond, __d_move to d_move_locked for other kernel patches. --- ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch | 8 ++++++-- ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch | 18 +++++++++++++----- .../kernel_patches/patches/iopen-2.6.22-vanilla.patch | 8 ++++++-- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch index 9193617..4b6b7be 100644 --- a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch +++ b/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch @@ -165,7 +165,7 @@ Index: linux-2.6.16.27-0.9/fs/ext3/iopen.c + security_d_instantiate(goal, inode); + __d_drop(dentry); + d_rehash_cond(dentry, 0); -+ __d_move(goal, dentry); ++ d_move_locked(goal, dentry); + spin_unlock(&dcache_lock); + iput(inode); + @@ -266,7 +266,7 @@ Index: linux-2.6.16.27-0.9/fs/ext3/iopen.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.16.27-0.9/fs/ext3/iopen.h 2007-06-29 08:24:49.000000000 +0200 -@@ -0,0 +1,15 @@ +@@ -0,0 +1,19 @@ +/* + * iopen.h + * @@ -282,6 +282,10 @@ Index: linux-2.6.16.27-0.9/fs/ext3/iopen.h +extern int ext3_iopen_get_inode(struct inode *inode); +extern struct dentry *iopen_connect_dentry(struct dentry *dentry, + struct inode *inode, int rehash); ++ ++#if !defined(HAVE_D_MOVE_LOCKED) && defined(HAVE___D_MOVE) ++#define d_move_locked(dentry, target) __d_move(dentry, target) ++#endif Index: linux-2.6.16.27-0.9/fs/ext3/inode.c =================================================================== --- linux-2.6.16.27-0.9.orig/fs/ext3/inode.c 2007-06-29 08:24:48.000000000 +0200 diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch index 1c5e900..7411c7b 100644 --- a/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch +++ b/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch @@ -151,7 +151,7 @@ Index: linux-stage/fs/ext3/iopen.c + list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ + dentry->d_inode = inode; + -+ __d_rehash(dentry, 0); /* d_rehash */ ++ d_rehash_cond(dentry, 0); + spin_unlock(&dcache_lock); + + return NULL; @@ -218,8 +218,8 @@ Index: linux-stage/fs/ext3/iopen.c + goal->d_flags &= ~DCACHE_DISCONNECTED; + security_d_instantiate(goal, inode); + __d_drop(dentry); -+ __d_rehash(dentry, 0); -+ __d_move(goal, dentry); ++ d_rehash_cond(dentry, 0); ++ d_move_locked(goal, dentry); + spin_unlock(&dcache_lock); + iput(inode); + @@ -231,7 +231,7 @@ Index: linux-stage/fs/ext3/iopen.c + dentry->d_inode = inode; +do_rehash: + if (rehash) -+ __d_rehash(dentry, 0); /* d_rehash */ ++ d_rehash_cond(dentry, 0); + spin_unlock(&dcache_lock); + + return NULL; @@ -320,7 +320,7 @@ Index: linux-stage/fs/ext3/iopen.h =================================================================== --- linux-stage.orig/fs/ext3/iopen.h 2005-02-25 14:41:01.017787968 +0200 +++ linux-stage/fs/ext3/iopen.h 2005-02-25 14:41:01.045783712 +0200 -@@ -0,0 +1,15 @@ +@@ -0,0 +1,23 @@ +/* + * iopen.h + * @@ -336,6 +336,14 @@ Index: linux-stage/fs/ext3/iopen.h +extern int ext3_iopen_get_inode(struct inode *inode); +extern struct dentry *iopen_connect_dentry(struct dentry *dentry, + struct inode *inode, int rehash); ++ ++#if !defined(HAVE_D_REHASH_COND) && defined(HAVE___D_REHASH) ++#define d_rehash_cond(dentry, lock) __d_rehash(dentry, lock) ++#endif ++ ++#if !defined(HAVE_D_MOVE_LOCKED) && defined(HAVE___D_MOVE) ++#define d_move_locked(dentry, target) __d_move(dentry, target) ++#endif Index: linux-stage/fs/ext3/namei.c =================================================================== --- linux-stage.orig/fs/ext3/namei.c 2005-02-25 14:37:28.975023368 +0200 diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6.22-vanilla.patch b/ldiskfs/kernel_patches/patches/iopen-2.6.22-vanilla.patch index ce80837..28ccd9a 100644 --- a/ldiskfs/kernel_patches/patches/iopen-2.6.22-vanilla.patch +++ b/ldiskfs/kernel_patches/patches/iopen-2.6.22-vanilla.patch @@ -165,7 +165,7 @@ Index: linux-2.6.16.27-0.9/fs/ext3/iopen.c + security_d_instantiate(goal, inode); + __d_drop(dentry); + d_rehash_cond(dentry, 0); -+ __d_move(goal, dentry); ++ d_move_locked(goal, dentry); + spin_unlock(&dcache_lock); + iput(inode); + @@ -263,7 +263,7 @@ Index: linux-2.6.16.27-0.9/fs/ext3/iopen.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.16.27-0.9/fs/ext3/iopen.h 2007-06-29 08:24:49.000000000 +0200 -@@ -0,0 +1,15 @@ +@@ -0,0 +1,19 @@ +/* + * iopen.h + * @@ -279,6 +279,10 @@ Index: linux-2.6.16.27-0.9/fs/ext3/iopen.h +extern int ext3_iopen_get_inode(struct inode *inode); +extern struct dentry *iopen_connect_dentry(struct dentry *dentry, + struct inode *inode, int rehash); ++ ++#if !defined(HAVE_D_MOVE_LOCKED) && defined(HAVE___D_MOVE) ++#define d_move_locked(dentry, target) __d_move(dentry, target) ++#endif Index: linux-2.6.16.27-0.9/fs/ext3/inode.c =================================================================== --- linux-2.6.16.27-0.9.orig/fs/ext3/inode.c 2007-06-29 08:24:48.000000000 +0200 -- 1.8.3.1