From: Liu Bo <bo.li.liu@oracle.com>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/3] btrfs: handle allocation error in update_dev_stat_item
Date: Tue, 21 Feb 2017 21:33:23 -0800 [thread overview]
Message-ID: <20170222053322.GB1497@lim.localdomain> (raw)
In-Reply-To: <b5cd1b62a67b7ee96ae495628aef097294f7797d.1487614974.git.dsterba@suse.com>
On Mon, Feb 20, 2017 at 07:25:04PM +0100, David Sterba wrote:
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/volumes.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 1fac98728814..64d6665f6eda 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -6954,7 +6954,8 @@ static int update_dev_stat_item(struct btrfs_trans_handle *trans,
> key.offset = device->devid;
>
> path = btrfs_alloc_path();
> - BUG_ON(!path);
> + if (!path)
> + return -ENOMEM;
> ret = btrfs_search_slot(trans, dev_root, &key, path, -1, 1);
> if (ret < 0) {
> btrfs_warn_in_rcu(fs_info,
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Thanks,
-liubo
> --
> 2.10.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-02-22 5:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 18:24 [PATCH 0/3] Remove some BUG_ONs David Sterba
2017-02-20 18:25 ` [PATCH 1/3] btrfs: remove BUG_ON from __tree_mod_log_insert David Sterba
2017-02-22 5:31 ` Liu Bo
2017-02-20 18:25 ` [PATCH 2/3] btrfs: handle allocation error in update_dev_stat_item David Sterba
2017-02-22 5:33 ` Liu Bo [this message]
2017-02-20 18:25 ` [PATCH 3/3] btrfs: do proper error handling in btrfs_insert_xattr_item David Sterba
2017-02-22 5:39 ` Liu Bo
2017-02-28 10:41 ` 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=20170222053322.GB1497@lim.localdomain \
--to=bo.li.liu@oracle.com \
--cc=dsterba@suse.com \
--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).