archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <>
Cc: Yan Zheng <>, Josef Bacik <>,
	Christoph Hellwig <>,
	Chris Mason <>,
Subject: [patch 2/11] btrfs: btrfs_iget() returns ERR_PTR
Date: Sat, 29 May 2010 11:42:19 +0200	[thread overview]
Message-ID: <20100529094219.GC5483@bicker> (raw)

btrfs_iget() returns an ERR_PTR() on failure and not null.

Signed-off-by: Dan Carpenter <>

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 28b53f1..f2393b3 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -392,8 +392,8 @@ setup_root:
 	location.offset = 0;
 	inode = btrfs_iget(sb, &location, new_root, &new);
-	if (!inode)
-		return ERR_PTR(-ENOMEM);
+	if (IS_ERR(inode))
+		return ERR_CAST(inode);
 	 * If we're just mounting the root most subvol put the inode and return

                 reply	other threads:[~2010-05-29  9:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100529094219.GC5483@bicker \ \ \ \ \ \ \ \

* 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).