diff options
author | jeff <jeff@FreeBSD.org> | 2005-06-13 00:47:29 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-06-13 00:47:29 +0000 |
commit | df170ebc6114978ea1f917ad473f862e5135c3e6 (patch) | |
tree | 3b2377e6cd61d1f3d6dcf9e43d34ef14200bffdb /sys/kern/vfs_vnops.c | |
parent | 2ef7df2a1a2c79347a9ead2d4db6a54318f55032 (diff) | |
download | FreeBSD-src-df170ebc6114978ea1f917ad473f862e5135c3e6.zip FreeBSD-src-df170ebc6114978ea1f917ad473f862e5135c3e6.tar.gz |
- It has long been my suspicion that we don't actually need a loop in
vn_lock(). Add an assert that will help me gain more confidence that this
is correct.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 0047df0..f04fdb2 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -821,6 +821,8 @@ debug_vn_lock(vp, flags, td, filename, line) */ error = VOP_LOCK(vp, flags | LK_INTERLOCK, td); flags &= ~LK_INTERLOCK; + KASSERT((flags & LK_RETRY) == 0 || error == 0, + ("LK_RETRY set with incompatible flags %d\n", flags)); /* * Callers specify LK_RETRY if they wish to get dead vnodes. * If RETRY is not set, we return ENOENT instead. |