Set f_ncp in the struct file unconditionally. Previously we only set it
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 18 Sep 2006 18:19:35 +0000 (18:19 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 18 Sep 2006 18:19:35 +0000 (18:19 +0000)
commit72310cfbe60a6b86c984b0095a2664a775be5690
treed77578665468d845b36055bf7ef38313a081bee3
parent468bb1f9df45e773cdb6662b27d609c0287ebe6d
Set f_ncp in the struct file unconditionally.  Previously we only set it
when opening directories.  This allows the f*() system calls such as
fchmod() to check the actual mount point instead of the aliased mount
point (in the case of a NULLFS mount).  Also, the fstat program will
properly report the path for descriptors opened via nullfs mounts.

Add code to all f*() system calls such as fchmod() to check f_ncp
in order to detect read-only nullfs mounts.
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/sys/vnode.h