summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2004-01-04 04:08:34 +0000
committerkan <kan@FreeBSD.org>2004-01-04 04:08:34 +0000
commitfa2d78c71073044b8172584dc62ed574e0f7891c (patch)
tree18aac4ef48aebc8bb8ce3ed78328452867b0f69e
parent28729219677869590f99511a1349b0460ae536c8 (diff)
downloadFreeBSD-src-fa2d78c71073044b8172584dc62ed574e0f7891c.zip
FreeBSD-src-fa2d78c71073044b8172584dc62ed574e0f7891c.tar.gz
Avoid calling vprint on a vnode while holding its interlock mutex.
Move diagnostic printf after vget. This might delay the debug output some, but at least it keeps kernel from exploding if DEBUG_VFS_LOCKS is in effect.
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 0e2191f..8a4d3b4 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -424,12 +424,12 @@ loop:
MNT_ILOCK(mp);
continue;
}
- if (snapdebug)
- vprint("ffs_snapshot: busy vnode", xvp);
if (vn_lock(xvp, LK_EXCLUSIVE | LK_INTERLOCK, td) != 0) {
MNT_ILOCK(mp);
goto loop;
}
+ if (snapdebug)
+ vprint("ffs_snapshot: busy vnode", xvp);
if (VOP_GETATTR(xvp, &vat, td->td_ucred, td) == 0 &&
vat.va_nlink > 0) {
VOP_UNLOCK(xvp, 0, td);
OpenPOWER on IntegriCloud