ext3/ioctl.c: silence sparse warnings about different address spaces
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 10 Jun 2011 21:59:05 +0000 (14:59 -0700)
committerJan Kara <jack@suse.cz>
Sat, 25 Jun 2011 15:29:53 +0000 (17:29 +0200)
The 'from' argument for copy_from_user and the 'to' argument for
copy_to_user should both be tagged as __user address space.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/ioctl.c

index f4090bd..c7f4394 100644 (file)
@@ -285,7 +285,7 @@ group_add_out:
                if (!capable(CAP_SYS_ADMIN))
                        return -EPERM;
 
-               if (copy_from_user(&range, (struct fstrim_range *)arg,
+               if (copy_from_user(&range, (struct fstrim_range __user *)arg,
                                   sizeof(range)))
                        return -EFAULT;
 
@@ -293,7 +293,7 @@ group_add_out:
                if (ret < 0)
                        return ret;
 
-               if (copy_to_user((struct fstrim_range *)arg, &range,
+               if (copy_to_user((struct fstrim_range __user *)arg, &range,
                                 sizeof(range)))
                        return -EFAULT;