Skip to content

Commit 18e67c7

Browse files
asjkdave
authored andcommitted
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>
1 parent 17d202b commit 18e67c7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎fs/btrfs/dev-replace.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,13 +693,13 @@ void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
693693
btrfs_dev_replace_unlock(dev_replace, 0);
694694
}
695695

696-
u64 btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
696+
int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
697697
{
698698
struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
699699
struct btrfs_device *tgt_device = NULL;
700700
struct btrfs_trans_handle *trans;
701701
struct btrfs_root *root = fs_info->tree_root;
702-
u64 result;
702+
int result;
703703
int ret;
704704

705705
if (sb_rdonly(fs_info->sb))

‎fs/btrfs/dev-replace.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
3232
int read_src);
3333
void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
3434
struct btrfs_ioctl_dev_replace_args *args);
35-
u64 btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
35+
int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
3636
void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info);
3737
int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info);
3838
int btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);

0 commit comments

Comments
 (0)