Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Feb 2012 18:07:24 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r231774 - stable/8/sys/fs/tmpfs
Message-ID:  <201202151807.q1FI7O39074410@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Wed Feb 15 18:07:24 2012
New Revision: 231774
URL: http://svn.freebsd.org/changeset/base/231774

Log:
  MFC r218949
    Eliminate two dubious attempts at optimizing the implementation of a
    file's last accessed, modified, and changed times.

Modified:
  stable/8/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/fs/tmpfs/tmpfs_vnops.c
==============================================================================
--- stable/8/sys/fs/tmpfs/tmpfs_vnops.c	Wed Feb 15 17:46:16 2012	(r231773)
+++ stable/8/sys/fs/tmpfs/tmpfs_vnops.c	Wed Feb 15 18:07:24 2012	(r231774)
@@ -265,19 +265,12 @@ tmpfs_close(struct vop_close_args *v)
 {
 	struct vnode *vp = v->a_vp;
 
-	struct tmpfs_node *node;
-
 	MPASS(VOP_ISLOCKED(vp));
 
-	node = VP_TO_TMPFS_NODE(vp);
-
-	if (node->tn_links > 0) {
-		/* Update node times.  No need to do it if the node has
-		 * been deleted, because it will vanish after we return. */
-		tmpfs_update(vp);
-	}
+	/* Update node times. */
+	tmpfs_update(vp);
 
-	return 0;
+	return (0);
 }
 
 /* --------------------------------------------------------------------- */
@@ -822,8 +815,7 @@ tmpfs_remove(struct vop_remove_args *v)
 	 * reclaimed. */
 	tmpfs_free_dirent(tmp, de, TRUE);
 
-	if (node->tn_links > 0)
-		node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED;
+	node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED;
 	error = 0;
 
 out:



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