Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_lookup.c
Show All 38 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_capsicum.h" | #include "opt_capsicum.h" | ||||
#include "opt_ktrace.h" | #include "opt_ktrace.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/dirent.h> | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/capsicum.h> | #include <sys/capsicum.h> | ||||
#include <sys/fcntl.h> | #include <sys/fcntl.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/namei.h> | #include <sys/namei.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
▲ Show 20 Lines • Show All 686 Lines • ▼ Show 20 Lines | if ((flags & ISOPEN) != 0) | ||||
return (!MNT_EXTENDED_SHARED(mp)); | return (!MNT_EXTENDED_SHARED(mp)); | ||||
/* | /* | ||||
* Lookup requests outside of open() that specify LOCKSHARED | * Lookup requests outside of open() that specify LOCKSHARED | ||||
* only need a shared lock on the leaf vnode. | * only need a shared lock on the leaf vnode. | ||||
*/ | */ | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | |||||
* Various filesystems expect to be able to copy a name component with length | |||||
* bounded by NAME_MAX into a directory entry buffer of size MAXNAMLEN. Make | |||||
* sure that these are all the same size. | |||||
*/ | |||||
_Static_assert(MAXNAMLEN == NAME_MAX, | |||||
"MAXNAMLEN and NAME_MAX have different values"); | |||||
/* | /* | ||||
* Search a pathname. | * Search a pathname. | ||||
* This is a very central and rather complicated routine. | * This is a very central and rather complicated routine. | ||||
* | * | ||||
* The pathname is pointed to by ni_ptr and is of length ni_pathlen. | * The pathname is pointed to by ni_ptr and is of length ni_pathlen. | ||||
* The starting directory is taken from ni_startdir. The pathname is | * The starting directory is taken from ni_startdir. The pathname is | ||||
* descended until done, or a symbolic link is encountered. The variable | * descended until done, or a symbolic link is encountered. The variable | ||||
▲ Show 20 Lines • Show All 950 Lines • Show Last 20 Lines |