From: Changman Lee <cm224.lee@samsung.com>
To: Yuan Zhong <yuan.mark.zhong@samsung.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-f2fs-devel@lists.sourceforge.net"
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH 1/3] f2fs:remove unnecessary condition judgment
Date: Mon, 09 Mar 2015 10:21:44 +0900 [thread overview]
Message-ID: <20150309012144.GB4450@lcm-devel.org> (raw)
In-Reply-To: <300031252.458581425722724194.JavaMail.weblogic@epmlwas08b>
Hi Yuan,
On Sat, Mar 07, 2015 at 10:05:25AM +0000, Yuan Zhong wrote:
> 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_len = 0;
There is wrong statement. It should be fixed as *max_slot = 0.
Thanks,
>
> Signed-off-by: Yuan Zhong <yuan.mark.zhong@samsung.com>
> ---
> fs/f2fs/dir.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
> index 590aeef..1f1a1bc 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;
> }
> --
> 1.7.9.5
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
prev parent reply other threads:[~2015-03-09 1:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 10:05 [PATCH 1/3] f2fs:remove unnecessary condition judgment Yuan Zhong
2015-03-09 1:21 ` Changman Lee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150309012144.GB4450@lcm-devel.org \
--to=cm224.lee@samsung.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuan.mark.zhong@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).