diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-21 14:17:22 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-02-21 14:17:22 -0500 |
commit | 5f854cfc024622e4aae14d7cf422f6ff86278688 (patch) | |
tree | 426e77c6f6e4939c80440bf1fabcb020e3ee145b /block/compat_ioctl.c | |
parent | cc24da0742870f152ddf1002aa39dfcd83f7cf9c (diff) | |
parent | 4ec62b2b2e6bd7ddef7b6cea6e5db7b5578a6532 (diff) |
Forward to 2.6.33-rc8
Merge branch 'linus' into rt/head with a pile of conflicts.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'block/compat_ioctl.c')
-rw-r--r-- | block/compat_ioctl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index 7865a34e0faa..4eb8e9ea4af5 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c | |||
@@ -21,6 +21,11 @@ static int compat_put_int(unsigned long arg, int val) | |||
21 | return put_user(val, (compat_int_t __user *)compat_ptr(arg)); | 21 | return put_user(val, (compat_int_t __user *)compat_ptr(arg)); |
22 | } | 22 | } |
23 | 23 | ||
24 | static int compat_put_uint(unsigned long arg, unsigned int val) | ||
25 | { | ||
26 | return put_user(val, (compat_uint_t __user *)compat_ptr(arg)); | ||
27 | } | ||
28 | |||
24 | static int compat_put_long(unsigned long arg, long val) | 29 | static int compat_put_long(unsigned long arg, long val) |
25 | { | 30 | { |
26 | return put_user(val, (compat_long_t __user *)compat_ptr(arg)); | 31 | return put_user(val, (compat_long_t __user *)compat_ptr(arg)); |
@@ -734,6 +739,16 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) | |||
734 | switch (cmd) { | 739 | switch (cmd) { |
735 | case HDIO_GETGEO: | 740 | case HDIO_GETGEO: |
736 | return compat_hdio_getgeo(disk, bdev, compat_ptr(arg)); | 741 | return compat_hdio_getgeo(disk, bdev, compat_ptr(arg)); |
742 | case BLKPBSZGET: | ||
743 | return compat_put_uint(arg, bdev_physical_block_size(bdev)); | ||
744 | case BLKIOMIN: | ||
745 | return compat_put_uint(arg, bdev_io_min(bdev)); | ||
746 | case BLKIOOPT: | ||
747 | return compat_put_uint(arg, bdev_io_opt(bdev)); | ||
748 | case BLKALIGNOFF: | ||
749 | return compat_put_int(arg, bdev_alignment_offset(bdev)); | ||
750 | case BLKDISCARDZEROES: | ||
751 | return compat_put_uint(arg, bdev_discard_zeroes_data(bdev)); | ||
737 | case BLKFLSBUF: | 752 | case BLKFLSBUF: |
738 | case BLKROSET: | 753 | case BLKROSET: |
739 | case BLKDISCARD: | 754 | case BLKDISCARD: |