ntfs_unmount:
* panic if flushing system nodes fails: we have released too many resources and would die anyway the next time unmount is attempted * KASSERT that VOP_CLOSE succeeds, but always return 0. once again we have released too many resources XXX: maybe rewrite to be a bit more robust
This commit is contained in:
parent
53a9d4abfa
commit
daeb749df5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntfs_vfsops.c,v 1.53 2007/07/23 11:27:46 pooka Exp $ */
|
||||
/* $NetBSD: ntfs_vfsops.c,v 1.54 2007/07/26 18:43:14 pooka Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 Semen Ustimenko
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.53 2007/07/23 11:27:46 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.54 2007/07/26 18:43:14 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -643,8 +643,7 @@ ntfs_unmount(
|
|||
/* vflush system vnodes */
|
||||
error = vflush(mp,NULLVP,flags);
|
||||
if (error) {
|
||||
/* XXX should this be panic() ? */
|
||||
printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error);
|
||||
panic("ntfs_unmount: vflush failed(sysnodes): %d\n",error);
|
||||
}
|
||||
|
||||
/* Check if the type of device node isn't VBAD before
|
||||
|
@ -660,6 +659,7 @@ ntfs_unmount(
|
|||
vn_lock(ntmp->ntm_devvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
error = VOP_CLOSE(ntmp->ntm_devvp, ronly ? FREAD : FREAD|FWRITE,
|
||||
NOCRED, l);
|
||||
KASSERT(error == 0);
|
||||
VOP_UNLOCK(ntmp->ntm_devvp, 0);
|
||||
|
||||
vrele(ntmp->ntm_devvp);
|
||||
|
@ -672,7 +672,7 @@ ntfs_unmount(
|
|||
mp->mnt_flag &= ~MNT_LOCAL;
|
||||
free(ntmp->ntm_ad, M_NTFSMNT);
|
||||
FREE(ntmp, M_NTFSMNT);
|
||||
return (error);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue