From owner-svn-src-stable@FreeBSD.ORG Fri Dec 18 19:50:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE4A1065749; Fri, 18 Dec 2009 19:50:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E9498FC19; Fri, 18 Dec 2009 19:50:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBIJolk3006547; Fri, 18 Dec 2009 19:50:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBIJolIT006545; Fri, 18 Dec 2009 19:50:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200912181950.nBIJolIT006545@svn.freebsd.org> From: John Baldwin Date: Fri, 18 Dec 2009 19:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200682 - stable/6/sys/nfsserver X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Dec 2009 19:50:47 -0000 Author: jhb Date: Fri Dec 18 19:50:47 2009 New Revision: 200682 URL: http://svn.freebsd.org/changeset/base/200682 Log: MFC 200084: Properly return an error reply if an NFS remove or link operation fails. Previously the failing operation would allocate an mbuf and construct an error reply, but because the function did not return 0, the NFS server assumed it had failed to generate a reply and would leak the reply mbuf as well as not sending the reply to the NFS client. Modified: stable/6/sys/nfsserver/nfs_serv.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/6/sys/nfsserver/nfs_serv.c Fri Dec 18 19:50:21 2009 (r200681) +++ stable/6/sys/nfsserver/nfs_serv.c Fri Dec 18 19:50:47 2009 (r200682) @@ -2339,10 +2339,9 @@ out: ereply: NFSD_LOCK_ASSERT(); nfsm_reply(NFSX_WCCDATA(v3)); - if (v3) { + if (v3) nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); - error = 0; - } + error = 0; nfsmout: NFSD_LOCK_ASSERT(); NFSD_UNLOCK(); @@ -2751,8 +2750,8 @@ ereply: if (v3) { nfsm_srvpostop_attr(getret, &at); nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); - error = 0; } + error = 0; /* fall through */ nfsmout: