diff options
author | sandeen@sandeen.net <sandeen@sandeen.net> | 2008-11-25 21:20:06 -0600 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-02 17:08:01 +1100 |
commit | 743bb4650da9e2595d6cedd01c680b5b9398c74a (patch) | |
tree | d0bf4740672bdd77a7cd2dde0af7a564fcfe62d6 /fs/xfs/xfs_dfrag.c | |
parent | 0e446673a15a4e9c336b67c1a638eb12c21d0993 (diff) | |
download | linux-743bb4650da9e2595d6cedd01c680b5b9398c74a.tar.gz linux-743bb4650da9e2595d6cedd01c680b5b9398c74a.tar.bz2 linux-743bb4650da9e2595d6cedd01c680b5b9398c74a.zip |
[XFS] Move copy_from_user calls out of ioctl helpers into ioctl switch.
Moving the copy_from_user out of some of the ioctl helpers will
make it easier for the compat ioctl switch to copy in the right
struct, then just pass to the underlying helper.
Also, move common access checks into the helpers themselves,
and out of the native ioctl switch code, to reduce code
duplication between native & compat ioctl callers.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dfrag.c')
-rw-r--r-- | fs/xfs/xfs_dfrag.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 75b0cd4da0ea..b4c1ee713492 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c @@ -49,9 +49,8 @@ */ int xfs_swapext( - xfs_swapext_t __user *sxu) + xfs_swapext_t *sxp) { - xfs_swapext_t *sxp; xfs_inode_t *ip, *tip; struct file *file, *target_file; int error = 0; @@ -62,11 +61,6 @@ xfs_swapext( goto out; } - if (copy_from_user(sxp, sxu, sizeof(xfs_swapext_t))) { - error = XFS_ERROR(EFAULT); - goto out_free_sxp; - } - /* Pull information for the target fd */ file = fget((int)sxp->sx_fdtarget); if (!file) { |