diff options
author | phk <phk@FreeBSD.org> | 2000-01-10 12:04:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-01-10 12:04:27 +0000 |
commit | ae0c1ec8f72abc7b43c1fed6860db12370093a0a (patch) | |
tree | d473773da273d9f8e9ef585dcf6dea59e03c2855 /sys/ufs/ffs/ffs_vfsops.c | |
parent | 5a624ba37849e1a07c962f1ec21e8e3df37884af (diff) | |
download | FreeBSD-src-ae0c1ec8f72abc7b43c1fed6860db12370093a0a.zip FreeBSD-src-ae0c1ec8f72abc7b43c1fed6860db12370093a0a.tar.gz |
Give vn_isdisk() a second argument where it can return a suitable errno.
Suggested by: bde
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 77e821f..511c827 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -280,10 +280,8 @@ ffs_mount( mp, path, data, ndp, p) NDFREE(ndp, NDF_ONLY_PNBUF); devvp = ndp->ni_vp; - if (!vn_isdisk(devvp)) { - err = ENOTBLK; + if (!vn_isdisk(devvp, &err)) goto error_2; - } /* * If mount by non-root, then verify that user has necessary @@ -442,7 +440,7 @@ ffs_reload(mp, cred, p) * Only VMIO the backing device if the backing device is a real * block device. See ffs_mountmfs() for more details. */ - if (devvp->v_tag != VT_MFS && vn_isdisk(devvp)) { + if (devvp->v_tag != VT_MFS && vn_isdisk(devvp, NULL)) { vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); vfs_object_create(devvp, p, p->p_ucred); simple_lock(&devvp->v_interlock); @@ -599,7 +597,7 @@ ffs_mountfs(devvp, mp, p, malloctype) * Note that it is optional that the backing device be VMIOed. This * increases the opportunity for metadata caching. */ - if (devvp->v_tag != VT_MFS && vn_isdisk(devvp)) { + if (devvp->v_tag != VT_MFS && vn_isdisk(devvp, NULL)) { vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); vfs_object_create(devvp, p, p->p_ucred); simple_lock(&devvp->v_interlock); |