mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Tiny reordering of some fields of task_struct
@ 2005-04-28 20:17 David Serrano
  0 siblings, 0 replies; only message in thread
From: David Serrano @ 2005-04-28 20:17 UTC (permalink / raw)
  To: linux-kernel

(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 <dserrano5@gmail.com>

--- linux-2.6.12-rc3/include/linux/sched.h.orig	2005-04-28 22:05:05.000000000 +0200
+++ linux-2.6.12-rc3/include/linux/sched.h	2005-04-28 22:05:07.000000000 +0200
@@ -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;
 


-- 
 David Serrano

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-28 20:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-28 20:17 [PATCH] Tiny reordering of some fields of task_struct David Serrano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®