summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-12-02 09:52:24 -0500
committerChris Mason <chris.mason@oracle.com>2008-12-02 09:52:24 -0500
commit7a865e8ac3a8ead776ea2c8c74fa2b2d00a2c9cf (patch)
treee7b425f7857f3643e911d268c779b61777d3e854 /fs/btrfs/ioctl.c
parent4bcabaa30a63a156fc50026f972377dada66452c (diff)
downloadop-kernel-dev-7a865e8ac3a8ead776ea2c8c74fa2b2d00a2c9cf.zip
op-kernel-dev-7a865e8ac3a8ead776ea2c8c74fa2b2d00a2c9cf.tar.gz
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/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d2d5a5a..caea9ee 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1035,11 +1035,11 @@ out_fput:
return ret;
}
-static long btrfs_ioctl_clone_range(struct file *file, unsigned long argptr)
+static long btrfs_ioctl_clone_range(struct file *file, void __user *argp)
{
struct btrfs_ioctl_clone_range_args args;
- if (copy_from_user(&args, (void *)argptr, sizeof(args)))
+ if (copy_from_user(&args, argp, sizeof(args)))
return -EFAULT;
return btrfs_ioctl_clone(file, args.src_fd, args.src_offset,
args.src_length, args.dest_offset);
@@ -1137,7 +1137,7 @@ long btrfs_ioctl(struct file *file, unsigned int
case BTRFS_IOC_CLONE:
return btrfs_ioctl_clone(file, arg, 0, 0, 0);
case BTRFS_IOC_CLONE_RANGE:
- return btrfs_ioctl_clone_range(file, arg);
+ return btrfs_ioctl_clone_range(file, argp);
case BTRFS_IOC_TRANS_START:
return btrfs_ioctl_trans_start(file);
case BTRFS_IOC_TRANS_END:
OpenPOWER on IntegriCloud