Commit e6626b78 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext2&3: use the right i_flags in find_group_orlov()

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.
parent 1267b235
......@@ -294,7 +294,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
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;
......
......@@ -275,7 +275,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment