diff options
author | phk <phk@FreeBSD.org> | 1999-07-11 19:16:50 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-07-11 19:16:50 +0000 |
commit | f94fffca16a77c2effb6fd0402c32cdfe406274f (patch) | |
tree | 2bfafd5024a5d9fb1ad262ef94bf1f90ad1aa82f /sys | |
parent | a9a930f77ff5e7ded8c34e21a382d206d58ee7cf (diff) | |
download | FreeBSD-src-f94fffca16a77c2effb6fd0402c32cdfe406274f.zip FreeBSD-src-f94fffca16a77c2effb6fd0402c32cdfe406274f.tar.gz |
Use the fsid from the superblock, unless it looks bogus or has already
been taken by some other filesystem.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index d8d5e7f..0e1abab 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 - * $Id: ffs_vfsops.c,v 1.98 1999/05/08 06:40:22 phk Exp $ + * $Id: ffs_vfsops.c,v 1.99 1999/05/31 11:29:24 phk Exp $ */ #include "opt_quota.h" @@ -709,11 +709,11 @@ ffs_mountfs(devvp, mp, p, malloctype) *lp++ = fs->fs_contigsumsize; } mp->mnt_data = (qaddr_t)ump; - mp->mnt_stat.f_fsid.val[0] = (long)dev; - if (fs->fs_id[0] != 0 && fs->fs_id[1] != 0) - mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1]; - else - mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; + mp->mnt_stat.f_fsid.val[0] = fs->fs_id[0]; + mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1]; + if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 || + vfs_getvfs(&mp->mnt_stat.f_fsid)) + vfs_getnewfsid(mp); mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen; mp->mnt_flag |= MNT_LOCAL; ump->um_mountp = mp; |