From: Su Yue <suy.fnst@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2] btrfs: returns -ENOMEM if path allocation failed in btrfs_cross_ref_exist()
Date: Thu, 31 May 2018 10:08:17 +0800 [thread overview]
Message-ID: <2efb5186-ab23-dbe4-1569-c62f49acf276@cn.fujitsu.com> (raw)
In-Reply-To: <20180530153338.GF3539@twin.jikos.cz>
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
On 05/30/2018 11:33 PM, David Sterba wrote:
> On Wed, May 30, 2018 at 02:49:10PM +0800, Su Yue wrote:
>> btrfs_alloc_path() may fail due to no enough memory,
>> so let the function return -ENOMEM instead of -ENOENT is better.
>>
>> Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
>
> Reviewed-by: David Sterba <dsterba@suse.com>
>
> Thanks. I've audited all return codes after failed path allocation, this
> was the only one not matching.
>
> The return code of btrfs_cross_ref_exist should be also distinguished at
> the call sites, as both places expect only the ENOENT but should not
> react to ENOMEM as if it were ENOENT.
>
Not quite understand the last paragraph. Is necessary to send patches to
make the two callers to distinguish ENOMEM and ENOENT?
Thanks,
Su
>
[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 1791 bytes --]
prev parent reply other threads:[~2018-05-31 2:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 2:07 [PATCH 1/2] btrfs: returns -ENOMEM if path allocation failed in btrfs_cross_ref_exist() Su Yue
2018-05-30 2:55 ` Su Yue
2018-05-30 6:24 ` Nikolay Borisov
2018-05-30 6:49 ` [PATCH v2] " Su Yue
2018-05-30 6:44 ` Nikolay Borisov
2018-05-30 15:33 ` David Sterba
2018-05-31 2:08 ` Su Yue [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=2efb5186-ab23-dbe4-1569-c62f49acf276@cn.fujitsu.com \
--to=suy.fnst@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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).