Btrfs: cancel scrub on transaction abortion
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Wed, 19 Feb 2014 11:24:18 +0000 (19:24 +0800)
committerJosef Bacik <jbacik@fb.com>
Mon, 10 Mar 2014 19:16:54 +0000 (15:16 -0400)
If we fail to commit transaction, we'd better
cancel scrub operations.

Suggested-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
fs/btrfs/transaction.c

index 84da6669f38434ffdfab3793594026bf81fa9815..79a4186b724a21ac28547b2dac5a13f548712d54 100644 (file)
@@ -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);
 }