aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-06-03 16:51:23 -0400
committerJosef Bacik <jbacik@fusionio.com>2013-06-14 11:30:15 -0400
commitc69b26b0116dc2c064457991bec91b6d94e96d65 (patch)
treeaa3235325dfcf69b529669db88b38139a44b21df /fs/btrfs
parente78417d1921c538ea195537c7bea1b31a6a55961 (diff)
Btrfs: add some missing iput()'s in btrfs_orphan_cleanup
There are some error cases that we don't do an iput() on our inode, fix this. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c0e95b1554a0..c52ceb8c24e0 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3234,13 +3234,16 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
3234 /* 1 for the orphan item deletion. */ 3234 /* 1 for the orphan item deletion. */
3235 trans = btrfs_start_transaction(root, 1); 3235 trans = btrfs_start_transaction(root, 1);
3236 if (IS_ERR(trans)) { 3236 if (IS_ERR(trans)) {
3237 iput(inode);
3237 ret = PTR_ERR(trans); 3238 ret = PTR_ERR(trans);
3238 goto out; 3239 goto out;
3239 } 3240 }
3240 ret = btrfs_orphan_add(trans, inode); 3241 ret = btrfs_orphan_add(trans, inode);
3241 btrfs_end_transaction(trans, root); 3242 btrfs_end_transaction(trans, root);
3242 if (ret) 3243 if (ret) {
3244 iput(inode);
3243 goto out; 3245 goto out;
3246 }
3244 3247
3245 ret = btrfs_truncate(inode); 3248 ret = btrfs_truncate(inode);
3246 if (ret) 3249 if (ret)