Signed-off-by: Andi Kleen Index: linux/include/linux/fs.h =================================================================== --- linux.orig/include/linux/fs.h +++ linux/include/linux/fs.h @@ -1115,12 +1115,17 @@ int generic_osync_inode(struct inode *, */ typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); +union ioctl_arg { + long l; + void __user *f; +} __attribute__((transparent_union)); + struct block_device_operations { int (*open) (struct inode *, struct file *); int (*release) (struct inode *, struct file *); int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); - long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); - long (*compat_ioctl) (struct file *, unsigned, unsigned long); + long (*unlocked_ioctl) (struct file *, unsigned, union ioctl_arg a); + long (*compat_ioctl) (struct file *, unsigned, union ioctl_arg a); int (*direct_access) (struct block_device *, sector_t, unsigned long *); int (*media_changed) (struct gendisk *); int (*revalidate_disk) (struct gendisk *);