]> err.no Git - linux-2.6/commitdiff
Bluetooth VHCI: fasync BKL pushdown
authorJonathan Corbet <corbet@lwn.net>
Thu, 19 Jun 2008 22:07:51 +0000 (16:07 -0600)
committerJonathan Corbet <corbet@lwn.net>
Wed, 2 Jul 2008 21:06:28 +0000 (15:06 -0600)
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
drivers/bluetooth/hci_vhci.c

index 7734bc9af3ca706707a455b736825a1af4a698ea..d97700aa54a9b63edf66507e7592fdc9e6ca3937 100644 (file)
@@ -318,18 +318,21 @@ static int vhci_release(struct inode *inode, struct file *file)
 static int vhci_fasync(int fd, struct file *file, int on)
 {
        struct vhci_data *data = file->private_data;
-       int err;
+       int err = 0;
 
+       lock_kernel();
        err = fasync_helper(fd, file, on, &data->fasync);
        if (err < 0)
-               return err;
+               goto out;
 
        if (on)
                data->flags |= VHCI_FASYNC;
        else
                data->flags &= ~VHCI_FASYNC;
 
-       return 0;
+out:
+       unlock_kernel();
+       return err;
 }
 
 static const struct file_operations vhci_fops = {