linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Schmidt <list.btrfs@jan-o-sch.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
	Chris Mason <chris.mason@oracle.com>,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] btrfs scrub: handle -ENOMEM from init_ipath()
Date: Wed, 16 Nov 2011 17:56:29 +0100	[thread overview]
Message-ID: <4EC3EB3D.4030601@jan-o-sch.net> (raw)
In-Reply-To: <20111116082801.GE10264@elgon.mountain>

On 16.11.2011 09:28, Dan Carpenter wrote:
> init_ipath() can return an ERR_PTR(-ENOMEM).
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>

Thanks,
-Jan

> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index ed11d38..b72ee47 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -256,6 +256,11 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 root, void *ctx)
>  	btrfs_release_path(swarn->path);
>  
>  	ipath = init_ipath(4096, local_root, swarn->path);
> +	if (IS_ERR(ipath)) {
> +		ret = PTR_ERR(ipath);
> +		ipath = NULL;
> +		goto err;
> +	}
>  	ret = paths_from_inode(inum, ipath);
>  
>  	if (ret < 0)
> --
> 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

      reply	other threads:[~2011-11-16 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16  8:28 [patch] btrfs scrub: handle -ENOMEM from init_ipath() Dan Carpenter
2011-11-16 16:56 ` Jan Schmidt [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=4EC3EB3D.4030601@jan-o-sch.net \
    --to=list.btrfs@jan-o-sch.net \
    --cc=chris.mason@oracle.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --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).