aboutsummaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 16:14:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 16:14:02 -0700
commit8e9d2089723d08d51e66c5eea49253d76e27941e (patch)
treecf15609d5eeb0c1f3a39231d8ce793d3c8ad0ed0 /drivers/char
parentba1eb95cf3cc666769afe42eaa15a3a34ae82f94 (diff)
parent60aa49243d09afc873f082567d2e3c16634ced84 (diff)
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6: Rationalize fasync return values Move FASYNC bit handling to f_op->fasync() Use f_lock to protect f_flags Rename struct file->f_ep_lock
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/sonypi.c7
-rw-r--r--drivers/char/tty_io.c5
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index f4374437a03..fd3dced9777 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -888,12 +888,7 @@ found:
static int sonypi_misc_fasync(int fd, struct file *filp, int on)
{
- int retval;
-
- retval = fasync_helper(fd, filp, on, &sonypi_device.fifo_async);
- if (retval < 0)
- return retval;
- return 0;
+ return fasync_helper(fd, filp, on, &sonypi_device.fifo_async);
}
static int sonypi_misc_release(struct inode *inode, struct file *file)
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index bc84e125c6b..224f271d8cb 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2162,13 +2162,12 @@ static int fionbio(struct file *file, int __user *p)
if (get_user(nonblock, p))
return -EFAULT;
- /* file->f_flags is still BKL protected in the fs layer - vomit */
- lock_kernel();
+ spin_lock(&file->f_lock);
if (nonblock)
file->f_flags |= O_NONBLOCK;
else
file->f_flags &= ~O_NONBLOCK;
- unlock_kernel();
+ spin_unlock(&file->f_lock);
return 0;
}