aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs/autofs_i.h
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@us.ibm.com>2007-05-11 01:23:08 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 11:29:36 -0400
commitfa0334f19f0e1a1e570fc2a160dfe53536599ade (patch)
treed223dcb53af7b5dd80958a1710c335ca942e1bcc /fs/autofs/autofs_i.h
parentd78e53c89a820471837e0cb91fe36b7be1a7c9de (diff)
Replace pid_t in autofs with struct pid reference
Make autofs container-friendly by caching struct pid reference rather than pid_t and using pid_nr() to retreive a task's pid_t. ChangeLog: - Fix Eric Biederman's comments - Use find_get_pid() to hold a reference to oz_pgrp and release while unmounting; separate out changes to autofs and autofs4. - Fix Cedric's comments: retain old prototype of parse_options() and move necessary change to its caller. Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: containers@lists.osdl.org Acked-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs/autofs_i.h')
-rw-r--r--fs/autofs/autofs_i.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/autofs/autofs_i.h b/fs/autofs/autofs_i.h
index 4ef544434b51..8b4cca3c4705 100644
--- a/fs/autofs/autofs_i.h
+++ b/fs/autofs/autofs_i.h
@@ -101,7 +101,7 @@ struct autofs_symlink {
101struct autofs_sb_info { 101struct autofs_sb_info {
102 u32 magic; 102 u32 magic;
103 struct file *pipe; 103 struct file *pipe;
104 pid_t oz_pgrp; 104 struct pid *oz_pgrp;
105 int catatonic; 105 int catatonic;
106 struct super_block *sb; 106 struct super_block *sb;
107 unsigned long exp_timeout; 107 unsigned long exp_timeout;
@@ -122,7 +122,7 @@ static inline struct autofs_sb_info *autofs_sbi(struct super_block *sb)
122 filesystem without "magic".) */ 122 filesystem without "magic".) */
123 123
124static inline int autofs_oz_mode(struct autofs_sb_info *sbi) { 124static inline int autofs_oz_mode(struct autofs_sb_info *sbi) {
125 return sbi->catatonic || process_group(current) == sbi->oz_pgrp; 125 return sbi->catatonic || task_pgrp(current) == sbi->oz_pgrp;
126} 126}
127 127
128/* Hash operations */ 128/* Hash operations */