diff options
author | John Baldwin <jhb@FreeBSD.org> | 2017-12-19 18:20:38 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2017-12-19 18:20:38 +0000 |
commit | dd688800e1ce85d375190252a245d9b83695575e (patch) | |
tree | f156f6efac61a01a2cbfe35769164857ede68d57 /sys/sys/syscallsubr.h | |
parent | 78fcf2de930af71c827151dac2dbd72e976e7c7d (diff) | |
download | src-dd688800e1ce85d375190252a245d9b83695575e.tar.gz src-dd688800e1ce85d375190252a245d9b83695575e.zip |
Add a custom VOP_PATHCONF method for fdescfs.
The method handles NAME_MAX and LINK_MAX explicitly. For all other
pathconf variables, the method passes the request down to the underlying
file descriptor. This requires splitting a kern_fpathconf() syscallsubr
routine out of sys_fpathconf(). Also, to avoid lock order reversals with
vnode locks, the fdescfs vnode is unlocked around the call to
kern_fpathconf(), but with the usecount of the vnode bumped.
MFC after: 1 month
Sponsored by: Chelsio Communications
Notes
Notes:
svn path=/head/; revision=326986
Diffstat (limited to 'sys/sys/syscallsubr.h')
-rw-r--r-- | sys/sys/syscallsubr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index c97b27f1193a..d95b2dd7d4bf 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -111,6 +111,7 @@ int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg); int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf); int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf); +int kern_fpathconf(struct thread *td, int fd, int name); int kern_fstat(struct thread *td, int fd, struct stat *sbp); int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); int kern_fsync(struct thread *td, int fd, bool fullsync); |