Tiny reordering of some fields of task_struct
PATCH 1/1 Tiny reordering of some fields of task_struct
(First post & first patch so please be kind O:))
Playing with some things (I'm just beginning with this whole kernel stuff) I found that there are three filesystem-related members in task_struct that aren't together:
/* file system info */
int link_count, total_link_count; /* ipc stuff */ struct sysv_sem sysvsem; /* CPU-specific state of this task */ struct thread_struct thread; /* filesystem information */ struct fs_struct *fs;
[...]
/* journalling filesystem info */
void *journal_info;
Perhaps there is some reason to have them as they are now but if that's not the case, this joins them together. It's against 2.6.12-rc3.
Signed-off-by David Serrano <[email protected]>
include/linux/sched.h renamed from include/linux/sched.h.orig +3 -6
@@ -616,14 +616,14 @@ struct task_struct {#endif int oomkilladj;/* OOM kill score adjustment (bit shift). */ char comm[TASK_COMM_LEN ]; -/* file system info */ +/* filesystem information */ int link_count, total_link_count; +struct fs_struct *fs; +void *journal_info;/* ipc stuff */ struct sysv_sem sysvsem;/* CPU-specific state of this task */ struct thread_struct thread; -/* filesystem information */ -struct fs_struct *fs;/* open file information */ struct files_struct *files;/* namespace */
@@ -654,9 +654,6 @@ struct task_struct {/* context-switch lock */ spinlock_t switch_lock; -/* journalling filesystem info */ -void *journal_info; -/* VM state */ struct reclaim_state *reclaim_state;
Signature · 1 line
David Serrano