summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-04-13 08:45:55 +0000
committerkib <kib@FreeBSD.org>2010-04-13 08:45:55 +0000
commitd5f342f2daa0632a7ce5dc14cc5bc84bea1b8a16 (patch)
tree44751e9e8055c575ceceab59be7a4a07f4e7983a /sys/kern
parent93c04293ef89bc34224e653837ffd715c112e945 (diff)
downloadFreeBSD-src-d5f342f2daa0632a7ce5dc14cc5bc84bea1b8a16.zip
FreeBSD-src-d5f342f2daa0632a7ce5dc14cc5bc84bea1b8a16.tar.gz
Remove XXX comment. Add another comment, describing why f_vnode assignment
is useful. MFC after: 3 days
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_syscalls.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index c329adc..f266688 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1124,7 +1124,12 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
NDFREE(&nd, NDF_ONLY_PNBUF);
vp = nd.ni_vp;
- fp->f_vnode = vp; /* XXX Does devfs need this? */
+ /*
+ * Store the vnode, for any f_type. Typically, the vnode use
+ * count is decremented by direct call to vn_closefile() for
+ * files that switched type in the cdevsw fdopen() method.
+ */
+ fp->f_vnode = vp;
/*
* If the file wasn't claimed by devfs bind it to the normal
* vnode operations here.
OpenPOWER on IntegriCloud