From d8d9b8f76f22b7a16a83e261e64f89ee611f49df Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 1 Jun 1997 03:16:17 +0000 Subject: Initial revision --- fs/pipe.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'fs/pipe.c') diff --git a/fs/pipe.c b/fs/pipe.c index 9cf3c7a6d..5fa5d6e91 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -74,7 +75,10 @@ static long pipe_read(struct inode * inode, struct file * filp, PIPE_LOCK(*inode)--; wake_up_interruptible(&PIPE_WAIT(*inode)); if (read) { - inode->i_atime = CURRENT_TIME; + if (DO_UPDATE_ATIME(inode)) { + inode->i_atime = CURRENT_TIME; + inode->i_dirt = 1; + } return read; } if (PIPE_WRITERS(*inode)) @@ -128,6 +132,7 @@ static long pipe_write(struct inode * inode, struct file * filp, free = 1; } inode->i_ctime = inode->i_mtime = CURRENT_TIME; + inode->i_dirt = 1; return written; } @@ -440,9 +445,9 @@ close_f12_inode: inode->i_count--; iput(inode); close_f12: - f2->f_count--; + put_filp(f2); close_f1: - f1->f_count--; + put_filp(f1); no_files: return error; } -- cgit v1.2.3