aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2008-09-20 19:48:24 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2008-09-20 19:48:24 +0000
commit0fbbf2ea56931bf178bcdc50ebe913c0949bd6e7 (patch)
tree3f7ea0b742b265ca60e200c274170ae5c30a4c02
parent86dacdfe2b2ec55ab6386053534f87149162b433 (diff)
downloadsrc-0fbbf2ea56931bf178bcdc50ebe913c0949bd6e7.tar.gz
src-0fbbf2ea56931bf178bcdc50ebe913c0949bd6e7.zip
Initialize va_rdev to NODEV and va_fsid to VNOVAL before the
VOP_GETATTR() call in vn_stat(). Thus if a file system doesn't initialize those fields in VOP_GETATTR() they will have a sane default value. Submitted by: Jaakko Heinonen <jh saunalahti fi> Discussed on: freebsd-fs MFC after: 1 month
Notes
Notes: svn path=/head/; revision=183213
-rw-r--r--sys/kern/vfs_vnops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 2fb2e802351f..2301a3438a15 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -711,6 +711,8 @@ vn_stat(vp, sb, active_cred, file_cred, td)
*/
vap->va_birthtime.tv_sec = -1;
vap->va_birthtime.tv_nsec = 0;
+ vap->va_fsid = VNOVAL;
+ vap->va_rdev = NODEV;
error = VOP_GETATTR(vp, vap, active_cred);
if (error)