From: Yuan Zhong Date: Mon, 9 Mar 2015 02:43:50 +0000 (+0000) Subject: f2fs: remove unnecessary condition judgment X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d9f46bb1a84ee15f58c9c58ab91962b7dc6eb9a4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index a28909d9aea8..473763f4ca5b 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -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; }