* [patch 2/11] btrfs: btrfs_iget() returns ERR_PTR
@ 2010-05-29 9:42 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-05-29 9:42 UTC (permalink / raw)
To: linux-btrfs
Cc: Yan Zheng, Josef Bacik, Christoph Hellwig, Chris Mason, kernel-janitors
btrfs_iget() returns an ERR_PTR() on failure and not null.
Signed-off-by: Dan Carpenter <error27@gmail.com>
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-29 9:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-29 9:42 [patch 2/11] btrfs: btrfs_iget() returns ERR_PTR Dan Carpenter
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).