Date: Mon, 21 Nov 2011 16:06:23 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227796 - head/sys/fs/nfsclient Message-ID: <201111211606.pALG6NRt050059@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Mon Nov 21 16:06:23 2011 New Revision: 227796 URL: http://svn.freebsd.org/changeset/base/227796 Log: 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. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Mon Nov 21 15:33:37 2011 (r227795) +++ head/sys/fs/nfsclient/nfs_clstate.c Mon Nov 21 16:06:23 2011 (r227796) @@ -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?201111211606.pALG6NRt050059>