Skip to content

Commit 59376fb

Browse files
btw616richardweinberger
authored andcommitted
um: Remove unused mm_fd field from mm_id
It's no longer used since the removal of the SKAS3/4 support. Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 94090f4 commit 59376fb

File tree

6 files changed

+11
-14
lines changed

6 files changed

+11
-14
lines changed

arch/um/include/shared/skas/mm_id.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
#define __MM_ID_H
88

99
struct mm_id {
10-
union {
11-
int mm_fd;
12-
int pid;
13-
} u;
10+
int pid;
1411
unsigned long stack;
1512
int syscall_data_len;
1613
};

arch/um/kernel/reboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static void kill_off_processes(void)
2929
t = find_lock_task_mm(p);
3030
if (!t)
3131
continue;
32-
pid = t->mm->context.id.u.pid;
32+
pid = t->mm->context.id.pid;
3333
task_unlock(t);
3434
os_kill_ptraced_process(pid, 1);
3535
}

arch/um/kernel/skas/mmu.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
3232
new_id->stack = stack;
3333

3434
block_signals_trace();
35-
new_id->u.pid = start_userspace(stack);
35+
new_id->pid = start_userspace(stack);
3636
unblock_signals_trace();
3737

38-
if (new_id->u.pid < 0) {
39-
ret = new_id->u.pid;
38+
if (new_id->pid < 0) {
39+
ret = new_id->pid;
4040
goto out_free;
4141
}
4242

@@ -83,12 +83,12 @@ void destroy_context(struct mm_struct *mm)
8383
* whole UML suddenly dying. Also, cover negative and
8484
* 1 cases, since they shouldn't happen either.
8585
*/
86-
if (mmu->id.u.pid < 2) {
86+
if (mmu->id.pid < 2) {
8787
printk(KERN_ERR "corrupt mm_context - pid = %d\n",
88-
mmu->id.u.pid);
88+
mmu->id.pid);
8989
return;
9090
}
91-
os_kill_ptraced_process(mmu->id.u.pid, 1);
91+
os_kill_ptraced_process(mmu->id.pid, 1);
9292

9393
free_pages(mmu->id.stack, ilog2(STUB_DATA_PAGES));
9494
}

arch/um/kernel/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ static irqreturn_t um_timer(int irq, void *dev)
839839
if (get_current()->mm != NULL)
840840
{
841841
/* userspace - relay signal, results in correct userspace timers */
842-
os_alarm_process(get_current()->mm->context.id.u.pid);
842+
os_alarm_process(get_current()->mm->context.id.pid);
843843
}
844844

845845
(*timer_clockevent.event_handler)(&timer_clockevent);

arch/um/os-Linux/skas/mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static inline long do_syscall_stub(struct mm_id *mm_idp)
7878
{
7979
struct stub_data *proc_data = (void *)mm_idp->stack;
8080
int n, i;
81-
int err, pid = mm_idp->u.pid;
81+
int err, pid = mm_idp->pid;
8282

8383
n = ptrace_setregs(pid, syscall_regs);
8484
if (n < 0) {

arch/um/os-Linux/skas/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,5 +588,5 @@ void reboot_skas(void)
588588

589589
void __switch_mm(struct mm_id *mm_idp)
590590
{
591-
userspace_pid[0] = mm_idp->u.pid;
591+
userspace_pid[0] = mm_idp->pid;
592592
}

0 commit comments

Comments
 (0)