* [patch 2/11] btrfs: btrfs_iget() returns ERR_PTR
@ 2010-05-29 9:42 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages 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] 2+ messages in thread
* [patch 2/11] btrfs: btrfs_iget() returns ERR_PTR
@ 2010-05-29 9:42 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages 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] 2+ messages in thread
end of thread, other threads:[~2010-05-29 9:42 UTC | newest]
Thread overview: 2+ messages (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
2010-05-29 9:42 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.