From: Arnd Bergmann Date: Fri, 16 Oct 2009 00:25:25 +0000 (+0200) Subject: compat_ioctl: Remove BKL X-Git-Tag: v2.6.33-rc1~300^2~6 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=348c4b9078ba8d9bef2e453c7ded07fde4748c79 compat_ioctl: Remove BKL We have always called ioctl conversion handlers under the big kernel lock, although that is generally not necessary. In particular it is not needed for conversion of data structures and for calling sys_ioctl or do_vfs_ioctl, which will get the BKL again if needed. Handlers doing more than those two have been moved out, so we can kill off the BKL from compat_sys_ioctl. This may significantly improve latencies with 32 bit applications, and it avoids a common scenario where a thread acquires the BKL twice. Signed-off-by: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton --- diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 6ad1c56..a383424 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -1918,9 +1918,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, found_handler: if (t->handler) { - lock_kernel(); error = t->handler(fd, cmd, arg, filp); - unlock_kernel(); goto out_fput; }