summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-12-05 22:41:02 +0000
committerphk <phk@FreeBSD.org>2004-12-05 22:41:02 +0000
commit6c14f71ef7197ba00d32563670ba895b74e646a2 (patch)
tree456f27e8cc68e4b4148ad4488fade6e1454b7acc /sys/ufs
parent8b42e21d12e627514808f983d93b02293eaab637 (diff)
downloadFreeBSD-src-6c14f71ef7197ba00d32563670ba895b74e646a2.zip
FreeBSD-src-6c14f71ef7197ba00d32563670ba895b74e646a2.tar.gz
VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases
doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index fd19e61..341179f 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1074,22 +1074,6 @@ ffs_statfs(mp, sbp, td)
sbp->f_files = fs->fs_ncg * fs->fs_ipg - ROOTINO;
sbp->f_ffree = fs->fs_cstotal.cs_nifree + fs->fs_pendinginodes;
sbp->f_namemax = NAME_MAX;
- if (sbp != &mp->mnt_stat) {
- sbp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- sbp->f_type = mp->mnt_vfc->vfc_typenum;
- sbp->f_syncwrites = mp->mnt_stat.f_syncwrites;
- sbp->f_asyncwrites = mp->mnt_stat.f_asyncwrites;
- sbp->f_syncreads = mp->mnt_stat.f_syncreads;
- sbp->f_asyncreads = mp->mnt_stat.f_asyncreads;
- sbp->f_owner = mp->mnt_stat.f_owner;
- sbp->f_fsid = mp->mnt_stat.f_fsid;
- bcopy((caddr_t)mp->mnt_stat.f_fstypename,
- (caddr_t)&sbp->f_fstypename[0], MFSNAMELEN);
- bcopy((caddr_t)mp->mnt_stat.f_mntonname,
- (caddr_t)&sbp->f_mntonname[0], MNAMELEN);
- bcopy((caddr_t)mp->mnt_stat.f_mntfromname,
- (caddr_t)&sbp->f_mntfromname[0], MNAMELEN);
- }
return (0);
}
OpenPOWER on IntegriCloud