nbd: use ->compat_ioctl()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 7 Jan 2016 15:04:37 +0000 (10:04 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 Jan 2016 02:20:32 +0000 (21:20 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/block/nbd.c
fs/compat_ioctl.c

index 93b3f99b6865fe721f7124412553cadf3c328e7a..e4c5cc1079344110298f0becd938d91b27685924 100644 (file)
@@ -827,6 +827,7 @@ static const struct block_device_operations nbd_fops =
 {
        .owner =        THIS_MODULE,
        .ioctl =        nbd_ioctl,
+       .compat_ioctl = nbd_ioctl,
 };
 
 #if IS_ENABLED(CONFIG_DEBUG_FS)
index 9144b779d10ef454d0f42bb15f7560878265b5ba..c9fca9c33ff112c89110e758c5a7aba1cf408698 100644 (file)
@@ -1305,12 +1305,6 @@ COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
 COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
 COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
 COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
-/* NBD */
-COMPATIBLE_IOCTL(NBD_DO_IT)
-COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
-COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
-COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
-COMPATIBLE_IOCTL(NBD_DISCONNECT)
 /* i2c */
 COMPATIBLE_IOCTL(I2C_SLAVE)
 COMPATIBLE_IOCTL(I2C_SLAVE_FORCE)
@@ -1529,11 +1523,6 @@ static long do_ioctl_trans(unsigned int cmd,
        case KDSKBMETA:
        case KDSKBLED:
        case KDSETLED:
-       /* NBD */
-       case NBD_SET_SOCK:
-       case NBD_SET_BLKSIZE:
-       case NBD_SET_SIZE:
-       case NBD_SET_SIZE_BLOCKS:
                return vfs_ioctl(file, cmd, arg);
        }