提交 c69b26b0 编写于 作者: J Josef Bacik

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: NJosef Bacik <jbacik@fusionio.com>
上级 e78417d1
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册