Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

f2fs: remove unnecessary condition judgment

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>

authored by

Yuan Zhong and committed by
Jaegeuk Kim
d9f46bb1 b1f73b79

+1 -1
+1 -1
fs/f2fs/dir.c
··· 139 139 !memcmp(d->filename[bit_pos], name->name, name->len)) 140 140 goto found; 141 141 142 - if (max_slots && *max_slots >= 0 && max_len > *max_slots) { 142 + if (max_slots && max_len > *max_slots) { 143 143 *max_slots = max_len; 144 144 max_len = 0; 145 145 }