From 8e418f7d9be65e0c4a29c35bb109f2c47955619e Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Tue, 20 Dec 2011 09:13:08 +0000 Subject: respect the MNT_FORCE flag in ntfs_unmount and proceed even if there's someone holding a system vnode. prevents crashes with forced unmounts. silence ntfs_reclaim so that kernel won't spit out vprint's angrily. ok krw, beck --- sys/ntfs/ntfs_vfsops.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/ntfs/ntfs_vfsops.c') diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index 29b85366cc5..722f2a50db6 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vfsops.c,v 1.27 2011/07/04 20:35:35 deraadt Exp $ */ +/* $OpenBSD: ntfs_vfsops.c,v 1.28 2011/12/20 09:13:07 mikeb Exp $ */ /* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -547,10 +547,12 @@ ntfs_unmount( return (error); } - /* Check if only system vnodes are rest */ - for(i=0;intm_sysvn[i]) && - (ntmp->ntm_sysvn[i]->v_usecount > 1)) return (EBUSY); + /* Check if system vnodes are still referenced */ + for(i=0;intm_sysvn[i] && + ntmp->ntm_sysvn[i]->v_usecount > 1)) + return (EBUSY); + } /* Dereference all system vnodes */ for(i=0;i