Messages in this thread Patch in this message | | | Subject | [PATCH] Remove unused "struct user_struct"->files. | From | Tetsuo Handa <> | Date | Mon, 14 Oct 2013 01:04:42 +0900 |
| |
I tried to inspect "struct user_struct"->files , but it seems to me that the value is always 0... This field is not used? ---------- >From e6f9007c5785d5c9817b8fb798542c44d1eefcc5 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Mon, 14 Oct 2013 00:19:19 +0900 Subject: [PATCH] Remove unused "struct user_struct"->files.
Remove no longer used field.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> --- include/linux/sched.h | 1 - kernel/user.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6682da3..baa18d5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -638,7 +638,6 @@ static inline int signal_group_exit(const struct signal_struct *sig) struct user_struct { atomic_t __count; /* reference count */ atomic_t processes; /* How many processes does this user have? */ - atomic_t files; /* How many open files does this user have? */ atomic_t sigpending; /* How many pending signals does this user have? */ #ifdef CONFIG_INOTIFY_USER atomic_t inotify_watches; /* How many inotify watches does this user have? */ diff --git a/kernel/user.c b/kernel/user.c index 5bbb919..3024ab8 100644 --- a/kernel/user.c +++ b/kernel/user.c @@ -83,7 +83,6 @@ static DEFINE_SPINLOCK(uidhash_lock); struct user_struct root_user = { .__count = ATOMIC_INIT(1), .processes = ATOMIC_INIT(1), - .files = ATOMIC_INIT(0), .sigpending = ATOMIC_INIT(0), .locked_shm = 0, .uid = GLOBAL_ROOT_UID, -- 1.7.1
| |