Commit 7c6c6636 authored by Robin Holt's avatar Robin Holt Committed by Tony Luck

[IA64-SGI] Fix XPC code which sleeps with spin_lock_irqsave().

During some testing, we got a warning about trying to allocate
memory while holding a lock.  This fixes that problem.
Signed-off-by: default avatarRobin Holt <holt@sgi.com>
Acked-by: default avatarDean Nelson <dcn@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 9a52bbed
...@@ -575,18 +575,21 @@ xpc_activate_partition(struct xpc_partition *part) ...@@ -575,18 +575,21 @@ xpc_activate_partition(struct xpc_partition *part)
spin_lock_irqsave(&part->act_lock, irq_flags); spin_lock_irqsave(&part->act_lock, irq_flags);
pid = kernel_thread(xpc_activating, (void *) ((u64) partid), 0);
DBUG_ON(part->act_state != XPC_P_INACTIVE); DBUG_ON(part->act_state != XPC_P_INACTIVE);
if (pid > 0) { part->act_state = XPC_P_ACTIVATION_REQ;
part->act_state = XPC_P_ACTIVATION_REQ; XPC_SET_REASON(part, xpcCloneKThread, __LINE__);
XPC_SET_REASON(part, xpcCloneKThread, __LINE__);
} else {
XPC_SET_REASON(part, xpcCloneKThreadFailed, __LINE__);
}
spin_unlock_irqrestore(&part->act_lock, irq_flags); spin_unlock_irqrestore(&part->act_lock, irq_flags);
pid = kernel_thread(xpc_activating, (void *) ((u64) partid), 0);
if (unlikely(pid <= 0)) {
spin_lock_irqsave(&part->act_lock, irq_flags);
part->act_state = XPC_P_INACTIVE;
XPC_SET_REASON(part, xpcCloneKThreadFailed, __LINE__);
spin_unlock_irqrestore(&part->act_lock, irq_flags);
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment