diff options
author | Anand Jain <anand.jain@oracle.com> | 2018-02-12 10:33:31 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-26 09:09:30 -0400 |
commit | 18e67c73dc6ea5bc5d9591abf92f8841290c4fcc (patch) | |
tree | 6d898772f4be750d214e53a1ed86b6ad4f80f3ca /fs/btrfs/dev-replace.c | |
parent | 17d202b9738887c60b4903937b569df1e266eabb (diff) |
btrfs: btrfs_dev_replace_cancel() can return int
Current u64 return from btrfs_dev_replace_cancel() was probably done
to match the btrfs_ioctl_dev_replace_args::result. However as our
actual return value fits in int, and it further gets typecast to u64,
so just return int.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r-- | fs/btrfs/dev-replace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 4d1dbc16fcd4..a428d528220f 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c | |||
@@ -693,13 +693,13 @@ void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info, | |||
693 | btrfs_dev_replace_unlock(dev_replace, 0); | 693 | btrfs_dev_replace_unlock(dev_replace, 0); |
694 | } | 694 | } |
695 | 695 | ||
696 | u64 btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info) | 696 | int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info) |
697 | { | 697 | { |
698 | struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; | 698 | struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; |
699 | struct btrfs_device *tgt_device = NULL; | 699 | struct btrfs_device *tgt_device = NULL; |
700 | struct btrfs_trans_handle *trans; | 700 | struct btrfs_trans_handle *trans; |
701 | struct btrfs_root *root = fs_info->tree_root; | 701 | struct btrfs_root *root = fs_info->tree_root; |
702 | u64 result; | 702 | int result; |
703 | int ret; | 703 | int ret; |
704 | 704 | ||
705 | if (sb_rdonly(fs_info->sb)) | 705 | if (sb_rdonly(fs_info->sb)) |