scoutfs: release item cleanup needs transaction

Release tries to re-instate extents if it sees an error during release.
Those item manipulations need to be covered by the transaction.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-08-14 09:19:03 -07:00
committed by Zach Brown
parent c7ad9fe772
commit 7cc09761f5
+3 -3
View File
@@ -632,9 +632,6 @@ int scoutfs_data_truncate_items(struct super_block *sb, u64 ino, u64 iblock,
holding = false;
}
if (holding)
scoutfs_release_trans(sb);
if (ret) {
if (ins_ext) {
err = insert_extent(sb, &ext, ino,
@@ -648,6 +645,9 @@ int scoutfs_data_truncate_items(struct super_block *sb, u64 ino, u64 iblock,
}
}
if (holding)
scoutfs_release_trans(sb);
return ret;
}