Skip to content

Commit

Permalink
[PATCH] sigprocmask: kill unneeded temp var
Browse files Browse the repository at this point in the history
Cleanup, remove unneeded double copying of current->blocked.

Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Mar 23, 2006
1 parent 40953ed commit a26fd33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
}

Expand Down

0 comments on commit a26fd33

Please sign in to comment.