diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-06-03 22:51:23 +0200 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-06-14 17:30:15 +0200 |
commit | c69b26b0116dc2c064457991bec91b6d94e96d65 (patch) | |
tree | aa3235325dfcf69b529669db88b38139a44b21df /fs | |
parent | Btrfs: do not pin while under spin lock (diff) | |
download | linux-c69b26b0116dc2c064457991bec91b6d94e96d65.tar.xz linux-c69b26b0116dc2c064457991bec91b6d94e96d65.zip |
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')
-rw-r--r-- | fs/btrfs/inode.c | 5 |
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) /* 1 for the orphan item deletion. */ trans = btrfs_start_transaction(root, 1); if (IS_ERR(trans)) { + iput(inode); ret = PTR_ERR(trans); goto out; } ret = btrfs_orphan_add(trans, inode); btrfs_end_transaction(trans, root); - if (ret) + if (ret) { + iput(inode); goto out; + } ret = btrfs_truncate(inode); if (ret) |