diff options
author | Jeff Mahoney <jeffm@suse.com> | 2012-03-01 11:24:58 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2012-03-21 20:45:40 -0400 |
commit | 49b25e0540904be0bf558b84475c69d72e4de66e (patch) | |
tree | 5a89b2f5d6e5bd8b1ff39bdb387071ec1cb2a615 /fs/btrfs/scrub.c | |
parent | 4da35113426d16673aa1fb0613c14ca2e419e7fd (diff) |
btrfs: enhance transaction abort infrastructure
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index a2e8aa40f3f5..794cbb52f308 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -1680,9 +1680,8 @@ void btrfs_scrub_continue_super(struct btrfs_root *root) | |||
1680 | up_write(&root->fs_info->scrub_super_lock); | 1680 | up_write(&root->fs_info->scrub_super_lock); |
1681 | } | 1681 | } |
1682 | 1682 | ||
1683 | int btrfs_scrub_cancel(struct btrfs_root *root) | 1683 | int __btrfs_scrub_cancel(struct btrfs_fs_info *fs_info) |
1684 | { | 1684 | { |
1685 | struct btrfs_fs_info *fs_info = root->fs_info; | ||
1686 | 1685 | ||
1687 | mutex_lock(&fs_info->scrub_lock); | 1686 | mutex_lock(&fs_info->scrub_lock); |
1688 | if (!atomic_read(&fs_info->scrubs_running)) { | 1687 | if (!atomic_read(&fs_info->scrubs_running)) { |
@@ -1703,6 +1702,11 @@ int btrfs_scrub_cancel(struct btrfs_root *root) | |||
1703 | return 0; | 1702 | return 0; |
1704 | } | 1703 | } |
1705 | 1704 | ||
1705 | int btrfs_scrub_cancel(struct btrfs_root *root) | ||
1706 | { | ||
1707 | return __btrfs_scrub_cancel(root->fs_info); | ||
1708 | } | ||
1709 | |||
1706 | int btrfs_scrub_cancel_dev(struct btrfs_root *root, struct btrfs_device *dev) | 1710 | int btrfs_scrub_cancel_dev(struct btrfs_root *root, struct btrfs_device *dev) |
1707 | { | 1711 | { |
1708 | struct btrfs_fs_info *fs_info = root->fs_info; | 1712 | struct btrfs_fs_info *fs_info = root->fs_info; |