Skip to content

Commit

Permalink
ext2: Remove redundant check for finding no group
Browse files Browse the repository at this point in the history
When best_desc keeps NULL, best_group keeps -1, too. So we can
return best_group directly.

Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Liu Xiang authored and Jan Kara committed Jan 28, 2019
1 parent f068ebd commit 0b7a814
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/ext2/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ static int find_group_dir(struct super_block *sb, struct inode *parent)
best_desc = desc;
}
}
if (!best_desc)
return -1;

return best_group;
}
Expand Down

0 comments on commit 0b7a814

Please sign in to comment.