Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2017 21:20:26 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r324419 - stable/11/sys/fs/nfsserver
Message-ID:  <201710082120.v98LKQ2u087748@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sun Oct  8 21:20:25 2017
New Revision: 324419
URL: https://svnweb.freebsd.org/changeset/base/324419

Log:
  MFC: r323978
  Change a panic to an error return.
  
  There was a panic() in the NFS server's write operation that didn't
  need to be a panic() and could just be an error return.
  This patch makes that change.
  Found by code inspection during development of the pNFS service.

Modified:
  stable/11/sys/fs/nfsserver/nfs_nfsdserv.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- stable/11/sys/fs/nfsserver/nfs_nfsdserv.c	Sun Oct  8 20:55:45 2017	(r324418)
+++ stable/11/sys/fs/nfsserver/nfs_nfsdserv.c	Sun Oct  8 21:20:25 2017	(r324419)
@@ -921,7 +921,7 @@ nfsrvd_write(struct nfsrv_descript *nd, __unused int i
 		    nd->nd_md, nd->nd_dpos, nd->nd_cred, p);
 		error = nfsm_advance(nd, NFSM_RNDUP(retlen), -1);
 		if (error)
-			panic("nfsrv_write mbuf");
+			goto nfsmout;
 	}
 	if (nd->nd_flag & ND_NFSV4)
 		aftat_ret = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710082120.v98LKQ2u087748>