aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 34195f9fc6bb..edd45f709989 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3952,7 +3952,6 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location,
3952 struct btrfs_root *root, int *new) 3952 struct btrfs_root *root, int *new)
3953{ 3953{
3954 struct inode *inode; 3954 struct inode *inode;
3955 int bad_inode = 0;
3956 3955
3957 inode = btrfs_iget_locked(s, location->objectid, root); 3956 inode = btrfs_iget_locked(s, location->objectid, root);
3958 if (!inode) 3957 if (!inode)
@@ -3968,15 +3967,12 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location,
3968 if (new) 3967 if (new)
3969 *new = 1; 3968 *new = 1;
3970 } else { 3969 } else {
3971 bad_inode = 1; 3970 unlock_new_inode(inode);
3971 iput(inode);
3972 inode = ERR_PTR(-ESTALE);
3972 } 3973 }
3973 } 3974 }
3974 3975
3975 if (bad_inode) {
3976 iput(inode);
3977 inode = ERR_PTR(-ESTALE);
3978 }
3979
3980 return inode; 3976 return inode;
3981} 3977}
3982 3978