Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/ntfs It is not possible to call vflush() from xxx_mou...
details: https://anonhg.NetBSD.org/src/rev/623d5e916b78
branches: trunk
changeset: 460353:623d5e916b78
user: hannken <hannken%NetBSD.org@localhost>
date: Fri Oct 18 08:18:40 2019 +0000
description:
It is not possible to call vflush() from xxx_mount().
Replace with a vnode iterator and use vrecycle().
diffstat:
sys/fs/ntfs/ntfs_vfsops.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r a7534f126925 -r 623d5e916b78 sys/fs/ntfs/ntfs_vfsops.c
--- a/sys/fs/ntfs/ntfs_vfsops.c Fri Oct 18 06:50:08 2019 +0000
+++ b/sys/fs/ntfs/ntfs_vfsops.c Fri Oct 18 08:18:40 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_vfsops.c,v 1.107 2017/04/17 08:32:00 hannken Exp $ */
+/* $NetBSD: ntfs_vfsops.c,v 1.108 2019/10/18 08:18:40 hannken Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.107 2017/04/17 08:32:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.108 2019/10/18 08:18:40 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -322,6 +322,7 @@
dev_t dev = devvp->v_rdev;
int error, i;
struct vnode *vp;
+ struct vnode_iterator *marker;
ntmp = NULL;
@@ -471,9 +472,13 @@
if (ntmp->ntm_sysvn[i])
vrele(ntmp->ntm_sysvn[i]);
- if (vflush(mp, NULLVP, 0)) {
- dprintf(("ntfs_mountfs: vflush failed\n"));
+ vfs_vnode_iterator_init(mp, &marker);
+ while ((vp = vfs_vnode_iterator_next(marker, NULL, NULL))) {
+ if (vrecycle(vp))
+ continue;
+ panic("%s: cannot recycle vnode %p", __func__, vp);
}
+ vfs_vnode_iterator_destroy(marker);
out:
spec_node_setmountedfs(devvp, NULL);
if (bp)
Home |
Main Index |
Thread Index |
Old Index