Skip to content

Commit

Permalink
compat_ioctl: Remove BKL
Browse files Browse the repository at this point in the history
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 <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Arnd Bergmann committed Dec 10, 2009
1 parent fb07a5f commit 348c4b9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/compat_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 348c4b9

Please sign in to comment.