summaryrefslogtreecommitdiffstats
path: root/fs/fifo.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2008-07-01 14:16:09 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:06 -0400
commitd2d9648ec6858e19d16a0b16da62534e85888653 (patch)
treeba3d66e3ed90ef56ec58e699beeb487db930375b /fs/fifo.c
parentd70b67c8bc72ee23b55381bd6a884f4796692f77 (diff)
downloadlinux-stable-d2d9648ec6858e19d16a0b16da62534e85888653.tar.gz
linux-stable-d2d9648ec6858e19d16a0b16da62534e85888653.tar.bz2
linux-stable-d2d9648ec6858e19d16a0b16da62534e85888653.zip
[PATCH] reuse xxx_fifo_fops for xxx_pipe_fops
Merge fifo and pipe file_operations. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fifo.c')
-rw-r--r--fs/fifo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fifo.c b/fs/fifo.c
index 9785e36f81e7..987bf9411495 100644
--- a/fs/fifo.c
+++ b/fs/fifo.c
@@ -57,7 +57,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
* POSIX.1 says that O_NONBLOCK means return with the FIFO
* opened, even when there is no process writing the FIFO.
*/
- filp->f_op = &read_fifo_fops;
+ filp->f_op = &read_pipefifo_fops;
pipe->r_counter++;
if (pipe->readers++ == 0)
wake_up_partner(inode);
@@ -86,7 +86,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
if ((filp->f_flags & O_NONBLOCK) && !pipe->readers)
goto err;
- filp->f_op = &write_fifo_fops;
+ filp->f_op = &write_pipefifo_fops;
pipe->w_counter++;
if (!pipe->writers++)
wake_up_partner(inode);
@@ -105,7 +105,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
* This implementation will NEVER block on a O_RDWR open, since
* the process can at least talk to itself.
*/
- filp->f_op = &rdwr_fifo_fops;
+ filp->f_op = &rdwr_pipefifo_fops;
pipe->readers++;
pipe->writers++;
@@ -151,5 +151,5 @@ err_nocleanup:
* depending on the access mode of the file...
*/
const struct file_operations def_fifo_fops = {
- .open = fifo_open, /* will set read or write pipe_fops */
+ .open = fifo_open, /* will set read_ or write_pipefifo_fops */
};