Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_export.c
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
#include <sys/dirent.h> | #include <sys/dirent.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#include <sys/mount.h> | #include <sys/mount.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/rwlock.h> | #include <sys/rmlock.h> | ||||
#include <sys/refcount.h> | #include <sys/refcount.h> | ||||
#include <sys/signalvar.h> | #include <sys/signalvar.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <net/radix.h> | #include <net/radix.h> | ||||
▲ Show 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | |||||
* Used by the filesystems to determine if a given network address | * Used by the filesystems to determine if a given network address | ||||
* (passed in 'nam') is present in their exports list, returns a pointer | * (passed in 'nam') is present in their exports list, returns a pointer | ||||
* to struct netcred so that the filesystem can examine it for | * to struct netcred so that the filesystem can examine it for | ||||
* access rights (read/write/etc). | * access rights (read/write/etc). | ||||
*/ | */ | ||||
static struct netcred * | static struct netcred * | ||||
vfs_export_lookup(struct mount *mp, struct sockaddr *nam) | vfs_export_lookup(struct mount *mp, struct sockaddr *nam) | ||||
{ | { | ||||
RADIX_NODE_HEAD_RLOCK_TRACKER; | |||||
struct netexport *nep; | struct netexport *nep; | ||||
struct netcred *np = NULL; | struct netcred *np = NULL; | ||||
struct radix_node_head *rnh; | struct radix_node_head *rnh; | ||||
struct sockaddr *saddr; | struct sockaddr *saddr; | ||||
nep = mp->mnt_export; | nep = mp->mnt_export; | ||||
if (nep == NULL) | if (nep == NULL) | ||||
return (NULL); | return (NULL); | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |