From c7aaa71ce38776f7c0e253df81f997cf7ef7e14b Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 4 Nov 2004 07:18:54 +0000 Subject: [PATCH] s/ffs/ntfs/ Fix error handling to not use VOP_CLOSE() on the disk. Spotted by: tegge --- sys/fs/ntfs/ntfs_vfsops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index a1f5347721a..975fdea9f2f 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -286,7 +286,7 @@ ntfs_mountfs(devvp, mp, argsp, td) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); DROP_GIANT(); g_topology_lock(); - error = g_vfs_open(devvp, &cp, "ffs", ronly ? 0 : 1); + error = g_vfs_open(devvp, &cp, "ntfs", ronly ? 0 : 1); g_topology_unlock(); PICKUP_GIANT(); VOP_UNLOCK(devvp, 0, td); @@ -453,7 +453,11 @@ out: if (bp) brelse(bp); - (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, td); + DROP_GIANT(); + g_topology_lock(); + g_wither_geom_close(cp->geom, ENXIO); + g_topology_unlock(); + PICKUP_GIANT(); return (error); }