Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=970a8645ca051225a32401e4c80b50fc0a49c081
Commit:     970a8645ca051225a32401e4c80b50fc0a49c081
Parent:     40aeb400f68090f92010920ddf284b672a1461b8
Author:     Alexey Dobriyan <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:30:09 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:42:59 2007 -0700

    user.c: #ifdef ->mq_bytes
    
    For those who deselect POSIX message queues.
    
    Reduces SLAB size of user_struct from 64 to 32 bytes here, SLUB size -- from
    40 bytes to 32 bytes.
    
    [EMAIL PROTECTED]: fix build]
    Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/sched.h |    2 ++
 kernel/user.c         |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5716658..884699f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -518,8 +518,10 @@ struct user_struct {
        atomic_t inotify_watches; /* How many inotify watches does this user 
have? */
        atomic_t inotify_devs;  /* How many inotify devs does this user have 
opened? */
 #endif
+#ifdef CONFIG_POSIX_MQUEUE
        /* protected by mq_lock */
        unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
+#endif
        unsigned long locked_shm; /* How many pages of mlocked shm ? */
 
 #ifdef CONFIG_KEYS
diff --git a/kernel/user.c b/kernel/user.c
index f42a68e..9cb6f64 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -44,7 +44,6 @@ struct user_struct root_user = {
        .processes      = ATOMIC_INIT(1),
        .files          = ATOMIC_INIT(0),
        .sigpending     = ATOMIC_INIT(0),
-       .mq_bytes       = 0,
        .locked_shm     = 0,
 #ifdef CONFIG_KEYS
        .uid_keyring    = &root_user_keyring,
@@ -341,8 +340,9 @@ struct user_struct * alloc_uid(struct user_namespace *ns, 
uid_t uid)
                atomic_set(&new->inotify_watches, 0);
                atomic_set(&new->inotify_devs, 0);
 #endif
-
+#ifdef CONFIG_POSIX_MQUEUE
                new->mq_bytes = 0;
+#endif
                new->locked_shm = 0;
 
                if (alloc_uid_keyring(new, current) < 0) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to