summaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 5007652d1..df5a8efc7 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -651,9 +651,7 @@ static inline ssize_t do_tty_write(
ssize_t ret = 0, written = 0;
struct inode *inode = file->f_dentry->d_inode;
- up(&inode->i_sem);
- if (down_interruptible(&inode->i_atomic_write)) {
- down(&inode->i_sem);
+ if (down_interruptible(&inode->i_sem)) {
return -ERESTARTSYS;
}
for (;;) {
@@ -678,8 +676,7 @@ static inline ssize_t do_tty_write(
file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
ret = written;
}
- up(&inode->i_atomic_write);
- down(&inode->i_sem);
+ up(&inode->i_sem);
return ret;
}