From 312f5294799a6bbaaa46481c45be27a492b76dc8 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 8 Apr 2003 07:37:20 +0000 Subject: [PATCH] Fix context when not applying ext3-2.4.18-ino_sb_macro.patch --- .../patches/ext3-2.4.18-ino_sb_macro.patch | 20 +++----------------- lustre/kernel_patches/patches/extN-wantedi.patch | 7 ++++--- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/lustre/kernel_patches/patches/ext3-2.4.18-ino_sb_macro.patch b/lustre/kernel_patches/patches/ext3-2.4.18-ino_sb_macro.patch index cc47588..2ddff7d 100644 --- a/lustre/kernel_patches/patches/ext3-2.4.18-ino_sb_macro.patch +++ b/lustre/kernel_patches/patches/ext3-2.4.18-ino_sb_macro.patch @@ -422,7 +422,7 @@ struct ext3_group_desc * gdp; struct ext3_group_desc * tmp; struct ext3_super_block * es; -@@ -318,19 +320,21 @@ struct inode * ext3_new_inode (handle_t +@@ -318,7 +320,9 @@ struct inode * ext3_new_inode (handle_t inode = new_inode(sb); if (!inode) return ERR_PTR(-ENOMEM); @@ -432,11 +432,8 @@ + init_rwsem(&ei->truncate_sem); lock_super (sb); -- es = sb->u.ext3_sb.s_es; -+ es = sbi->s_es; - repeat: - gdp = NULL; - i = 0; + es = sb->u.ext3_sb.s_es; +@@ -328,9 +332,9 @@ struct inode * ext3_new_inode (handle_t if (S_ISDIR(mode)) { avefreei = le32_to_cpu(es->s_free_inodes_count) / @@ -499,17 +496,6 @@ BUFFER_TRACE(bh, "get_write_access"); err = ext3_journal_get_write_access(handle, bh); if (err) goto fail; -@@ -436,8 +440,8 @@ repeat: - } - goto repeat; - } -- j += i * EXT3_INODES_PER_GROUP(sb) + 1; -- if (j < EXT3_FIRST_INO(sb) || j > le32_to_cpu(es->s_inodes_count)) { -+ j += i * sbi->s_inodes_per_group + 1; -+ if (j < sbi->s_first_ino || j > le32_to_cpu(es->s_inodes_count)) { - ext3_error (sb, "ext3_new_inode", - "reserved inode or inode > inodes count - " - "block_group = %d,inode=%d", i, j); @@ -457,13 +461,13 @@ repeat: err = ext3_journal_dirty_metadata(handle, bh2); if (err) goto fail; diff --git a/lustre/kernel_patches/patches/extN-wantedi.patch b/lustre/kernel_patches/patches/extN-wantedi.patch index efee46f..7a45380 100644 --- a/lustre/kernel_patches/patches/extN-wantedi.patch +++ b/lustre/kernel_patches/patches/extN-wantedi.patch @@ -61,7 +61,8 @@ @@ -360,6 +361,38 @@ struct inode * ext3_new_inode (handle_t lock_super (sb); - es = sbi->s_es; +- es = sb->u.ext3_sb.s_es; ++ es = EXT3_SB(sb)->s_es; + + if (goal) { + i = (goal - 1) / EXT3_INODES_PER_GROUP(sb); @@ -102,8 +103,8 @@ goto repeat; } + have_bit_and_group: - j += i * sbi->s_inodes_per_group + 1; - if (j < sbi->s_first_ino || j > le32_to_cpu(es->s_inodes_count)) { + j += i * EXT3_INODES_PER_GROUP(sb) + 1; + if (j < EXT3_FIRST_INO(sb) || j > le32_to_cpu(es->s_inodes_count)) { ext3_error (sb, "ext3_new_inode", --- linux-2.4.18-18/fs/ext3/ioctl.c~extN-wantedi Sat Apr 5 02:51:31 2003 +++ linux-2.4.18-18-braam/fs/ext3/ioctl.c Sat Apr 5 02:51:31 2003 -- 1.8.3.1