summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2009-09-09 12:56:05 +0000
committerpjd <pjd@FreeBSD.org>2009-09-09 12:56:05 +0000
commitef2355e38dee27c7da3c4f527ae1bb926242b519 (patch)
tree4b149eb5f92fdfc1b67150eeb455d14f31bbec40 /sys/nfsserver
parent7a991968f269912366e4d3bdc20512ba61249fc8 (diff)
downloadFreeBSD-src-ef2355e38dee27c7da3c4f527ae1bb926242b519.zip
FreeBSD-src-ef2355e38dee27c7da3c4f527ae1bb926242b519.tar.gz
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
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_serv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 00be15e..0df26ba 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -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,
OpenPOWER on IntegriCloud