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:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"