Re: 2.4 bug: fifo-write causes diskwrites to read-only fs !

From: Andrew Morton (akpm@digeo.com)
Date: Fri May 30 2003 - 11:41:02 EST


"Stephen C. Tweedie" <sct@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/