summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2006-01-09 20:42:19 +0000
committertegge <tegge@FreeBSD.org>2006-01-09 20:42:19 +0000
commitd344c1186100b5323aefd8a08d585a95db5aa73c (patch)
tree63c09ce208013c75e9755db86cfe31120c538d27 /sys/nfs4client
parent4d88aab3ea1d28d6617480348f596c37389d6434 (diff)
downloadFreeBSD-src-d344c1186100b5323aefd8a08d585a95db5aa73c.zip
FreeBSD-src-d344c1186100b5323aefd8a08d585a95db5aa73c.tar.gz
Add marker vnodes to ensure that all vnodes associated with the mount point are
iterated over when using MNT_VNODE_FOREACH. Reviewed by: truckman
Diffstat (limited to 'sys/nfs4client')
-rw-r--r--sys/nfs4client/nfs4_vfsops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfs4client/nfs4_vfsops.c b/sys/nfs4client/nfs4_vfsops.c
index 1e4968c..7673e01 100644
--- a/sys/nfs4client/nfs4_vfsops.c
+++ b/sys/nfs4client/nfs4_vfsops.c
@@ -733,7 +733,7 @@ nfs_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td)
static int
nfs_sync(struct mount *mp, int waitfor, struct thread *td)
{
- struct vnode *vp, *nvp;
+ struct vnode *vp, *mvp;
int error, allerror = 0;
/*
@@ -741,7 +741,7 @@ nfs_sync(struct mount *mp, int waitfor, struct thread *td)
*/
MNT_ILOCK(mp);
loop:
- MNT_VNODE_FOREACH(vp, mp, nvp) {
+ MNT_VNODE_FOREACH(vp, mp, mvp) {
VI_LOCK(vp);
MNT_IUNLOCK(mp);
if (VOP_ISLOCKED(vp, NULL) ||
@@ -753,6 +753,7 @@ loop:
}
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) {
MNT_ILOCK(mp);
+ MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp);
goto loop;
}
error = VOP_FSYNC(vp, waitfor, td);
OpenPOWER on IntegriCloud