From: Sergei Antonov <saproj@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Vyacheslav Dubeyko <slava@dubeyko.com>,
Sougata Santra <sougata@tuxera.com>,
Christoph Hellwig <hch@lst.de>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] hfsplus: add missing curly braces in hfsplus_delete_cat()
Date: Wed, 25 Feb 2015 15:50:19 +0100 [thread overview]
Message-ID: <CABikg9yk7BoL36FMW3sxXOY5MUb-TRDWB_Me3pAjMkpRAU-8ow@mail.gmail.com> (raw)
In-Reply-To: <20150225133644.GW19745@mwanda>
On 25 February 2015 at 14:36, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> This doesn't change how the code works, but clearly the curly braces
> were intended.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
> index 7892e6f..022974a 100644
> --- a/fs/hfsplus/catalog.c
> +++ b/fs/hfsplus/catalog.c
> @@ -350,10 +350,11 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str)
> &fd.search_key->cat.name.unicode,
> off + 2, len);
> fd.search_key->key_len = cpu_to_be16(6 + len);
> - } else
> + } else {
> err = hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, str);
> if (unlikely(err))
> goto out;
> + }
>
> err = hfs_brec_find(&fd, hfs_find_rec_by_key);
> if (err)
Right you are.
I would also add 2 things:
1. CC the author of the last patch (the one which introduced it).
2. Unify the way the return code from hfsplus_cat_build_key() is
checked. Now it has two flavours: "if (unlikely(err < 0))" and "if
(unlikely(err))". The latter is better.
If you do so and resubmit, then it is Reviewed-by: Sergei Antonov
<saproj@gmail.com>
next prev parent reply other threads:[~2015-02-25 14:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 13:36 [patch] hfsplus: add missing curly braces in hfsplus_delete_cat() Dan Carpenter
2015-02-25 14:50 ` Sergei Antonov [this message]
2015-02-25 17:13 ` Dan Carpenter
2015-02-25 18:20 ` Sergei Antonov
2015-02-25 18:30 ` Dan Carpenter
2015-02-25 18:37 ` Sergei Antonov
2015-02-25 18:50 ` Dan Carpenter
2015-02-25 17:42 ` Viacheslav Dubeyko
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=CABikg9yk7BoL36FMW3sxXOY5MUb-TRDWB_Me3pAjMkpRAU-8ow@mail.gmail.com \
--to=saproj@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=hch@lst.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=sougata@tuxera.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).