summaryrefslogtreecommitdiffstats
path: root/sys/fs/fdescfs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-09-20 19:50:52 +0000
committerkib <kib@FreeBSD.org>2008-09-20 19:50:52 +0000
commita127656dea4eaa9f2125b73268a5749b25cbbbbd (patch)
tree115bb5b75428770843d9c2637d376cde0d96084e /sys/fs/fdescfs
parentef4f1dc9c70af87320df47334a3d15a86cad6994 (diff)
downloadFreeBSD-src-a127656dea4eaa9f2125b73268a5749b25cbbbbd.zip
FreeBSD-src-a127656dea4eaa9f2125b73268a5749b25cbbbbd.tar.gz
fdescfs, devfs, mqueuefs, nfs, portalfs, pseudofs, tmpfs and xfs
initialize the vattr structure in VOP_GETATTR() with VATTR_NULL(), vattr_null() or by zeroing it. Remove these to allow preinitialization of fields work in vn_stat(). This is needed to get birthtime initialized correctly. Submitted by: Jaakko Heinonen <jh saunalahti fi> Discussed on: freebsd-fs MFC after: 1 month
Diffstat (limited to 'sys/fs/fdescfs')
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index bf04120..8e914dc 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -391,8 +391,6 @@ fdesc_getattr(ap)
switch (VTOFDESC(vp)->fd_type) {
case Froot:
- VATTR_NULL(vap);
-
vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
vap->va_type = VDIR;
vap->va_nlink = 2;
@@ -409,6 +407,7 @@ fdesc_getattr(ap)
vap->va_flags = 0;
vap->va_rdev = NODEV;
vap->va_bytes = 0;
+ vap->va_filerev = 0;
break;
case Fdesc:
@@ -421,7 +420,6 @@ fdesc_getattr(ap)
error = fo_stat(fp, &stb, td->td_ucred, td);
fdrop(fp, td);
if (error == 0) {
- VATTR_NULL(vap);
vap->va_type = IFTOVT(stb.st_mode);
vap->va_mode = stb.st_mode;
#define FDRX (VREAD|VEXEC)
@@ -456,6 +454,8 @@ fdesc_getattr(ap)
vap->va_ctime = stb.st_ctimespec;
vap->va_uid = stb.st_uid;
vap->va_gid = stb.st_gid;
+ vap->va_gen = 0;
+ vap->va_filerev = 0;
}
break;
OpenPOWER on IntegriCloud