mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
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>
This commit is contained in:
parent
12cf93728d
commit
c0af8f0b1c
1 changed files with 1 additions and 0 deletions
|
@ -1580,6 +1580,7 @@ static void cleanup_transaction(struct btrfs_trans_handle *trans,
|
||||||
|
|
||||||
if (current->journal_info == trans)
|
if (current->journal_info == trans)
|
||||||
current->journal_info = NULL;
|
current->journal_info = NULL;
|
||||||
|
btrfs_scrub_cancel(root->fs_info);
|
||||||
|
|
||||||
kmem_cache_free(btrfs_trans_handle_cachep, trans);
|
kmem_cache_free(btrfs_trans_handle_cachep, trans);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue