summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-04-09 23:55:27 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-04-09 23:55:27 +0000
commitb00af5ce750271b112281f4714c4a1a8b2992cf3 (patch)
tree8219576ec7c04cf3ab72a90ec3bc3214c970811d /sys/fs
parent57028bd2e65524bafc89c4d6bb33bbcb45783d5c (diff)
downloadFreeBSD-src-b00af5ce750271b112281f4714c4a1a8b2992cf3.zip
FreeBSD-src-b00af5ce750271b112281f4714c4a1a8b2992cf3.tar.gz
Add a VOP_UNLOCK() for the directory, when that is not what
VOP_LOOKUP() returned. This fixes a bug in the experimental NFS server for the case where VFS_VGET() fails returning EOPNOTSUPP in the ReaddirPlus RPC, forcing the use of VOP_LOOKUP() instead. MFC after: 2 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 9b9cd06..81bccb6 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -1975,9 +1975,13 @@ again:
vref(vp);
nvp = vp;
r = 0;
- } else
+ } else {
r = VOP_LOOKUP(vp, &nvp,
&cn);
+ if (vp != nvp)
+ VOP_UNLOCK(vp,
+ 0);
+ }
}
}
if (!r) {
OpenPOWER on IntegriCloud