Skip to content

Commit 98b89b6

Browse files
committed
signal: kill JOBCTL_TASK_WORK
It's no longer used, get rid of it. Signed-off-by: Jens Axboe <[email protected]>
1 parent 792ee0f commit 98b89b6

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

include/linux/sched/jobctl.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct task_struct;
1919
#define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */
2020
#define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */
2121
#define JOBCTL_TRAP_FREEZE_BIT 23 /* trap for cgroup freezer */
22-
#define JOBCTL_TASK_WORK_BIT 24 /* set by TWA_SIGNAL */
2322

2423
#define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT)
2524
#define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT)
@@ -29,10 +28,9 @@ struct task_struct;
2928
#define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT)
3029
#define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT)
3130
#define JOBCTL_TRAP_FREEZE (1UL << JOBCTL_TRAP_FREEZE_BIT)
32-
#define JOBCTL_TASK_WORK (1UL << JOBCTL_TASK_WORK_BIT)
3331

3432
#define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY)
35-
#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK | JOBCTL_TASK_WORK)
33+
#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK)
3634

3735
extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask);
3836
extern void task_clear_jobctl_trapping(struct task_struct *task);

kernel/signal.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2556,26 +2556,6 @@ bool get_signal(struct ksignal *ksig)
25562556

25572557
relock:
25582558
spin_lock_irq(&sighand->siglock);
2559-
/*
2560-
* Make sure we can safely read ->jobctl() in task_work add. As Oleg
2561-
* states:
2562-
*
2563-
* It pairs with mb (implied by cmpxchg) before READ_ONCE. So we
2564-
* roughly have
2565-
*
2566-
* task_work_add: get_signal:
2567-
* STORE(task->task_works, new_work); STORE(task->jobctl);
2568-
* mb(); mb();
2569-
* LOAD(task->jobctl); LOAD(task->task_works);
2570-
*
2571-
* and we can rely on STORE-MB-LOAD [ in task_work_add].
2572-
*/
2573-
smp_store_mb(current->jobctl, current->jobctl & ~JOBCTL_TASK_WORK);
2574-
if (unlikely(current->task_works)) {
2575-
spin_unlock_irq(&sighand->siglock);
2576-
task_work_run();
2577-
goto relock;
2578-
}
25792559

25802560
/*
25812561
* Every stopped thread goes here after wakeup. Check to see if

0 commit comments

Comments
 (0)