mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix dnode_hold_impl() soft lockup
Soft lockups could happen when multiple threads trying to get zrl on the same dnode handle in order to allocate and initialize the dnode marked as DN_SLOT_ALLOCATED. Don't loop from beginning when we can't get zrl, otherwise we would increase the zrl refcount and nobody can actually lock it. Reviewed by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Li Dongyang <dongyangli@ddn.com> Closes #8433
This commit is contained in:
committed by
Brian Behlendorf
parent
f8bb2a7e0c
commit
8d9e51c084
@@ -236,6 +236,7 @@ extern kthread_t *zk_thread_create(void (*func)(void *), void *arg,
|
||||
|
||||
#define kpreempt_disable() ((void)0)
|
||||
#define kpreempt_enable() ((void)0)
|
||||
#define cond_resched() sched_yield()
|
||||
|
||||
/*
|
||||
* Mutexes
|
||||
|
||||
Reference in New Issue
Block a user