|
@@ -3234,13 +3234,16 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
|
|
/* 1 for the orphan item deletion. */
|
|
/* 1 for the orphan item deletion. */
|
|
trans = btrfs_start_transaction(root, 1);
|
|
trans = btrfs_start_transaction(root, 1);
|
|
if (IS_ERR(trans)) {
|
|
if (IS_ERR(trans)) {
|
|
|
|
+ iput(inode);
|
|
ret = PTR_ERR(trans);
|
|
ret = PTR_ERR(trans);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
ret = btrfs_orphan_add(trans, inode);
|
|
ret = btrfs_orphan_add(trans, inode);
|
|
btrfs_end_transaction(trans, root);
|
|
btrfs_end_transaction(trans, root);
|
|
- if (ret)
|
|
|
|
|
|
+ if (ret) {
|
|
|
|
+ iput(inode);
|
|
goto out;
|
|
goto out;
|
|
|
|
+ }
|
|
|
|
|
|
ret = btrfs_truncate(inode);
|
|
ret = btrfs_truncate(inode);
|
|
if (ret)
|
|
if (ret)
|