From: Nikolay Borisov <nborisov@suse.com>
To: Su Yue <suy.fnst@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: returns -ENOMEM if path allocation failed in btrfs_cross_ref_exist()
Date: Wed, 30 May 2018 09:24:22 +0300 [thread overview]
Message-ID: <c739075f-9505-d117-983a-91f4e8d686bb@suse.com> (raw)
In-Reply-To: <20180530020752.23788-1-suy.fnst@cn.fujitsu.com>
On 30.05.2018 05:07, Su Yue wrote:
> Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Generally we discourage commit log messages. I understand this patch is
very obvious but put a sentence saying that btrfs_alloc_path can fail
due to enomem hence returning enomem is the right ting to do here.
> ---
> fs/btrfs/extent-tree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 44093f92a532..99df6199dffc 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -3311,7 +3311,7 @@ int btrfs_cross_ref_exist(struct btrfs_root *root, u64 objectid, u64 offset,
>
> path = btrfs_alloc_path();
> if (!path)
> - return -ENOENT;
> + return -ENOMEM;
>
> do {
> ret = check_committed_ref(root, path, objectid,
>
next prev parent reply other threads:[~2018-05-30 6:24 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 [this message]
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
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=c739075f-9505-d117-983a-91f4e8d686bb@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=suy.fnst@cn.fujitsu.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).