From owner-svn-src-stable-10@FreeBSD.ORG Wed May 7 22:33:37 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96CEFF6D; Wed, 7 May 2014 22:33:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 697788D5; Wed, 7 May 2014 22:33:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47MXbeo026357; Wed, 7 May 2014 22:33:37 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47MXb41026356; Wed, 7 May 2014 22:33:37 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201405072233.s47MXb41026356@svn.freebsd.org> From: Rick Macklem Date: Wed, 7 May 2014 22:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265621 - stable/10/sys/fs/nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 22:33:37 -0000 Author: rmacklem Date: Wed May 7 22:33:36 2014 New Revision: 265621 URL: http://svnweb.freebsd.org/changeset/base/265621 Log: MFC: r264845 Remove an unnecessary level of indirection for an argument. This simplifies the code and should avoid the clang sparc port from generating an abort() call. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 7 22:27:03 2014 (r265620) +++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 7 22:33:36 2014 (r265621) @@ -79,7 +79,7 @@ static int nfsrv_getstate(struct nfsclie static void nfsrv_getowner(struct nfsstatehead *hp, struct nfsstate *new_stp, struct nfsstate **stpp); static int nfsrv_getlockfh(vnode_t vp, u_short flags, - struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p); + struct nfslockfile *new_lfp, fhandle_t *nfhp, NFSPROC_T *p); static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit); static void nfsrv_insertlock(struct nfslock *new_lop, @@ -1985,7 +1985,7 @@ tryagain: MALLOC(new_lfp, struct nfslockfile *, sizeof (struct nfslockfile), M_NFSDLOCKFILE, M_WAITOK); if (vp) - getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, &new_lfp, + getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp, NULL, p); NFSLOCKSTATE(); /* @@ -2235,7 +2235,7 @@ tryagain: M_NFSDSTATE, M_WAITOK); MALLOC(new_deleg, struct nfsstate *, sizeof (struct nfsstate), M_NFSDSTATE, M_WAITOK); - getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, &new_lfp, + getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp, NULL, p); NFSLOCKSTATE(); /* @@ -3142,11 +3142,10 @@ out: * Get the file handle for a lock structure. */ static int -nfsrv_getlockfh(vnode_t vp, u_short flags, - struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p) +nfsrv_getlockfh(vnode_t vp, u_short flags, struct nfslockfile *new_lfp, + fhandle_t *nfhp, NFSPROC_T *p) { fhandle_t *fhp = NULL; - struct nfslockfile *new_lfp; int error; /* @@ -3154,7 +3153,7 @@ nfsrv_getlockfh(vnode_t vp, u_short flag * a fhandle_t on the stack. */ if (flags & NFSLCK_OPEN) { - new_lfp = *new_lfpp; + KASSERT(new_lfp != NULL, ("nfsrv_getlockfh: new_lfp NULL")); fhp = &new_lfp->lf_fh; } else if (nfhp) { fhp = nfhp;