signal: remove noop call to __sigqueue_free
PATCH 1/1 signal: remove noop call to __sigqueue_free
From: Tom Rix <[email protected]>
By inspection, this call does not do anything.
static void __sigqueue_free(struct sigqueue *q)
{
if (q->flags & SIGQUEUE_PREALLOC) <-- redundant flag check --+
return; |
atomic_dec(&q->user->sigpending); |
free_uid(q->user); |
kmem_cache_free(sigqueue_cachep, q); |
} |
|
static void sigqueue_free_current(struct sigqueue *q) |
{ |
struct user_struct *up; |
|
if (q->flags & SIGQUEUE_PREALLOC) <-- first flag check ------+
return; |
|
up = q->user; |
if (rt_prio(current->normal_prio) && !put_task_cache(current, |
atomic_dec(&up->sigpending); |
free_uid(up); |
} else |
__sigqueue_free(q); <--- this call will noop --------+
}Signed-off-by Tom Rix <[email protected]>
--- kernel/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/signal.c +1 -2
@@ -486,8 +486,7 @@ static void sigqueue_free_current(struct sigqueue *q)if (rt_prio (current->normal_prio) && !put_task_cache (current, q)) {atomic_dec (&up->sigpending);free_uid (up); - }else -__sigqueue_free (q); + } }void flush_sigqueue (struct sigpending *queue)
Signature · 1 line
2.18.1