Previously, only the inode's idea of a read-only flag was considered
for touch_atime() and file_update_time(). Add a call to the
MNT_IS_RDONLY macro to correctly exclude this update on read-only
vfsmounts.
---
fs/inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index d0be615..2d26a4e 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1190,7 +1190,7 @@ void touch_atime(struct vfsmount *mnt, s
struct inode *inode = dentry->d_inode;
struct timespec now;
- if (IS_RDONLY(inode))
+ if (IS_RDONLY(inode) || MNT_IS_RDONLY(mnt))
return;
if ((inode->i_flags & S_NOATIME) ||
@@ -1235,7 +1235,7 @@ void file_update_time(struct file *file)
if (IS_NOCMTIME(inode))
return;
- if (IS_RDONLY(inode))
+ if (IS_RDONLY(inode) || MNT_IS_RDONLY(file->f_vfsmnt))
return;
now = current_fs_time(inode->i_sb);
_______________________________________________
Vserver mailing list
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver