lkml.org 
[lkml]   [2003]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.4 bug: fifo-write causes diskwrites to read-only fs !
"Stephen C. Tweedie" <sct@redhat.com> wrote:
>
> It's pure cut-and-paste from the update_atime immediately above it. But
> sure, we can clean them both up while we're at it if you want.

2.5 seems to have gained a handy library function.

diff -puN fs/pipe.c~pipe-rofs-fix fs/pipe.c
--- 25/fs/pipe.c~pipe-rofs-fix 2003-05-30 09:33:29.000000000 -0700
+++ 25-akpm/fs/pipe.c 2003-05-30 09:34:08.000000000 -0700
@@ -208,10 +208,8 @@ pipe_write(struct file *filp, const char
wake_up_interruptible(PIPE_WAIT(*inode));
kill_fasync(PIPE_FASYNC_READERS(*inode), SIGIO, POLL_IN);
}
- if (ret > 0) {
- inode->i_ctime = inode->i_mtime = CURRENT_TIME;
- mark_inode_dirty(inode);
- }
+ if (ret > 0)
+ inode_update_time(inode, 1); /* mtime and ctime */
return ret;
}

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.321 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site