]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Call fasync() functions without the BKL
authorJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 15:12:01 +0000 (09:12 -0600)
committerJonathan Corbet <corbet@lwn.net>
Wed, 2 Jul 2008 21:06:28 +0000 (15:06 -0600)
lock_kernel() calls have been pushed down into code which needs it, so
there is no need to take the BKL at this level anymore.

This work inspired and aided by Andi Kleen's unlocked_fasync() patches.

Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
fs/fcntl.c

index bfd776509a7271e324c5559397542c36c4564a34..330a7d7825915f591fa89ca74d8e63fa4efe07f4 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/fdtable.h>
 #include <linux/capability.h>
 #include <linux/dnotify.h>
-#include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/security.h>
@@ -227,7 +226,6 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
        if (error)
                return error;
 
-       lock_kernel();
        if ((arg ^ filp->f_flags) & FASYNC) {
                if (filp->f_op && filp->f_op->fasync) {
                        error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
@@ -238,7 +236,6 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
 
        filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
  out:
-       unlock_kernel();
        return error;
 }