|
@@ -3952,7 +3952,6 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location,
|
|
|
struct btrfs_root *root, int *new)
|
|
|
{
|
|
|
struct inode *inode;
|
|
|
- int bad_inode = 0;
|
|
|
|
|
|
inode = btrfs_iget_locked(s, location->objectid, root);
|
|
|
if (!inode)
|
|
@@ -3968,15 +3967,12 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location,
|
|
|
if (new)
|
|
|
*new = 1;
|
|
|
} else {
|
|
|
- bad_inode = 1;
|
|
|
+ unlock_new_inode(inode);
|
|
|
+ iput(inode);
|
|
|
+ inode = ERR_PTR(-ESTALE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (bad_inode) {
|
|
|
- iput(inode);
|
|
|
- inode = ERR_PTR(-ESTALE);
|
|
|
- }
|
|
|
-
|
|
|
return inode;
|
|
|
}
|
|
|
|