kernel: add do_getpgid() helper; remove internal call to sys_getpgid()
Using the do_getpgid() helper removes an in-kernel call to the sys_getpgid() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
parent
31c213f210
commit
192c58073d
|
@ -1027,7 +1027,7 @@ out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCALL_DEFINE1(getpgid, pid_t, pid)
|
static int do_getpgid(pid_t pid)
|
||||||
{
|
{
|
||||||
struct task_struct *p;
|
struct task_struct *p;
|
||||||
struct pid *grp;
|
struct pid *grp;
|
||||||
|
@ -1055,11 +1055,16 @@ out:
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SYSCALL_DEFINE1(getpgid, pid_t, pid)
|
||||||
|
{
|
||||||
|
return do_getpgid(pid);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __ARCH_WANT_SYS_GETPGRP
|
#ifdef __ARCH_WANT_SYS_GETPGRP
|
||||||
|
|
||||||
SYSCALL_DEFINE0(getpgrp)
|
SYSCALL_DEFINE0(getpgrp)
|
||||||
{
|
{
|
||||||
return sys_getpgid(0);
|
return do_getpgid(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue