git: kernel - Fix not-quite-nonblocking VX lock in allocfreevnod

看板DFBSD_commit作者時間16年前 (2010/01/15 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 298693f7a0177ad2291be7a6c52371fb311b4a17 Author: Matthew Dillon <dillon@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(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/298693f7a0177ad2291be7a6c52371fb311b4a17 -- DragonFly BSD source repository
文章代碼(AID): #1BK0IaTZ (DFBSD_commit)