summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-02-19 19:24:18 +0800
committerJosef Bacik <jbacik@fb.com>2014-03-10 15:16:54 -0400
commitc0af8f0b1cf7ec5cde4450be9f8bfeb8c211d40a (patch)
tree8eeabebfd1e6c6d10ae6145936052b38a22e4077 /fs/btrfs
parent12cf93728dfba237b46001a95479829c7179cdc9 (diff)
downloadblackbird-op-linux-c0af8f0b1cf7ec5cde4450be9f8bfeb8c211d40a.tar.gz
blackbird-op-linux-c0af8f0b1cf7ec5cde4450be9f8bfeb8c211d40a.zip
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/transaction.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 84da6669f384..79a4186b724a 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);
}
OpenPOWER on IntegriCloud