diff options
author | tegge <tegge@FreeBSD.org> | 2006-01-09 20:42:19 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2006-01-09 20:42:19 +0000 |
commit | d344c1186100b5323aefd8a08d585a95db5aa73c (patch) | |
tree | 63c09ce208013c75e9755db86cfe31120c538d27 /sys/nfsclient | |
parent | 4d88aab3ea1d28d6617480348f596c37389d6434 (diff) | |
download | FreeBSD-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/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 6f1db8d..be02893 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -981,7 +981,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; /* @@ -989,7 +989,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) || @@ -1001,6 +1001,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); |