Commit 18e67c73 authored by Anand Jain's avatar Anand Jain Committed by David Sterba
Browse files

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: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 17d202b9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -693,13 +693,13 @@ void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
	btrfs_dev_replace_unlock(dev_replace, 0);
}

u64 btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
{
	struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
	struct btrfs_device *tgt_device = NULL;
	struct btrfs_trans_handle *trans;
	struct btrfs_root *root = fs_info->tree_root;
	u64 result;
	int result;
	int ret;

	if (sb_rdonly(fs_info->sb))
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
		int read_src);
void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
			      struct btrfs_ioctl_dev_replace_args *args);
u64 btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info);
int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info);
int btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);