diff options
author | Christoph Hellwig <hch@lst.de> | 2008-12-02 09:52:24 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-12-02 09:52:24 -0500 |
commit | 7a865e8ac3a8ead776ea2c8c74fa2b2d00a2c9cf (patch) | |
tree | e7b425f7857f3643e911d268c779b61777d3e854 /fs | |
parent | 4bcabaa30a63a156fc50026f972377dada66452c (diff) |
Btrfs: btrfs: pass void __user * to btrfs_ioctl_clone_range
Cleans the code up a little and also avoids a sparse warning due to the
incorrect cast in the current version of the code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index d2d5a5a9b02..caea9eed9d6 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1035,11 +1035,11 @@ out_fput: | |||
1035 | return ret; | 1035 | return ret; |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | static long btrfs_ioctl_clone_range(struct file *file, unsigned long argptr) | 1038 | static long btrfs_ioctl_clone_range(struct file *file, void __user *argp) |
1039 | { | 1039 | { |
1040 | struct btrfs_ioctl_clone_range_args args; | 1040 | struct btrfs_ioctl_clone_range_args args; |
1041 | 1041 | ||
1042 | if (copy_from_user(&args, (void *)argptr, sizeof(args))) | 1042 | if (copy_from_user(&args, argp, sizeof(args))) |
1043 | return -EFAULT; | 1043 | return -EFAULT; |
1044 | return btrfs_ioctl_clone(file, args.src_fd, args.src_offset, | 1044 | return btrfs_ioctl_clone(file, args.src_fd, args.src_offset, |
1045 | args.src_length, args.dest_offset); | 1045 | args.src_length, args.dest_offset); |
@@ -1137,7 +1137,7 @@ long btrfs_ioctl(struct file *file, unsigned int | |||
1137 | case BTRFS_IOC_CLONE: | 1137 | case BTRFS_IOC_CLONE: |
1138 | return btrfs_ioctl_clone(file, arg, 0, 0, 0); | 1138 | return btrfs_ioctl_clone(file, arg, 0, 0, 0); |
1139 | case BTRFS_IOC_CLONE_RANGE: | 1139 | case BTRFS_IOC_CLONE_RANGE: |
1140 | return btrfs_ioctl_clone_range(file, arg); | 1140 | return btrfs_ioctl_clone_range(file, argp); |
1141 | case BTRFS_IOC_TRANS_START: | 1141 | case BTRFS_IOC_TRANS_START: |
1142 | return btrfs_ioctl_trans_start(file); | 1142 | return btrfs_ioctl_trans_start(file); |
1143 | case BTRFS_IOC_TRANS_END: | 1143 | case BTRFS_IOC_TRANS_END: |