summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-12-07 21:15:43 +0000
committerkmacy <kmacy@FreeBSD.org>2008-12-07 21:15:43 +0000
commit598b522b42d772cdb7895eda77507500d0507864 (patch)
tree16533ece1c017ec68e8457a3d70ddbcf41a9dec9 /sys/kern/vfs_export.c
parenteaa93f5a2f480f7198abc747e36a95b2e814d0e7 (diff)
downloadFreeBSD-src-598b522b42d772cdb7895eda77507500d0507864.zip
FreeBSD-src-598b522b42d772cdb7895eda77507500d0507864.tar.gz
- convert radix node head lock from mutex to rwlock
- make radix node head lock not recursive - fix LOR in rtexpunge - fix LOR in rtredirect Reviewed by: sam
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r--sys/kern/vfs_export.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index d91ec34..51b0eae 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mbuf.h>
#include <sys/mount.h>
#include <sys/mutex.h>
+#include <sys/rwlock.h>
#include <sys/refcount.h>
#include <sys/socket.h>
#include <sys/systm.h>
@@ -425,10 +426,10 @@ vfs_export_lookup(struct mount *mp, struct sockaddr *nam)
saddr = nam;
rnh = nep->ne_rtable[saddr->sa_family];
if (rnh != NULL) {
- RADIX_NODE_HEAD_LOCK(rnh);
+ RADIX_NODE_HEAD_RLOCK(rnh);
np = (struct netcred *)
(*rnh->rnh_matchaddr)(saddr, rnh);
- RADIX_NODE_HEAD_UNLOCK(rnh);
+ RADIX_NODE_HEAD_RUNLOCK(rnh);
if (np && np->netc_rnodes->rn_flags & RNF_ROOT)
np = NULL;
}
OpenPOWER on IntegriCloud