Initialize va_flags and va_filerev properly in VOP_GETATTR(). Don't
initialize va_vaflags and va_spare because they are not part of the VOP_GETATTR() API. Also don't initialize birthtime to ctime or zero. Submitted by: Jaakko Heinonen <jh saunalahti fi> Reviewed by: bde Discussed on: freebsd-fs MFC after: 1 month
This commit is contained in:
parent
ea60a5f526
commit
86dacdfe2b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183212
@ -366,9 +366,7 @@ tmpfs_getattr(struct vop_getattr_args *v)
|
||||
vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ?
|
||||
node->tn_rdev : VNOVAL;
|
||||
vap->va_bytes = round_page(node->tn_size);
|
||||
vap->va_filerev = VNOVAL;
|
||||
vap->va_vaflags = 0;
|
||||
vap->va_spare = VNOVAL; /* XXX */
|
||||
vap->va_filerev = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -273,15 +273,9 @@ _xfs_getattr(
|
||||
|
||||
/*
|
||||
* Fields with no direct equivalent in XFS
|
||||
* leave initialized by VATTR_NULL
|
||||
*/
|
||||
#if 0
|
||||
vap->va_filerev = 0;
|
||||
vap->va_birthtime = va.va_ctime;
|
||||
vap->va_vaflags = 0;
|
||||
vap->va_flags = 0;
|
||||
vap->va_spare = 0;
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -1184,7 +1184,6 @@ mqfs_getattr(struct vop_getattr_args *ap)
|
||||
vap->va_rdev = 0;
|
||||
vap->va_bytes = 0;
|
||||
vap->va_filerev = 0;
|
||||
vap->va_vaflags = 0;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -433,8 +433,6 @@ ufs_getattr(ap)
|
||||
vap->va_mtime.tv_nsec = ip->i_din1->di_mtimensec;
|
||||
vap->va_ctime.tv_sec = ip->i_din1->di_ctime;
|
||||
vap->va_ctime.tv_nsec = ip->i_din1->di_ctimensec;
|
||||
vap->va_birthtime.tv_sec = 0;
|
||||
vap->va_birthtime.tv_nsec = 0;
|
||||
vap->va_bytes = dbtob((u_quad_t)ip->i_din1->di_blocks);
|
||||
} else {
|
||||
vap->va_rdev = ip->i_din2->di_rdev;
|
||||
|
Loading…
Reference in New Issue
Block a user