Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2012 02:23:33 +0000 (UTC)
From:      Rick Macklem <rmacklem@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: r229679 - stable/8/sys/fs/nfsclient
Message-ID:  <201201060223.q062NXsd067279@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Fri Jan  6 02:23:33 2012
New Revision: 229679
URL: http://svn.freebsd.org/changeset/base/229679

Log:
  MFC: r227796
  Clean up some cruft in the NFSv4 client left over from the
  OpenBSD port, so that it is more readable. No logic change
  is made by this commit.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clstate.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (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)

Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Jan  6 01:57:41 2012	(r229678)
+++ stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Jan  6 02:23:33 2012	(r229679)
@@ -1681,7 +1681,6 @@ nfscl_cleanup_common(struct nfsclclient 
 	}
 }
 
-#if defined(APPLEKEXT) || defined(__FreeBSD__)
 /*
  * Find open/lock owners for processes that have exited.
  */
@@ -1699,7 +1698,6 @@ nfscl_cleanupkext(struct nfsclclient *cl
 	NFSUNLOCKCLSTATE();
 	NFSPROCLISTUNLOCK();
 }
-#endif	/* APPLEKEXT || __FreeBSD__ */
 
 static int	fake_global;	/* Used to force visibility of MNTK_UNMOUNTF */
 /*
@@ -2341,6 +2339,8 @@ nfscl_renewthread(struct nfsclclient *cl
 	u_int32_t clidrev;
 	int error, cbpathdown, islept, igotlock, ret, clearok;
 	uint32_t recover_done_time = 0;
+	struct timespec mytime;
+	static time_t prevsec = 0;
 
 	cred = newnfs_getcred();
 	NFSLOCKCLSTATE();
@@ -2528,22 +2528,15 @@ tryagain:
 			FREE((caddr_t)dp, M_NFSCLDELEG);
 		}
 
-#if defined(APPLEKEXT) || defined(__FreeBSD__)
 		/*
 		 * Call nfscl_cleanupkext() once per second to check for
 		 * open/lock owners where the process has exited.
 		 */
-		{
-			struct timespec mytime;
-			static time_t prevsec = 0;
-
-			NFSGETNANOTIME(&mytime);
-			if (prevsec != mytime.tv_sec) {
-				prevsec = mytime.tv_sec;
-				nfscl_cleanupkext(clp);
-			}
+		NFSGETNANOTIME(&mytime);
+		if (prevsec != mytime.tv_sec) {
+			prevsec = mytime.tv_sec;
+			nfscl_cleanupkext(clp);
 		}
-#endif	/* APPLEKEXT || __FreeBSD__ */
 
 		NFSLOCKCLSTATE();
 		if ((clp->nfsc_flags & NFSCLFLAGS_RECOVER) == 0)



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