svn commit: r254446 - head/sys/kern
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Aug 17 14:13:46 UTC 2013
Author: pjd
Date: Sat Aug 17 14:13:45 2013
New Revision: 254446
URL: http://svnweb.freebsd.org/changeset/base/254446
Log:
In r114945 the line 'nmp = TAILQ_NEXT(mp, mnt_list);' was duplicated.
Instead of just removing the duplicate, convert the loop to TAILQ_FOREACH().
Modified:
head/sys/kern/vfs_subr.c
Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c Sat Aug 17 14:09:46 2013 (r254445)
+++ head/sys/kern/vfs_subr.c Sat Aug 17 14:13:45 2013 (r254446)
@@ -2906,7 +2906,7 @@ vn_printf(struct vnode *vp, const char *
*/
DB_SHOW_COMMAND(lockedvnods, lockedvnodes)
{
- struct mount *mp, *nmp;
+ struct mount *mp;
struct vnode *vp;
/*
@@ -2916,14 +2916,11 @@ DB_SHOW_COMMAND(lockedvnods, lockedvnode
* about that.
*/
db_printf("Locked vnodes\n");
- for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
- nmp = TAILQ_NEXT(mp, mnt_list);
+ TAILQ_FOREACH(mp, &mountlist, mnt_list) {
TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) {
- if (vp->v_type != VMARKER &&
- VOP_ISLOCKED(vp))
+ if (vp->v_type != VMARKER && VOP_ISLOCKED(vp))
vprint("", vp);
}
- nmp = TAILQ_NEXT(mp, mnt_list);
}
}
More information about the svn-src-all
mailing list