svn commit: r197039 - head/sys/nfsserver

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Sep 9 12:56:05 UTC 2009


Author: pjd
Date: Wed Sep  9 12:56:05 2009
New Revision: 197039
URL: http://svn.freebsd.org/changeset/base/197039

Log:
  Fix usecount leak in mknod(2) on file system exported over NFS.
  
  While I'm here, correct typo in comment.
  
  Reviewed by:	kan, kib
  MFC after:	3 days

Modified:
  head/sys/nfsserver/nfs_serv.c

Modified: head/sys/nfsserver/nfs_serv.c
==============================================================================
--- head/sys/nfsserver/nfs_serv.c	Wed Sep  9 12:19:43 2009	(r197038)
+++ head/sys/nfsserver/nfs_serv.c	Wed Sep  9 12:56:05 2009	(r197039)
@@ -1686,7 +1686,7 @@ out:
 	if (dirp) {
 		vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
 		diraft_ret = VOP_GETATTR(dirp, &diraft, cred);
-		VOP_UNLOCK(dirp, 0);
+		vput(drip);
 	}
 ereply:
 	nfsm_reply(NFSX_SRVFH(1) + NFSX_POSTOPATTR(1) + NFSX_WCCDATA(1));
@@ -3825,7 +3825,7 @@ nfsmout:
  *     what the heck.
  *
  * The exception to rule 2 is EPERM. If a file is IMMUTABLE, VOP_ACCESS()
- * will return EPERM instead of EACCESS. EPERM is always an error.
+ * will return EPERM instead of EACCES. EPERM is always an error.
  */
 static int
 nfsrv_access(struct vnode *vp, accmode_t accmode, struct ucred *cred,


More information about the svn-src-head mailing list