From: Sidong Yang <realwakka@gmail.com>
To: dsterba@suse.cz, Nikolay Borisov <nborisov@suse.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2] btrfs: reflink: Initialize return value in btrfs_extent_same()
Date: Fri, 20 Aug 2021 11:50:05 +0000 [thread overview]
Message-ID: <20210820115005.GB17604@realwakka> (raw)
In-Reply-To: <20210820111749.GO5047@twin.jikos.cz>
On Fri, Aug 20, 2021 at 01:17:49PM +0200, David Sterba wrote:
> On Fri, Aug 20, 2021 at 09:08:26AM +0300, Nikolay Borisov wrote:
> >
> >
> > On 20.08.21 г. 3:41, Sidong Yang wrote:
> > > btrfs_extent_same() cannot be called with zero length. This patch add
> > > code that initialize ret as -EINVAL to make it safe.
> > >
> > > Signed-off-by: Sidong Yang <realwakka@gmail.com>
> >
> > Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> >
> > One minor nit: In this case the variable could have been initialized
> > during definition to save 1 extra line of code.
>
> Yeah the function is short enough to have the declaration initialization
> in sight, I've changed that.
Thanks, I'll keep in mind. Any nit would be welcome.
Thanks,
Sidong
next prev parent reply other threads:[~2021-08-20 11:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 0:41 [PATCH v2] btrfs: reflink: Initialize return value in btrfs_extent_same() Sidong Yang
2021-08-20 6:08 ` Nikolay Borisov
2021-08-20 11:17 ` David Sterba
2021-08-20 11:50 ` Sidong Yang [this message]
2021-08-23 9:44 ` Filipe Manana
2021-08-23 23:51 ` Sidong Yang
2021-08-26 14:08 ` David Sterba
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=20210820115005.GB17604@realwakka \
--to=realwakka@gmail.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.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