From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 5 16:43:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F7D106566C; Thu, 5 Jan 2012 16:43:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD3B68FC14; Thu, 5 Jan 2012 16:43:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q05Ghsqd044767; Thu, 5 Jan 2012 16:43:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q05GhsHc044765; Thu, 5 Jan 2012 16:43:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201051643.q05GhsHc044765@svn.freebsd.org> From: Rick Macklem Date: Thu, 5 Jan 2012 16:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229599 - stable/9/sys/fs/nfsclient X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2012 16:43:55 -0000 Author: rmacklem Date: Thu Jan 5 16:43:54 2012 New Revision: 229599 URL: http://svn.freebsd.org/changeset/base/229599 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/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 Thu Jan 5 16:27:32 2012 (r229598) +++ stable/9/sys/fs/nfsclient/nfs_clstate.c Thu Jan 5 16:43:54 2012 (r229599) @@ -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;