Commit c0af8f0b1cf7ec5cde4450be9f8bfeb8c211d40a

Authored by Wang Shilong
Committed by Josef Bacik
1 parent 12cf93728d

Btrfs: cancel scrub on transaction abortion

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

fs/btrfs/transaction.c
... ... @@ -1580,6 +1580,7 @@
1580 1580  
1581 1581 if (current->journal_info == trans)
1582 1582 current->journal_info = NULL;
  1583 + btrfs_scrub_cancel(root->fs_info);
1583 1584  
1584 1585 kmem_cache_free(btrfs_trans_handle_cachep, trans);
1585 1586 }