Skip to content

Commit

Permalink
Btrfs: btrfs_iget() returns ERR_PTR
Browse files Browse the repository at this point in the history
btrfs_iget() returns an ERR_PTR() on failure and not null.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Dan Carpenter authored and Chris Mason committed Jun 11, 2010
1 parent 676e4c8 commit 4cbd114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ static struct dentry *get_default_root(struct super_block *sb,
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
Expand Down

0 comments on commit 4cbd114

Please sign in to comment.