Copy stat information from mount structure before it can change identity.

This commit is contained in:
Tor Egge 2006-09-20 00:32:07 +00:00
parent 60b0b1aa18
commit 4e59868e08
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162456
2 changed files with 4 additions and 4 deletions

View File

@ -4330,11 +4330,11 @@ kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf)
sp->f_namemax = NAME_MAX;
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
error = VFS_STATFS(mp, sp, td);
if (error == 0)
*buf = *sp;
out:
vfs_rel(mp);
VFS_UNLOCK_GIANT(vfslocked);
if (sp)
*buf = *sp;
return (error);
}

View File

@ -4330,11 +4330,11 @@ kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf)
sp->f_namemax = NAME_MAX;
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
error = VFS_STATFS(mp, sp, td);
if (error == 0)
*buf = *sp;
out:
vfs_rel(mp);
VFS_UNLOCK_GIANT(vfslocked);
if (sp)
*buf = *sp;
return (error);
}