If we fail to commit transaction, we'd better
cancel scrub operations.

Suggested-by: Miao Xie <mi...@cn.fujitsu.com>
Signed-off-by: Wang Shilong <wangsl.f...@cn.fujitsu.com>
---
 fs/btrfs/transaction.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 84da666..79a4186 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1580,6 +1580,7 @@ static void cleanup_transaction(struct btrfs_trans_handle 
*trans,
 
        if (current->journal_info == trans)
                current->journal_info = NULL;
+       btrfs_scrub_cancel(root->fs_info);
 
        kmem_cache_free(btrfs_trans_handle_cachep, trans);
 }
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to