From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 5 01:25:47 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 97F4E106566C; Thu, 5 Jan 2012 01:25:47 +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 850D38FC13; Thu, 5 Jan 2012 01:25:47 +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 q051Plj6008078; Thu, 5 Jan 2012 01:25:47 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q051PlHt008075; Thu, 5 Jan 2012 01:25:47 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201050125.q051PlHt008075@svn.freebsd.org> From: Rick Macklem Date: Thu, 5 Jan 2012 01:25:47 +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: r229548 - in stable/9/sys/fs: nfs 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 01:25:47 -0000 Author: rmacklem Date: Thu Jan 5 01:25:47 2012 New Revision: 229548 URL: http://svn.freebsd.org/changeset/base/229548 Log: MFC: r227743 Post r223774 the NFSv4 client never uses the linked list with the head nfsc_defunctlockowner. This patch simply removes the code that loops through this always empty list, since the code no longer does anything useful. It should not have any effect on the client's behaviour. Modified: stable/9/sys/fs/nfs/nfsclstate.h 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/nfs/nfsclstate.h ============================================================================== --- stable/9/sys/fs/nfs/nfsclstate.h Thu Jan 5 01:14:35 2012 (r229547) +++ stable/9/sys/fs/nfs/nfsclstate.h Thu Jan 5 01:25:47 2012 (r229548) @@ -48,7 +48,6 @@ struct nfsclclient { struct nfsclownerhead nfsc_owner; struct nfscldeleghead nfsc_deleg; struct nfscldeleghash nfsc_deleghash[NFSCLDELEGHASHSIZE]; - struct nfscllockownerhead nfsc_defunctlockowner; struct nfsv4lock nfsc_lock; struct proc *nfsc_renewthread; struct nfsmount *nfsc_nmp; Modified: stable/9/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clstate.c Thu Jan 5 01:14:35 2012 (r229547) +++ stable/9/sys/fs/nfsclient/nfs_clstate.c Thu Jan 5 01:25:47 2012 (r229548) @@ -699,7 +699,6 @@ nfscl_getcl(vnode_t vp, struct ucred *cr { struct nfsclclient *clp; struct nfsclclient *newclp = NULL; - struct nfscllockowner *lp, *nlp; struct mount *mp; struct nfsmount *nmp; char uuid[HOSTUUIDLEN]; @@ -744,7 +743,6 @@ nfscl_getcl(vnode_t vp, struct ucred *cr TAILQ_INIT(&clp->nfsc_deleg); for (i = 0; i < NFSCLDELEGHASHSIZE; i++) LIST_INIT(&clp->nfsc_deleghash[i]); - LIST_INIT(&clp->nfsc_defunctlockowner); clp->nfsc_flags = NFSCLFLAGS_INITED; clp->nfsc_clientidrev = 1; clp->nfsc_cbident = nfscl_nextcbident(); @@ -793,11 +791,6 @@ nfscl_getcl(vnode_t vp, struct ucred *cr NFSUNLOCKCLSTATE(); return (EACCES); } - /* get rid of defunct lockowners */ - LIST_FOREACH_SAFE(lp, &clp->nfsc_defunctlockowner, nfsl_list, - nlp) { - nfscl_freelockowner(lp, 0); - } /* * If RFC3530 Sec. 14.2.33 is taken literally, * NFSERR_CLIDINUSE will be returned persistently for the @@ -1537,13 +1530,6 @@ nfscl_cleanclient(struct nfsclclient *cl { struct nfsclowner *owp, *nowp; struct nfsclopen *op, *nop; - struct nfscllockowner *lp, *nlp; - - - /* get rid of defunct lockowners */ - LIST_FOREACH_SAFE(lp, &clp->nfsc_defunctlockowner, nfsl_list, nlp) { - nfscl_freelockowner(lp, 0); - } /* Now, all the OpenOwners, etc. */ LIST_FOREACH_SAFE(owp, &clp->nfsc_owner, nfsow_list, nowp) { @@ -1717,12 +1703,6 @@ nfscl_cleanup_common(struct nfsclclient } owp = nowp; } - - /* and check the defunct list */ - LIST_FOREACH(lp, &clp->nfsc_defunctlockowner, nfsl_list) { - if (!NFSBCMP(lp->nfsl_owner, own, NFSV4CL_LOCKNAMELEN)) - lp->nfsl_defunct = 1; - } } #if defined(APPLEKEXT) || defined(__FreeBSD__) @@ -1735,7 +1715,6 @@ static void nfscl_cleanupkext(struct nfsclclient *clp) { struct nfsclowner *owp, *nowp; - struct nfscllockowner *lp; NFSPROCLISTLOCK(); NFSLOCKCLSTATE(); @@ -1743,12 +1722,6 @@ nfscl_cleanupkext(struct nfsclclient *cl if (nfscl_procdoesntexist(owp->nfsow_owner)) nfscl_cleanup_common(clp, owp->nfsow_owner); } - - /* and check the defunct list */ - LIST_FOREACH(lp, &clp->nfsc_defunctlockowner, nfsl_list) { - if (nfscl_procdoesntexist(lp->nfsl_owner)) - lp->nfsl_defunct = 1; - } NFSUNLOCKCLSTATE(); NFSPROCLISTUNLOCK(); } @@ -1905,11 +1878,6 @@ nfscl_recover(struct nfsclclient *clp, s NFSUNLOCKREQ(); splx(s); - /* get rid of defunct lockowners */ - LIST_FOREACH_SAFE(lp, &clp->nfsc_defunctlockowner, nfsl_list, nlp) { - nfscl_freelockowner(lp, 0); - } - /* * Now, mark all delegations "need reclaim". */ @@ -2157,7 +2125,6 @@ nfscl_recover(struct nfsclclient *clp, s APPLESTATIC int nfscl_hasexpired(struct nfsclclient *clp, u_int32_t clidrev, NFSPROC_T *p) { - struct nfscllockowner *lp, *nlp; struct nfsmount *nmp; struct ucred *cred; int igotlock = 0, error, trycnt; @@ -2207,12 +2174,6 @@ nfscl_hasexpired(struct nfsclclient *clp clp->nfsc_flags &= ~(NFSCLFLAGS_HASCLIENTID | NFSCLFLAGS_RECOVER); } else { - /* get rid of defunct lockowners */ - LIST_FOREACH_SAFE(lp, &clp->nfsc_defunctlockowner, nfsl_list, - nlp) { - nfscl_freelockowner(lp, 0); - } - /* * Expire the state for the client. */ @@ -2486,25 +2447,6 @@ nfscl_renewthread(struct nfsclclient *cl owp = nowp; } - /* also search the defunct list */ - lp = LIST_FIRST(&clp->nfsc_defunctlockowner); - while (lp != NULL) { - nlp = LIST_NEXT(lp, nfsl_list); - if (lp->nfsl_defunct) { - LIST_FOREACH(olp, &lh, nfsl_list) { - if (!NFSBCMP(olp->nfsl_owner, lp->nfsl_owner, - NFSV4CL_LOCKNAMELEN)) - break; - } - if (olp == NULL) { - LIST_REMOVE(lp, nfsl_list); - LIST_INSERT_HEAD(&lh, lp, nfsl_list); - } else { - nfscl_freelockowner(lp, 0); - } - } - lp = nlp; - } /* and release defunct lock owners */ LIST_FOREACH_SAFE(lp, &lh, nfsl_list, nlp) { nfscl_freelockowner(lp, 0);