Skip to content

Commit

Permalink
f2fs: remove unnecessary condition judgment
Browse files Browse the repository at this point in the history
Remove the unnecessary condition judgment, because
'max_slots' has been initialized to '0' at the beginging
of the function, as following:
if (max_slots)
       *max_slots = 0;

Signed-off-by: Yuan Zhong <yuan.mark.zhong@samsung.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Yuan Zhong authored and Jaegeuk Kim committed Apr 10, 2015
1 parent b1f73b7 commit d9f46bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct f2fs_dir_entry *find_target_dentry(struct qstr *name, int *max_slots,
!memcmp(d->filename[bit_pos], name->name, name->len))
goto found;

if (max_slots && *max_slots >= 0 && max_len > *max_slots) {
if (max_slots && max_len > *max_slots) {
*max_slots = max_len;
max_len = 0;
}
Expand Down

0 comments on commit d9f46bb

Please sign in to comment.