Call devfs_populate_vp() from devfs_getattr(). It was possible that
fstat(2) returned stale information through an open file descriptor.
This commit is contained in:
parent
d2b87ab576
commit
4a4bf3c511
@ -618,10 +618,18 @@ devfs_getattr(struct vop_getattr_args *ap)
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vattr *vap = ap->a_vap;
|
||||
int error = 0;
|
||||
int error;
|
||||
struct devfs_dirent *de;
|
||||
struct devfs_mount *dmp;
|
||||
struct cdev *dev;
|
||||
|
||||
error = devfs_populate_vp(vp);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
dmp = VFSTODEVFS(vp->v_mount);
|
||||
sx_xunlock(&dmp->dm_lock);
|
||||
|
||||
de = vp->v_data;
|
||||
KASSERT(de != NULL, ("Null dirent in devfs_getattr vp=%p", vp));
|
||||
if (vp->v_type == VDIR) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user