Module Name: src
Committed By: hannken
Date: Fri Oct 18 08:18:40 UTC 2019
Modified Files:
src/sys/fs/ntfs: ntfs_vfsops.c
Log Message:
It is not possible to call vflush() from xxx_mount().
Replace with a vnode iterator and use vrecycle().
To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/fs/ntfs/ntfs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/ntfs/ntfs_vfsops.c
diff -u src/sys/fs/ntfs/ntfs_vfsops.c:1.107 src/sys/fs/ntfs/ntfs_vfsops.c:1.108
--- src/sys/fs/ntfs/ntfs_vfsops.c:1.107 Mon Apr 17 08:32:00 2017
+++ src/sys/fs/ntfs/ntfs_vfsops.c Fri Oct 18 08:18:40 2019
@@ -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 @@ ntfs_mountfs(struct vnode *devvp, struct
dev_t dev = devvp->v_rdev;
int error, i;
struct vnode *vp;
+ struct vnode_iterator *marker;
ntmp = NULL;
@@ -471,9 +472,13 @@ out1:
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)