提交 a26fd335 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

[PATCH] sigprocmask: kill unneeded temp var

Cleanup, remove unneeded double copying of current->blocked.
Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 40953ed8
......@@ -2101,10 +2101,11 @@ long do_no_restart_syscall(struct restart_block *param)
int sigprocmask(int how, sigset_t *set, sigset_t *oldset)
{
int error;
sigset_t old_block;
spin_lock_irq(&current->sighand->siglock);
old_block = current->blocked;
if (oldset)
*oldset = current->blocked;
error = 0;
switch (how) {
case SIG_BLOCK:
......@@ -2121,8 +2122,7 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset)
}
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
if (oldset)
*oldset = old_block;
return error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册