diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-04-05 11:23:36 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-04-05 11:23:36 +0000 |
commit | 4318fbda2a7ee51caafdc4eb1f8028a3f0605142 (patch) | |
tree | cddb50a81d7d1a628cc400519162080c6d87868e /fs/pipe.c | |
parent | 36ea5120664550fae6d31f1c6f695e4f8975cb06 (diff) |
o Merge with Linux 2.1.91.
o First round of bugfixes for the SC/MC CPUs.
o FPU context switch fixes.
o Lazy context switches.
o Faster syscalls.
o Removed dead code.
o Shitloads of other things I forgot ...
Diffstat (limited to 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -46,11 +46,12 @@ static ssize_t pipe_read(struct file * filp, char * buf, if (filp->f_flags & O_NONBLOCK) { if (PIPE_LOCK(*inode)) return -EAGAIN; - if (PIPE_EMPTY(*inode)) + if (PIPE_EMPTY(*inode)) { if (PIPE_WRITERS(*inode)) return -EAGAIN; else return 0; + } } else while (PIPE_EMPTY(*inode) || PIPE_LOCK(*inode)) { if (PIPE_EMPTY(*inode)) { if (!PIPE_WRITERS(*inode)) @@ -485,8 +486,9 @@ int do_pipe(int *fd) f2->f_flags = O_WRONLY; f2->f_op = &write_pipe_fops; f2->f_mode = 2; - current->files->fd[i] = f1; - current->files->fd[j] = f2; + + fd_install(i, f1); + fd_install(j, f2); fd[0] = i; fd[1] = j; return 0; |