1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

Remove the last use of the deprecated MNT_VNODE_FOREACH interface in

the tree.

With the help from:	mjg
Tested by:	Ronald Klop <ronald-freebsd8@klop.yi.org>
MFC after:	2 weeks
This commit is contained in:
Konstantin Belousov 2013-01-03 19:01:56 +00:00
parent d281d08fc7
commit 6b54784391
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245000

View File

@ -478,39 +478,19 @@ nandfs_iterate_dirty_vnodes(struct mount *mp, struct nandfs_seginfo *seginfo)
struct nandfs_node *nandfs_node;
struct vnode *vp, *mvp;
struct thread *td;
int error, lockreq, update;
int error, update;
td = curthread;
lockreq = LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY;
MNT_ILOCK(mp);
MNT_VNODE_FOREACH(vp, mp, mvp) {
MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) {
update = 0;
if (mp->mnt_syncer == vp)
continue;
if (VOP_ISLOCKED(vp))
continue;
VI_LOCK(vp);
MNT_IUNLOCK(mp);
if (vp->v_iflag & VI_DOOMED) {
if (mp->mnt_syncer == vp || VOP_ISLOCKED(vp)) {
VI_UNLOCK(vp);
MNT_ILOCK(mp);
continue;
}
if ((error = vget(vp, lockreq, td)) != 0) {
MNT_ILOCK(mp);
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_NOWAIT, td) != 0)
continue;
}
if (vp->v_iflag & VI_DOOMED) {
vput(vp);
MNT_ILOCK(mp);
continue;
}
nandfs_node = VTON(vp);
if (nandfs_node->nn_flags & IN_MODIFIED) {
@ -532,12 +512,8 @@ nandfs_iterate_dirty_vnodes(struct mount *mp, struct nandfs_seginfo *seginfo)
if (update)
nandfs_node_update(nandfs_node);
MNT_ILOCK(mp);
}
MNT_IUNLOCK(mp);
return (0);
}