Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2017 20:05:48 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323978 - head/sys/fs/nfsserver
Message-ID:  <201709242005.v8OK5mwO018951@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sun Sep 24 20:05:48 2017
New Revision: 323978
URL: https://svnweb.freebsd.org/changeset/base/323978

Log:
  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.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c	Sun Sep 24 19:59:26 2017	(r323977)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c	Sun Sep 24 20:05:48 2017	(r323978)
@@ -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?201709242005.v8OK5mwO018951>