f2fs: remove unnecessary condition judgment
authorYuan Zhong <yuan.mark.zhong@samsung.com>
Mon, 9 Mar 2015 02:43:50 +0000 (02:43 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Apr 2015 22:08:38 +0000 (15:08 -0700)
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>
fs/f2fs/dir.c

index a28909d9aea8956c58a34d848e716dcb04479cb2..473763f4ca5ba2a653bcccb4937127bd9ab8476e 100644 (file)
@@ -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;
                }