svn commit: r229678 - stable/9/sys/fs/nfsclient

Rick Macklem rmacklem at FreeBSD.org
Fri Jan 6 01:57:42 UTC 2012


Author: rmacklem
Date: Fri Jan  6 01:57:41 2012
New Revision: 229678
URL: http://svn.freebsd.org/changeset/base/229678

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/9/sys/fs/nfsclient/nfs_clstate.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clstate.c	Fri Jan  6 01:23:26 2012	(r229677)
+++ stable/9/sys/fs/nfsclient/nfs_clstate.c	Fri Jan  6 01:57:41 2012	(r229678)
@@ -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)


More information about the svn-src-stable-9 mailing list