summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Xiang <liu.xiang6@zte.com.cn>2019-01-25 09:01:36 -0500
committerJan Kara <jack@suse.cz>2019-01-28 09:51:11 -0500
commit0b7a814c26444ec71c5a37a4a60ea180d8e8c6e8 (patch)
treedc9ce4a0acce936e66d366bf4cfbaac371571a71
parentf068ebd13bf3682875814f15a654e023af7a9c3b (diff)
ext2: Remove redundant check for finding no group
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>
-rw-r--r--fs/ext2/ialloc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 5c3d7b7e4975..a0c5ea91fcd4 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -222,8 +222,6 @@ static int find_group_dir(struct super_block *sb, struct inode *parent)
222 best_desc = desc; 222 best_desc = desc;
223 } 223 }
224 } 224 }
225 if (!best_desc)
226 return -1;
227 225
228 return best_group; 226 return best_group;
229} 227}