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,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: check-integrity: Fix returned errno codes
Date: Wed, 23 Sep 2015 10:47:49 +0200 [thread overview]
Message-ID: <20150923084749.GS12815@suse.cz> (raw)
In-Reply-To: <311df0a5aadcb7578746ad7d0107045f6fcf43a1.1442939007.git.luis@debethencourt.com>
On Tue, Sep 22, 2015 at 05:29:38PM +0100, Luis de Bethencourt wrote:
> check-integrity 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.
Agreed. btrfsic_process_superblock can be called from the mount path so
getting EPERM would be confusing.
> Also, the smatch tool complains with the following warnings:
> btrfsic_process_superblock() warn: returning -1 instead of -ENOMEM is sloppy
> btrfsic_read_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>
next prev parent reply other threads:[~2015-09-23 8:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 16:29 [PATCH 0/2] btrfs: Fix returned errno codes Luis de Bethencourt
2015-09-22 16:29 ` [PATCH 1/2] btrfs: check-integrity: " Luis de Bethencourt
2015-09-23 8:47 ` David Sterba [this message]
2015-09-22 16:29 ` [PATCH 2/2] btrfs: reada: Fix returned errno code Luis de Bethencourt
2015-09-23 8:42 ` David Sterba
2015-09-23 8:50 ` [PATCH 0/2] btrfs: Fix returned errno codes 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=20150923084749.GS12815@suse.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.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;
as well as URLs for NNTP newsgroup(s).