提交 e3fabdfd 编写于 作者: B Bart Van Assche 提交者: Mike Snitzer

dm: use signal_pending_state() in dm_wait_for_completion()

Use signal_pending_state() instead of open-coding it.  This patch does
not change any functionality but makes it possible to pass TASK_KILLABLE
as the second argument of dm_wait_for_completion().  See also commit
16882c1e ("sched: fix TASK_WAKEKILL vs SIGKILL race").

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>.
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 b48633f8
......@@ -1954,8 +1954,7 @@ static int dm_wait_for_completion(struct mapped_device *md, long task_state)
if (!md_in_flight(md))
break;
if (task_state == TASK_INTERRUPTIBLE &&
signal_pending(current)) {
if (signal_pending_state(task_state, current)) {
r = -EINTR;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册