diff options
author | Christoph Hellwig <hch@lst.de> | 2008-12-02 06:36:08 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-12-02 06:36:08 -0500 |
commit | 4bcabaa30a63a156fc50026f972377dada66452c (patch) | |
tree | 4f6575aca5209748a716eeac2c3fb0bb0263daa5 /fs | |
parent | 97288f2c71e46965a2010baea10548fcb5f3af73 (diff) |
Btrfs: clean up btrfs_ioctl a little bit
Provide a void __user *argp pointer so that we can avoid duplicating
the cast for various sub-command calls.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index cc7c5161e269..d2d5a5a9b026 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1117,20 +1117,21 @@ long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; + void __user *argp = (void __user *)arg; switch (cmd) { case BTRFS_IOC_SNAP_CREATE: - return btrfs_ioctl_snap_create(file, (void __user *)arg, 0); + return btrfs_ioctl_snap_create(file, argp, 0); case BTRFS_IOC_SUBVOL_CREATE: - return btrfs_ioctl_snap_create(file, (void __user *)arg, 1); + return btrfs_ioctl_snap_create(file, argp, 1); case BTRFS_IOC_DEFRAG: return btrfs_ioctl_defrag(file); case BTRFS_IOC_RESIZE: - return btrfs_ioctl_resize(root, (void __user *)arg); + return btrfs_ioctl_resize(root, argp); case BTRFS_IOC_ADD_DEV: - return btrfs_ioctl_add_dev(root, (void __user *)arg); + return btrfs_ioctl_add_dev(root, argp); case BTRFS_IOC_RM_DEV: - return btrfs_ioctl_rm_dev(root, (void __user *)arg); + return btrfs_ioctl_rm_dev(root, argp); case BTRFS_IOC_BALANCE: return btrfs_balance(root->fs_info->dev_root); case BTRFS_IOC_CLONE: |