linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Allen Pais <allen.lkml@gmail.com>, linux-btrfs@vger.kernel.org
Cc: clm@fb.com, dsterba@suse.com
Subject: Re: [PATCH v2] fs:btrfs: return -ENOMEM on allocation failure.
Date: Wed, 20 Sep 2017 20:48:48 +0800	[thread overview]
Message-ID: <d1348471-04e8-5aeb-3bd1-2d8b03a84a60@oracle.com> (raw)
In-Reply-To: <1505888266-23526-1-git-send-email-allen.lkml@gmail.com>



On 09/20/2017 02:17 PM, Allen Pais wrote:
> v2: return -ENOMEM from btrfsic_dev_state_alloc() too.
> 
> Signed-off-by: Allen Pais <allen.lkml@gmail.com>

Reviewed-by: Anand Jain <anand.jain@oracle.com>

> ---
>   fs/btrfs/check-integrity.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
> index 7d5a9b5..9db1e76 100644
> --- a/fs/btrfs/check-integrity.c
> +++ b/fs/btrfs/check-integrity.c
> @@ -2913,7 +2913,7 @@ int btrfsic_mount(struct btrfs_fs_info *fs_info,
>   	state = kvzalloc(sizeof(*state), GFP_KERNEL);
>   	if (!state) {
>   		pr_info("btrfs check-integrity: allocation failed!\n");
> -		return -1;
> +		return -ENOMEM;
>   	}
>   
>   	if (!btrfsic_is_initialized) {
> @@ -2945,7 +2945,7 @@ int btrfsic_mount(struct btrfs_fs_info *fs_info,
>   		if (NULL == ds) {
>   			pr_info("btrfs check-integrity: kmalloc() failed!\n");
>   			mutex_unlock(&btrfsic_mutex);
> -			return -1;
> +			return -ENOMEM;
>   		}
>   		ds->bdev = device->bdev;
>   		ds->state = state;
> 

      reply	other threads:[~2017-09-20 12:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20  6:17 [PATCH v2] fs:btrfs: return -ENOMEM on allocation failure Allen Pais
2017-09-20 12:48 ` Anand Jain [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=d1348471-04e8-5aeb-3bd1-2d8b03a84a60@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=allen.lkml@gmail.com \
    --cc=clm@fb.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).