Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/tmpfs tmpfs_read: respect MNT_NOATIME.



details:   https://anonhg.NetBSD.org/src/rev/3276b41a16de
branches:  trunk
changeset: 366606:3276b41a16de
user:      hannken <hannken%NetBSD.org@localhost>
date:      Wed Jun 01 08:42:38 2022 +0000

description:
tmpfs_read: respect MNT_NOATIME.

diffstat:

 sys/fs/tmpfs/tmpfs_vnops.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 60093cd1795f -r 3276b41a16de sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c        Wed Jun 01 06:18:04 2022 +0000
+++ b/sys/fs/tmpfs/tmpfs_vnops.c        Wed Jun 01 08:42:38 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_vnops.c,v 1.149 2022/03/27 16:24:57 christos Exp $       */
+/*     $NetBSD: tmpfs_vnops.c,v 1.150 2022/06/01 08:42:38 hannken Exp $        */
 
 /*
  * Copyright (c) 2005, 2006, 2007, 2020 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.149 2022/03/27 16:24:57 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.150 2022/06/01 08:42:38 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/dirent.h>
@@ -555,7 +555,9 @@
                    UBC_READ | UBC_PARTIALOK | UBC_VNODE_FLAGS(vp));
        }
 
-       tmpfs_update(vp, TMPFS_UPDATE_ATIME);
+       if ((vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
+               tmpfs_update(vp, TMPFS_UPDATE_ATIME);
+
        return error;
 }
 



Home | Main Index | Thread Index | Old Index