summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-10-29 10:43:45 +0000
committerphk <phk@FreeBSD.org>2004-10-29 10:43:45 +0000
commitff969023bb03f8dcf70b4b41d7aebe61a891773e (patch)
tree2f6ab9e0b0e7c5dc7b9fe9c38caadb60f662069a /sys/fs/ntfs
parent2b08c631352e446f8ea2fdd0d25667874745767c (diff)
downloadFreeBSD-src-ff969023bb03f8dcf70b4b41d7aebe61a891773e.zip
FreeBSD-src-ff969023bb03f8dcf70b4b41d7aebe61a891773e.tar.gz
Move NTFS to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
Diffstat (limited to 'sys/fs/ntfs')
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index 3bd803c..4b260cc 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -275,29 +275,9 @@ ntfs_mountfs(devvp, mp, argsp, td)
struct buf *bp;
struct ntfsmount *ntmp;
struct cdev *dev = devvp->v_rdev;
- int error, ronly, ncount, i;
+ int error, ronly, i;
struct vnode *vp;
- /*
- * Disallow multiple mounts of the same device.
- * Disallow mounting of a device that is currently in use
- * (except for root, which might share swap device for miniroot).
- * Flush out any old buffers remaining from a previous use.
- */
- error = vfs_mountedon(devvp);
- if (error)
- return (error);
- ncount = vcount(devvp);
- if (devvp->v_object)
- ncount -= 1;
- if (ncount > 1)
- return (EBUSY);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
- error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0);
- VOP_UNLOCK(devvp, 0, td);
- if (error)
- return (error);
-
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1);
@@ -451,7 +431,6 @@ ntfs_mountfs(devvp, mp, argsp, td)
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
mp->mnt_maxsymlinklen = 0;
mp->mnt_flag |= MNT_LOCAL;
- devvp->v_rdev->si_mountpoint = mp;
return (0);
out1:
@@ -462,7 +441,6 @@ out1:
dprintf(("ntfs_mountfs: vflush failed\n"));
out:
- devvp->v_rdev->si_mountpoint = NULL;
if (bp)
brelse(bp);
@@ -508,13 +486,6 @@ ntfs_unmount(
if (error)
printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error);
- /* Check if the type of device node isn't VBAD before
- * touching v_cdev. If the device vnode is revoked, the
- * field is NULL and touching it causes null pointer derefercence.
- */
- if (ntmp->ntm_devvp->v_type != VBAD)
- ntmp->ntm_devvp->v_rdev->si_mountpoint = NULL;
-
vinvalbuf(ntmp->ntm_devvp, V_SAVE, NOCRED, td, 0, 0);
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
OpenPOWER on IntegriCloud