From: David Sterba <dsterba@suse.cz>
To: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, clm@fb.com, jbacik@fb.com,
dsterba@suse.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 2/2] btrfs: reada: Fix returned errno code
Date: Fri, 25 Sep 2015 12:40:56 +0200 [thread overview]
Message-ID: <20150925104056.GD11442@twin.jikos.cz> (raw)
In-Reply-To: <cae144357b99745472aad5d3e98acb8028bfb2ee.1443121865.git.luisbg@osg.samsung.com>
On Thu, Sep 24, 2015 at 08:13:33PM +0100, Luis de Bethencourt wrote:
> reada is using -1 instead of the -ENOMEM defined macro to specify that
> a buffer allocation failed. Since the error number is propagated, the
> caller will get a -EPERM which is the wrong error condition.
>
> Also, updating the caller to return the exact value from
> reada_add_block.
>
> Smatch tool warning:
> reada_add_block() warn: returning -1 instead of -ENOMEM is sloppy
>
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: David Sterba <dsterba@suse.com>
prev parent reply other threads:[~2015-09-25 10:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 19:13 [PATCH v2 0/2] btrfs: Fix returned errno codes Luis de Bethencourt
2015-09-24 19:13 ` [PATCH v2 1/2] btrfs: check-integrity: " Luis de Bethencourt
2015-09-24 19:13 ` [PATCH v2 2/2] btrfs: reada: Fix returned errno code Luis de Bethencourt
2015-09-25 10:40 ` David Sterba [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=20150925104056.GD11442@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luisbg@osg.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
all inboxes | Powered by JetHome®