From 7cc09761f54c3e561e5311c574a3c31cdc89d57f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Aug 2017 11:56:20 -0700 Subject: [PATCH] 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 --- kmod/src/data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kmod/src/data.c b/kmod/src/data.c index d1070f8f..713a2d36 100644 --- a/kmod/src/data.c +++ b/kmod/src/data.c @@ -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; }