From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Handle error of get_old_root
Date: Thu, 13 Sep 2018 12:18:23 +0200 [thread overview]
Message-ID: <20180913101823.GS2154@twin.jikos.cz> (raw)
In-Reply-To: <1536827710-20534-1-git-send-email-nborisov@suse.com>
On Thu, Sep 13, 2018 at 11:35:10AM +0300, Nikolay Borisov wrote:
> In btrfs_search_old_slot get_old_root is always used with the
> assumption it cannot fail. However, this is not true in rare
> circumstance it can fail and return null.
Currently this will not happen, as the code returning NULL
1383 if (!eb)
1384 return NULL;
is preceed by btrfs_clone_extent_buffer or alloc_dummy_extent_buffer
that will not fail due to GFP_NOFAIL in __alloc_extent_buffer.
However I agree the error handling in btrfs_search_old_slot should be
there as the NOFAIL semantics is hidden and may change eventually.
prev parent reply other threads:[~2018-09-13 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 8:35 [PATCH] btrfs: Handle error of get_old_root Nikolay Borisov
2018-09-13 8:49 ` Lu Fengqi
2018-09-13 10:18 ` 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=20180913101823.GS2154@twin.jikos.cz \
--to=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;
as well as URLs for NNTP newsgroup(s).