Unbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.

Another pointyhat to:	ssouhlal
This commit is contained in:
Suleiman Souhlal 2005-09-03 20:23:41 +00:00
parent 43be3aac7a
commit 68da388325
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149771
5 changed files with 6 additions and 8 deletions

View file

@ -231,7 +231,6 @@ hpfs_mountfs(devvp, mp, td)
return (EOPNOTSUPP);
dprintf(("hpfs_mountfs():\n"));
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
/* XXX: use VOP_ACCESS to check FS perms */
DROP_GIANT();
g_topology_lock();

View file

@ -272,7 +272,6 @@ ntfs_mountfs(devvp, mp, td)
char *cs_ntfs, *cs_local;
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
DROP_GIANT();
g_topology_lock();
error = g_vfs_open(devvp, &cp, "ntfs", ronly ? 0 : 1);

View file

@ -323,7 +323,6 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) {
struct g_consumer *cp;
struct bufobj *bo;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
DROP_GIANT();
g_topology_lock();
error = g_vfs_open(devvp, &cp, "udf", 0);

View file

@ -276,9 +276,10 @@ ext2_mount(mp, td)
if ((mp->mnt_flag & MNT_UPDATE) == 0) {
error = ext2_mountfs(devvp, mp, td);
} else {
if (devvp != ump->um_devvp)
error = EINVAL; /* needs translation */
else
if (devvp != ump->um_devvp) {
vput(devvp);
return (EINVAL); /* needs translation */
} else
vput(devvp);
}
if (error) {

View file

@ -142,7 +142,8 @@ reiserfs_mount(struct mount *mp, struct thread *td)
error = reiserfs_mountfs(devvp, mp, td);
} else {
/* TODO Handle MNT_UPDATE */
error = (EOPNOTSUPP);
vput(devvp);
return (EOPNOTSUPP);
}
if (error) {
@ -471,7 +472,6 @@ reiserfs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td)
if (vcount(devvp) > 1)
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0);
if (error) {
VOP_UNLOCK(devvp, 0, td);