Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Oct 2014 15:31:54 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r273255 - in stable/10/sys: fs/ext2fs fs/msdosfs ufs/ffs
Message-ID:  <201410181531.s9IFVsgX003520@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Oct 18 15:31:53 2014
New Revision: 273255
URL: https://svnweb.freebsd.org/changeset/base/273255

Log:
  MFC r272952:
  Do not set IN_ACCESS flag for read-only mounts.

Modified:
  stable/10/sys/fs/ext2fs/ext2_vnops.c
  stable/10/sys/fs/msdosfs/msdosfs_vnops.c
  stable/10/sys/ufs/ffs/ffs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_vnops.c	Sat Oct 18 15:28:01 2014	(r273254)
+++ stable/10/sys/fs/ext2fs/ext2_vnops.c	Sat Oct 18 15:31:53 2014	(r273255)
@@ -1763,7 +1763,7 @@ ext2_ind_read(struct vop_read_args *ap)
 	}
 
 	if ((error == 0 || uio->uio_resid != orig_resid) &&
-	    (vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
+	    (vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0)
 		ip->i_flag |= IN_ACCESS;
 	return (error);
 }

Modified: stable/10/sys/fs/msdosfs/msdosfs_vnops.c
==============================================================================
--- stable/10/sys/fs/msdosfs/msdosfs_vnops.c	Sat Oct 18 15:28:01 2014	(r273254)
+++ stable/10/sys/fs/msdosfs/msdosfs_vnops.c	Sat Oct 18 15:31:53 2014	(r273255)
@@ -642,7 +642,7 @@ msdosfs_read(ap)
 		brelse(bp);
 	} while (error == 0 && uio->uio_resid > 0 && n != 0);
 	if (!isadir && (error == 0 || uio->uio_resid != orig_resid) &&
-	    (vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
+	    (vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0)
 		dep->de_flag |= DE_ACCESS;
 	return (error);
 }

Modified: stable/10/sys/ufs/ffs/ffs_vnops.c
==============================================================================
--- stable/10/sys/ufs/ffs/ffs_vnops.c	Sat Oct 18 15:28:01 2014	(r273254)
+++ stable/10/sys/ufs/ffs/ffs_vnops.c	Sat Oct 18 15:31:53 2014	(r273255)
@@ -628,7 +628,7 @@ ffs_read(ap)
 	}
 
 	if ((error == 0 || uio->uio_resid != orig_resid) &&
-	    (vp->v_mount->mnt_flag & MNT_NOATIME) == 0 &&
+	    (vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0 &&
 	    (ip->i_flag & IN_ACCESS) == 0) {
 		VI_LOCK(vp);
 		ip->i_flag |= IN_ACCESS;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410181531.s9IFVsgX003520>