

Spotted by Jorn Engel <joern@wohnheim.fh-wedel.de>: both the generic and
fs-specific parts of the inode have an i_flags.  find_group_orlov() is using
the wrong one.


---

 25-akpm/fs/ext2/ialloc.c |    2 +-
 25-akpm/fs/ext3/ialloc.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/ext2/ialloc.c~ext23-i_flags-fix fs/ext2/ialloc.c
--- 25/fs/ext2/ialloc.c~ext23-i_flags-fix	2004-03-21 16:09:51.722173616 -0800
+++ 25-akpm/fs/ext2/ialloc.c	2004-03-21 16:10:10.815271024 -0800
@@ -294,7 +294,7 @@ static int find_group_orlov(struct super
 	ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);
 
 	if ((parent == sb->s_root->d_inode) ||
-	    (parent->i_flags & EXT2_TOPDIR_FL)) {
+	    (EXT2_I(parent)->i_flags & EXT2_TOPDIR_FL)) {
 		struct ext2_group_desc *best_desc = NULL;
 		struct buffer_head *best_bh = NULL;
 		int best_ndir = inodes_per_group;
diff -puN fs/ext3/ialloc.c~ext23-i_flags-fix fs/ext3/ialloc.c
--- 25/fs/ext3/ialloc.c~ext23-i_flags-fix	2004-03-21 16:09:51.751169208 -0800
+++ 25-akpm/fs/ext3/ialloc.c	2004-03-21 16:10:18.590089072 -0800
@@ -275,7 +275,7 @@ static int find_group_orlov(struct super
 	ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);
 
 	if ((parent == sb->s_root->d_inode) ||
-	    (parent->i_flags & EXT3_TOPDIR_FL)) {
+	    (EXT3_I(parent)->i_flags & EXT3_TOPDIR_FL)) {
 		int best_ndir = inodes_per_group;
 		int best_group = -1;
 

_
