[PATCH] sys_personality: Streamline code in sys_personality()
From: Wang ShaoBo
Date: Tue Nov 26 2019 - 04:42:50 EST
SYSCALL_DEFINE1 in kernel/exec_domain.c looks like verbose,
ksys_personality() can make it more concise.
Signed-off-by: Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx>
---
kernel/exec_domain.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c
index 33f07c5f2515..f7a0512ddc23 100644
--- a/kernel/exec_domain.c
+++ b/kernel/exec_domain.c
@@ -37,10 +37,5 @@ module_init(proc_execdomains_init);
SYSCALL_DEFINE1(personality, unsigned int, personality)
{
- unsigned int old = current->personality;
-
- if (personality != 0xffffffff)
- set_personality(personality);
-
- return old;
+ return ksys_personality(personality);
}
--
2.20.1