Author: rmacklem Date: Thu Jan 5 17:20:03 2012 New Revision: 229603 URL: http://svn.freebsd.org/changeset/base/229603
Log: MFC: r227744 Since the nfscl_cleanup() function isn't used by the FreeBSD NFSv4 client, delete the code and fix up the related comments. This should not have any functional effect on the client. 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 Thu Jan 5 17:14:13 2012 (r229602) +++ stable/8/sys/fs/nfsclient/nfs_clstate.c Thu Jan 5 17:20:03 2012 (r229603) @@ -64,8 +64,8 @@ __FBSDID("$FreeBSD$"); * the granularity of the OpenOwner, then code must be added to * serialize Ops on the OpenOwner.) * - When to get rid of OpenOwners and LockOwners. - * - When a process exits, it calls nfscl_cleanup(), which goes - * through the client list looking for all Open and Lock Owners. + * - The function nfscl_cleanup_common() is executed after a process exits. + * It goes through the client list looking for all Open and Lock Owners. * When one is found, it is marked "defunct" or in the case of * an OpenOwner without any Opens, freed. * The renew thread scans for defunct Owners and gets rid of them, @@ -1630,33 +1630,9 @@ nfscl_expireclient(struct nfsclclient *c } } -#ifndef __FreeBSD__ /* - * Called from exit() upon process termination. - */ -APPLESTATIC void -nfscl_cleanup(NFSPROC_T *p) -{ - struct nfsclclient *clp; - u_int8_t own[NFSV4CL_LOCKNAMELEN]; - - if (!nfscl_inited) - return; - nfscl_filllockowner(p->td_proc, own, F_POSIX); - - NFSLOCKCLSTATE(); - /* - * Loop through all the clientids, looking for the OpenOwners. - */ - LIST_FOREACH(clp, &nfsclhead, nfsc_list) - nfscl_cleanup_common(clp, own); - NFSUNLOCKCLSTATE(); -} -#endif /* !__FreeBSD__ */ - -/* - * Common code used by nfscl_cleanup() and nfscl_cleanupkext(). - * Must be called with CLSTATE lock held. + * This function must be called after the process represented by "own" has + * exited. Must be called with CLSTATE lock held. */ static void nfscl_cleanup_common(struct nfsclclient *clp, u_int8_t *own) @@ -1707,9 +1683,7 @@ nfscl_cleanup_common(struct nfsclclient #if defined(APPLEKEXT) || defined(__FreeBSD__) /* - * Simulate the call nfscl_cleanup() by looking for open owners associated - * with processes that no longer exist, since a call to nfscl_cleanup() - * can't be patched into exit(). + * Find open/lock owners for processes that have exited. */ static void nfscl_cleanupkext(struct nfsclclient *clp) @@ -2556,8 +2530,8 @@ tryagain: #if defined(APPLEKEXT) || defined(__FreeBSD__) /* - * Simulate the calls to nfscl_cleanup() when a process - * exits, since the call can't be patched into exit(). + * Call nfscl_cleanupkext() once per second to check for + * open/lock owners where the process has exited. */ { struct timespec mytime; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"