Re: [PATCH] Support compat_ioctl for block devices

2005-01-18 Thread Andi Kleen
On Tue, Jan 18, 2005 at 09:36:45AM +, Christoph Hellwig wrote: > On Tue, Jan 18, 2005 at 10:31:58AM +0100, Andi Kleen wrote: > > > - please don't introduce a new API with the BKL held. > > > > Nope, I'm not going to audit zillions of low level functions for this. > > So just stick a lock_ker

Re: [PATCH] Support compat_ioctl for block devices

2005-01-18 Thread Christoph Hellwig
On Tue, Jan 18, 2005 at 10:31:58AM +0100, Andi Kleen wrote: > > - please don't introduce a new API with the BKL held. > > Nope, I'm not going to audit zillions of low level functions for this. So just stick a lock_kernel() unlock_kernel() into the handler, it's not like there's more than a handf

Re: [PATCH] Support compat_ioctl for block devices

2005-01-18 Thread Andi Kleen
On Tue, Jan 18, 2005 at 09:19:27AM +, Christoph Hellwig wrote: > > +long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long > > arg) > > +{ > > + struct block_device *bdev = file->f_dentry->d_inode->i_bdev; > > + struct gendisk *disk = bdev->bd_disk; > > + int ret = -ENOI

Re: [PATCH] Support compat_ioctl for block devices

2005-01-18 Thread Christoph Hellwig
> +long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) > +{ > + struct block_device *bdev = file->f_dentry->d_inode->i_bdev; > + struct gendisk *disk = bdev->bd_disk; > + int ret = -ENOIOCTLCMD; > + if (disk->fops->compat_ioctl) { > + lock_kernel

[PATCH] Support compat_ioctl for block devices

2005-01-17 Thread Andi Kleen
Support passing down of compat_ioctl on block devices. This is needed for the compat_ioctl conversion of block drivers. Signed-off-by: Andi Kleen <[EMAIL PROTECTED]> diff -u linux-2.6.11-rc1-bk4/drivers/block/ioctl.c-o linux-2.6.11-rc1-bk4/drivers/block/ioctl.c --- linux-2.6.11-rc1-bk4/drivers/b