mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-06 06:35:12 +00:00
Bluetooth VHCI: fasync BKL pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
5d1e3230f4
commit
dbfb2df7e9
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
static int vhci_fasync(int fd, struct file *file, int on)
|
||||||
{
|
{
|
||||||
struct vhci_data *data = file->private_data;
|
struct vhci_data *data = file->private_data;
|
||||||
int err;
|
int err = 0;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
err = fasync_helper(fd, file, on, &data->fasync);
|
err = fasync_helper(fd, file, on, &data->fasync);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
goto out;
|
||||||
|
|
||||||
if (on)
|
if (on)
|
||||||
data->flags |= VHCI_FASYNC;
|
data->flags |= VHCI_FASYNC;
|
||||||
else
|
else
|
||||||
data->flags &= ~VHCI_FASYNC;
|
data->flags &= ~VHCI_FASYNC;
|
||||||
|
|
||||||
return 0;
|
out:
|
||||||
|
unlock_kernel();
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct file_operations vhci_fops = {
|
static const struct file_operations vhci_fops = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue