diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 19:14:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 19:14:02 -0400 |
commit | 8e9d2089723d08d51e66c5eea49253d76e27941e (patch) | |
tree | cf15609d5eeb0c1f3a39231d8ce793d3c8ad0ed0 /drivers/char | |
parent | ba1eb95cf3cc666769afe42eaa15a3a34ae82f94 (diff) | |
parent | 60aa49243d09afc873f082567d2e3c16634ced84 (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.c | 7 | ||||
-rw-r--r-- | drivers/char/tty_io.c | 5 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index f4374437a033..fd3dced97776 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -888,12 +888,7 @@ found: | |||
888 | 888 | ||
889 | static int sonypi_misc_fasync(int fd, struct file *filp, int on) | 889 | static int sonypi_misc_fasync(int fd, struct file *filp, int on) |
890 | { | 890 | { |
891 | int retval; | 891 | return fasync_helper(fd, filp, on, &sonypi_device.fifo_async); |
892 | |||
893 | retval = fasync_helper(fd, filp, on, &sonypi_device.fifo_async); | ||
894 | if (retval < 0) | ||
895 | return retval; | ||
896 | return 0; | ||
897 | } | 892 | } |
898 | 893 | ||
899 | static int sonypi_misc_release(struct inode *inode, struct file *file) | 894 | 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 bc84e125c6bc..224f271d8cbe 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) | |||
2162 | if (get_user(nonblock, p)) | 2162 | if (get_user(nonblock, p)) |
2163 | return -EFAULT; | 2163 | return -EFAULT; |
2164 | 2164 | ||
2165 | /* file->f_flags is still BKL protected in the fs layer - vomit */ | 2165 | spin_lock(&file->f_lock); |
2166 | lock_kernel(); | ||
2167 | if (nonblock) | 2166 | if (nonblock) |
2168 | file->f_flags |= O_NONBLOCK; | 2167 | file->f_flags |= O_NONBLOCK; |
2169 | else | 2168 | else |
2170 | file->f_flags &= ~O_NONBLOCK; | 2169 | file->f_flags &= ~O_NONBLOCK; |
2171 | unlock_kernel(); | 2170 | spin_unlock(&file->f_lock); |
2172 | return 0; | 2171 | return 0; |
2173 | } | 2172 | } |
2174 | 2173 | ||