Skip to contentSkip to conversation

groups: move code to kernel/groups.c

PATCH In review Alexey Dobriyan 2 participants 2 messages May 9, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 groups: move code to kernel/groups.c

Move supplementary groups implementation to kernel/groups.c . kernel/sys.c already accumulated quite a few random stuff.

Do strictly copy/paste + add required headers to compile. Compile-tested on many configs and archs.

---

 kernel/Makefile |    1 
 kernel/groups.c |  288 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 kernel/sys.c    |  283 -------------------------------------------------------
 3 files changed, 289 insertions(+), 283 deletions(-)

commit fd2c48fd634112d40778af3d3b48531d5ce646e6

Author: Alexey Dobriyan <[email protected]>
Date:   Fri May 8 20:07:46 2009 +0400

groups: move

kernel/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-y     = sched.o fork.o exec_domain.o panic.o printk.o \
 	    hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
 	    notifier.o ksysfs.o pm_qos_params.o sched_clock.o cred.o \
 	    async.o
+obj-y += groups.o
 
 ifdef CONFIG_FUNCTION_TRACER
 # Do not trace debug files and internal ftrace files

new file mode 100644

kernel/groups.c new file +288 -0

288 lines not on this page · raw message

kernel/sys.c +0 -283

289 lines not on this page · raw message

#1 lore raw
Quoted 6 lines · Alexey Dobriyan

Move supplementary groups implementation to kernel/groups.c . kernel/sys.c already accumulated quite a few random stuff.

Do strictly copy/paste + add required headers to compile. Compile-tested on many configs and archs.

Quoted 7 lines

---

 kernel/Makefile |    1 
 kernel/groups.c |  288 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 kernel/sys.c    |  283 -------------------------------------------------------
 3 files changed, 289 insertions(+), 283 deletions(-)

If you touch this code (which code has not been touched for years), do it only if you are also willing to do a followup patch that fixes most of these checkpatch warnings:

total: 1 errors, 9 warnings, 0 checks, 584 lines checked

(Most of these are valid - and there's some other low hanging fruits as well which you will notice if you read the file.)

When creating a new file in kernel/ there's just no excuse for not doing it cleanly.

Thanks,

Ingo