From 3ca70f1bfb7d833ff8e18e6a1590697ee1bb9d26 Mon Sep 17 00:00:00 2001 From: johann Date: Tue, 31 Jul 2007 06:40:15 +0000 Subject: [PATCH] Branch b1_6 b=10636 i=alex i=adilger attachment 11376 / use d_rehash_cond() and __d_move() in iopen-2.6-fc5.patch --- ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch index 6bbcec5..9193617 100644 --- a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch +++ b/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.16.i686/fs/ext3/iopen.c +Index: linux-2.6.16.27-0.9/fs/ext3/iopen.c =================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/iopen.c 2006-05-31 04:14:15.752410384 +0800 -+++ linux-2.6.16.i686/fs/ext3/iopen.c 2006-05-30 22:52:38.000000000 +0800 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.16.27-0.9/fs/ext3/iopen.c 2007-06-29 08:33:12.000000000 +0200 @@ -0,0 +1,259 @@ +/* + * linux/fs/ext3/iopen.c @@ -115,9 +115,9 @@ Index: linux-2.6.16.i686/fs/ext3/iopen.c + /* d_add(), but don't drop dcache_lock before adding dentry to inode */ + list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ + dentry->d_inode = inode; -+ spin_unlock(&dcache_lock); + -+ d_rehash(dentry); ++ d_rehash_cond(dentry, 0); /* d_rehash */ ++ spin_unlock(&dcache_lock); + + return NULL; +} @@ -164,9 +164,9 @@ Index: linux-2.6.16.i686/fs/ext3/iopen.c + goal->d_flags &= ~DCACHE_DISCONNECTED; + security_d_instantiate(goal, inode); + __d_drop(dentry); ++ d_rehash_cond(dentry, 0); ++ __d_move(goal, dentry); + spin_unlock(&dcache_lock); -+ d_rehash(dentry); -+ d_move(goal, dentry); + iput(inode); + + return goal; @@ -176,9 +176,9 @@ Index: linux-2.6.16.i686/fs/ext3/iopen.c + list_add(&dentry->d_alias, &inode->i_dentry); /* d_instantiate */ + dentry->d_inode = inode; +do_rehash: -+ spin_unlock(&dcache_lock); + if (rehash) -+ d_rehash(dentry); ++ d_rehash_cond(dentry, 0); /* d_rehash */ ++ spin_unlock(&dcache_lock); + + return NULL; +} @@ -262,10 +262,10 @@ Index: linux-2.6.16.i686/fs/ext3/iopen.c + + return 1; +} -Index: linux-2.6.16.i686/fs/ext3/iopen.h +Index: linux-2.6.16.27-0.9/fs/ext3/iopen.h =================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/iopen.h 2006-05-31 04:14:15.752410384 +0800 -+++ linux-2.6.16.i686/fs/ext3/iopen.h 2006-05-30 22:52:38.000000000 +0800 +--- /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 @@ +/* + * iopen.h @@ -282,10 +282,10 @@ Index: linux-2.6.16.i686/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); -Index: linux-2.6.16.i686/fs/ext3/inode.c +Index: linux-2.6.16.27-0.9/fs/ext3/inode.c =================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/inode.c 2006-05-30 22:52:03.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/inode.c 2006-05-30 22:52:38.000000000 +0800 +--- linux-2.6.16.27-0.9.orig/fs/ext3/inode.c 2007-06-29 08:24:48.000000000 +0200 ++++ linux-2.6.16.27-0.9/fs/ext3/inode.c 2007-06-29 08:24:52.000000000 +0200 @@ -37,6 +37,7 @@ #include #include @@ -294,7 +294,7 @@ Index: linux-2.6.16.i686/fs/ext3/inode.c #include "acl.h" static int ext3_writepage_trans_blocks(struct inode *inode); -@@ -2448,6 +2449,8 @@ +@@ -2448,6 +2449,8 @@ void ext3_read_inode(struct inode * inod ei->i_default_acl = EXT3_ACL_NOT_CACHED; #endif ei->i_block_alloc_info = NULL; @@ -303,11 +303,11 @@ Index: linux-2.6.16.i686/fs/ext3/inode.c if (__ext3_get_inode_loc(inode, &iloc, 0)) goto bad_inode; -Index: linux-2.6.16.i686/fs/ext3/super.c +Index: linux-2.6.16.27-0.9/fs/ext3/super.c =================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/super.c 2006-05-30 22:52:03.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/super.c 2006-05-30 22:52:38.000000000 +0800 -@@ -634,6 +634,7 @@ +--- linux-2.6.16.27-0.9.orig/fs/ext3/super.c 2007-06-29 08:24:48.000000000 +0200 ++++ linux-2.6.16.27-0.9/fs/ext3/super.c 2007-06-29 08:24:52.000000000 +0200 +@@ -678,6 +678,7 @@ enum { Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, @@ -315,7 +315,7 @@ Index: linux-2.6.16.i686/fs/ext3/super.c Opt_grpquota }; -@@ -682,6 +683,9 @@ +@@ -726,6 +727,9 @@ static match_table_t tokens = { {Opt_noquota, "noquota"}, {Opt_quota, "quota"}, {Opt_usrquota, "usrquota"}, @@ -325,7 +325,7 @@ Index: linux-2.6.16.i686/fs/ext3/super.c {Opt_barrier, "barrier=%u"}, {Opt_err, NULL}, {Opt_resize, "resize"}, -@@ -996,6 +1000,18 @@ +@@ -1040,6 +1044,18 @@ clear_qf_name: else clear_opt(sbi->s_mount_opt, BARRIER); break; @@ -344,10 +344,10 @@ Index: linux-2.6.16.i686/fs/ext3/super.c case Opt_ignore: break; case Opt_resize: -Index: linux-2.6.16.i686/fs/ext3/namei.c +Index: linux-2.6.16.27-0.9/fs/ext3/namei.c =================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/namei.c 2006-05-30 22:52:00.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/namei.c 2006-05-30 22:55:19.000000000 +0800 +--- linux-2.6.16.27-0.9.orig/fs/ext3/namei.c 2007-06-29 08:24:47.000000000 +0200 ++++ linux-2.6.16.27-0.9/fs/ext3/namei.c 2007-06-29 08:24:49.000000000 +0200 @@ -39,6 +39,7 @@ #include "namei.h" @@ -356,7 +356,7 @@ Index: linux-2.6.16.i686/fs/ext3/namei.c #include "acl.h" /* -@@ -995,6 +996,9 @@ +@@ -1004,6 +1005,9 @@ static struct dentry *ext3_lookup(struct if (dentry->d_name.len > EXT3_NAME_LEN) return ERR_PTR(-ENAMETOOLONG); @@ -366,7 +366,7 @@ Index: linux-2.6.16.i686/fs/ext3/namei.c bh = ext3_find_entry(dentry, &de); inode = NULL; if (bh) { -@@ -1005,7 +1009,7 @@ +@@ -1014,7 +1018,7 @@ static struct dentry *ext3_lookup(struct if (!inode) return ERR_PTR(-EACCES); } @@ -375,7 +375,7 @@ Index: linux-2.6.16.i686/fs/ext3/namei.c } -@@ -2046,10 +2050,6 @@ +@@ -2058,10 +2062,6 @@ static int ext3_rmdir (struct inode * di inode->i_nlink); inode->i_version++; inode->i_nlink = 0; @@ -386,7 +386,7 @@ Index: linux-2.6.16.i686/fs/ext3/namei.c ext3_orphan_add(handle, inode); inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; ext3_mark_inode_dirty(handle, inode); -@@ -2173,6 +2173,23 @@ +@@ -2185,6 +2185,23 @@ out_stop: return err; } @@ -410,7 +410,7 @@ Index: linux-2.6.16.i686/fs/ext3/namei.c static int ext3_link (struct dentry * old_dentry, struct inode * dir, struct dentry *dentry) { -@@ -2196,7 +2213,8 @@ +@@ -2208,7 +2225,8 @@ retry: ext3_inc_count(handle, inode); atomic_inc(&inode->i_count); @@ -420,10 +420,10 @@ Index: linux-2.6.16.i686/fs/ext3/namei.c ext3_journal_stop(handle); if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries)) goto retry; -Index: linux-2.6.16.i686/fs/ext3/Makefile +Index: linux-2.6.16.27-0.9/fs/ext3/Makefile =================================================================== ---- linux-2.6.16.i686.orig/fs/ext3/Makefile 2006-03-20 13:53:29.000000000 +0800 -+++ linux-2.6.16.i686/fs/ext3/Makefile 2006-05-30 22:52:38.000000000 +0800 +--- linux-2.6.16.27-0.9.orig/fs/ext3/Makefile 2007-03-13 00:56:52.000000000 +0100 ++++ linux-2.6.16.27-0.9/fs/ext3/Makefile 2007-06-29 08:24:49.000000000 +0200 @@ -4,7 +4,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o @@ -433,11 +433,11 @@ Index: linux-2.6.16.i686/fs/ext3/Makefile ioctl.o namei.o super.o symlink.o hash.o resize.o ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o -Index: linux-2.6.16.i686/include/linux/ext3_fs.h +Index: linux-2.6.16.27-0.9/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.16.i686.orig/include/linux/ext3_fs.h 2006-05-30 22:52:00.000000000 +0800 -+++ linux-2.6.16.i686/include/linux/ext3_fs.h 2006-05-30 22:52:38.000000000 +0800 -@@ -375,6 +375,8 @@ +--- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs.h 2007-06-29 08:24:47.000000000 +0200 ++++ linux-2.6.16.27-0.9/include/linux/ext3_fs.h 2007-06-29 08:24:49.000000000 +0200 +@@ -375,6 +375,8 @@ struct ext3_inode { #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ #define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ -- 1.8.3.1