Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal

From: Arnd Bergmann
Date: Mon Apr 26 2010 - 04:31:28 EST


On Sunday 25 April 2010 19:49:51 Linus Torvalds wrote:
> In the long run (this is a year from now, when we rename "unlocked_ioctl"
> back to just "ioctl"), the vfs_ioctl code will just do
>
> struct file_operations *fops = filp->f_op;
>
> if (!fops)
> return -ENOTTY;
>
> if (fops->ioctl) {
> int error = fops->ioctl(...)
> if (error == -ENOIOCTLCMD)
> error = -EINVAL;
> return error;
> }
> #ifdef CONFIG_BKL
> if (fops->bkl_ioctl) {
> int error;
> lock_kernel();
> error = fops->bkl_ioctl(...)
> unlock_kernel();
> return error;
> }
> #endif
> return -ENOTTY;

We could also stop playing games with with this and just kill the
locked variant of ioctl right away. No rename to bkl_ioctl, no
helper functions.

It's served it's purpose and we now have the list of 157 files
that still use fops->ioctl, so if we just push the BKL into those
files and make them use unlocked_ioctl, we will be able to remove
->ioctl for good. We can do the rename of ->unlocked_ioctl to
->ioctl right after that if you like, or in a year from now, I
don't care.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/