git: kernel - Fix not-quite-nonblocking VX lock in allocfreevnode()
dillon at crater.dragonflybsd.org
Thu Jan 14 21:58:30 PST 2010
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Jan 14 21:51:45 2010 -0800
kernel - Fix not-quite-nonblocking VX lock in allocfreevnode()
* Introduce LK_NOSPINWAIT to tell lockmgr() to not even spin on the
spinlock if it can't get it immediately.
* There is a lock order reversal between vfs_spin and vp->v_spinlock
where vx_lock_nonblock() can deadlock in allocfreevnode(). Normally
I'd vhold() the vnode but the freelist code is rather fragile and I
don't want to have to vdrop() later on. So instead use LK_NOSPINWAIT
to avoid the situation.
* This is a hack.
Summary of changes:
sys/kern/kern_lock.c | 9 ++++++++-
sys/kern/vfs_lock.c | 7 ++++++-
sys/sys/lock.h | 2 +-
3 files changed, 15 insertions(+), 3 deletions(-)
DragonFly BSD source repository
More information about the Commits