Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24 /block/ioctl.c

Filename:/block/ioctl.c
Lines Added:4
Lines Deleted:17
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4  2.6.24-rc3 
(Following) 2.6.26-git13  2.6.26-git14  2.6.26-git15  2.6.26-git16  2.6.26-git17  2.6.26-git18 

Location
[  2.6.24
  [  block
     o  ioctl.c

Patch

diff --git a/block/ioctl.c b/block/ioctl.c
index f7e3e8a..52d6385 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -217,6 +217,10 @@ int blkdev_driver_ioctl(struct inode *inode, struct file *file,
 }
 EXPORT_SYMBOL_GPL(blkdev_driver_ioctl);
 
+/*
+ * always keep this in sync with compat_blkdev_ioctl() and
+ * compat_blkdev_locked_ioctl()
+ */
 int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd,
          unsigned long arg)
 {
@@ -284,21 +288,4 @@ int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd,
 
    return blkdev_driver_ioctl(inode, file, disk, cmd, arg);
 }
-
-/* Most of the generic ioctls are handled in the normal fallback path.
-   This assumes the blkdev's low level compat_ioctl always returns
-   ENOIOCTLCMD for unknown ioctls. */
-long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
-{
-   struct block_device *bdev = file->f_path.dentry->d_inode->i_bdev;
-   struct gendisk *disk = bdev->bd_disk;
-   int ret = -ENOIOCTLCMD;
-   if (disk->fops->compat_ioctl) {
-      lock_kernel();
-      ret = disk->fops->compat_ioctl(file, cmd, arg);
-      unlock_kernel();
-   }
-   return ret;
-}
-
 EXPORT_SYMBOL_GPL(blkdev_ioctl);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.