From 8ea551cff2e91400929514b9f6d376a750de21b4 Mon Sep 17 00:00:00 2001 From: Dave Hansen Date: Fri, 15 Feb 2008 14:37:53 -0800 Subject: [PATCH] --- yaml --- r: 90961 b: refs/heads/master c: ec82687f29127a954dd0da95dc1e0a4ce92b560c h: refs/heads/master i: 90959: f220275bec5219c4ac408b12b9b1cb8e78678f8d v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_iops.c | 7 ------- trunk/fs/xfs/linux-2.6/xfs_lrw.c | 9 ++++++++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index eab11cff33ae..3600a24f3add 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2f676cbc0d60ae806216c7a61c6971bd72dedde8 +refs/heads/master: ec82687f29127a954dd0da95dc1e0a4ce92b560c diff --git a/trunk/fs/xfs/linux-2.6/xfs_iops.c b/trunk/fs/xfs/linux-2.6/xfs_iops.c index 0c958cf77758..a1237dad6430 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_iops.c +++ b/trunk/fs/xfs/linux-2.6/xfs_iops.c @@ -155,13 +155,6 @@ xfs_ichgtime_fast( */ ASSERT((flags & XFS_ICHGTIME_ACC) == 0); - /* - * We're not supposed to change timestamps in readonly-mounted - * filesystems. Throw it away if anyone asks us. - */ - if (unlikely(IS_RDONLY(inode))) - return; - if (flags & XFS_ICHGTIME_MOD) { tvp = &inode->i_mtime; ip->i_d.di_mtime.t_sec = (__int32_t)tvp->tv_sec; diff --git a/trunk/fs/xfs/linux-2.6/xfs_lrw.c b/trunk/fs/xfs/linux-2.6/xfs_lrw.c index 21c0dbc74093..1ebd8004469c 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_lrw.c +++ b/trunk/fs/xfs/linux-2.6/xfs_lrw.c @@ -51,6 +51,7 @@ #include "xfs_vnodeops.h" #include +#include #include @@ -670,10 +671,16 @@ xfs_write( if (new_size > xip->i_size) xip->i_new_size = new_size; - if (likely(!(ioflags & IO_INVIS))) { + /* + * We're not supposed to change timestamps in readonly-mounted + * filesystems. Throw it away if anyone asks us. + */ + if (likely(!(ioflags & IO_INVIS) && + !mnt_want_write(file->f_path.mnt))) { file_update_time(file); xfs_ichgtime_fast(xip, inode, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); + mnt_drop_write(file->f_path.mnt); } /*