aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs/inode.c
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@us.ibm.com>2007-05-11 01:23:06 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 11:29:36 -0400
commitd78e53c89a820471837e0cb91fe36b7be1a7c9de (patch)
tree7f015a0c2b3584f56e1864a7621ffa033d911ccd /fs/autofs/inode.c
parent93ba0881176ace057bc3111c8bdd717a23cb75ed (diff)
Fix some coding-style errors in autofs
Fix coding style errors (extra spaces, long lines) in autofs and autofs4 files being modified for container/pidspace issues. 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: <containers@lists.osdl.org> Cc: 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/inode.c')
-rw-r--r--fs/autofs/inode.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index aa0b61ff8270..d8315e61731e 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -34,12 +34,12 @@ void autofs_kill_sb(struct super_block *sb)
34 if (!sbi) 34 if (!sbi)
35 goto out_kill_sb; 35 goto out_kill_sb;
36 36
37 if ( !sbi->catatonic ) 37 if (!sbi->catatonic)
38 autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */ 38 autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */
39 39
40 autofs_hash_nuke(sbi); 40 autofs_hash_nuke(sbi);
41 for ( n = 0 ; n < AUTOFS_MAX_SYMLINKS ; n++ ) { 41 for (n = 0; n < AUTOFS_MAX_SYMLINKS; n++) {
42 if ( test_bit(n, sbi->symlink_bitmap) ) 42 if (test_bit(n, sbi->symlink_bitmap))
43 kfree(sbi->symlink[n].data); 43 kfree(sbi->symlink[n].data);
44 } 44 }
45 45
@@ -69,7 +69,8 @@ static match_table_t autofs_tokens = {
69 {Opt_err, NULL} 69 {Opt_err, NULL}
70}; 70};
71 71
72static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid, pid_t *pgrp, int *minproto, int *maxproto) 72static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid,
73 pid_t *pgrp, int *minproto, int *maxproto)
73{ 74{
74 char *p; 75 char *p;
75 substring_t args[MAX_OPT_ARGS]; 76 substring_t args[MAX_OPT_ARGS];
@@ -140,7 +141,7 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
140 int minproto, maxproto; 141 int minproto, maxproto;
141 142
142 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); 143 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
143 if ( !sbi ) 144 if (!sbi)
144 goto fail_unlock; 145 goto fail_unlock;
145 DPRINTK(("autofs: starting up, sbi = %p\n",sbi)); 146 DPRINTK(("autofs: starting up, sbi = %p\n",sbi));
146 147
@@ -169,14 +170,16 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
169 goto fail_iput; 170 goto fail_iput;
170 171
171 /* Can this call block? - WTF cares? s is locked. */ 172 /* Can this call block? - WTF cares? s is locked. */
172 if ( parse_options(data,&pipefd,&root_inode->i_uid,&root_inode->i_gid,&sbi->oz_pgrp,&minproto,&maxproto) ) { 173 if (parse_options(data, &pipefd, &root_inode->i_uid,
174 &root_inode->i_gid, &sbi->oz_pgrp, &minproto,
175 &maxproto)) {
173 printk("autofs: called with bogus options\n"); 176 printk("autofs: called with bogus options\n");
174 goto fail_dput; 177 goto fail_dput;
175 } 178 }
176 179
177 /* Couldn't this be tested earlier? */ 180 /* Couldn't this be tested earlier? */
178 if ( minproto > AUTOFS_PROTO_VERSION || 181 if (minproto > AUTOFS_PROTO_VERSION ||
179 maxproto < AUTOFS_PROTO_VERSION ) { 182 maxproto < AUTOFS_PROTO_VERSION) {
180 printk("autofs: kernel does not match daemon version\n"); 183 printk("autofs: kernel does not match daemon version\n");
181 goto fail_dput; 184 goto fail_dput;
182 } 185 }
@@ -184,11 +187,11 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
184 DPRINTK(("autofs: pipe fd = %d, pgrp = %u\n", pipefd, sbi->oz_pgrp)); 187 DPRINTK(("autofs: pipe fd = %d, pgrp = %u\n", pipefd, sbi->oz_pgrp));
185 pipe = fget(pipefd); 188 pipe = fget(pipefd);
186 189
187 if ( !pipe ) { 190 if (!pipe) {
188 printk("autofs: could not open pipe file descriptor\n"); 191 printk("autofs: could not open pipe file descriptor\n");
189 goto fail_dput; 192 goto fail_dput;
190 } 193 }
191 if ( !pipe->f_op || !pipe->f_op->write ) 194 if (!pipe->f_op || !pipe->f_op->write)
192 goto fail_fput; 195 goto fail_fput;
193 sbi->pipe = pipe; 196 sbi->pipe = pipe;
194 sbi->catatonic = 0; 197 sbi->catatonic = 0;
@@ -230,7 +233,7 @@ static void autofs_read_inode(struct inode *inode)
230 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 233 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
231 inode->i_blocks = 0; 234 inode->i_blocks = 0;
232 235
233 if ( ino == AUTOFS_ROOT_INO ) { 236 if (ino == AUTOFS_ROOT_INO) {
234 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; 237 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
235 inode->i_op = &autofs_root_inode_operations; 238 inode->i_op = &autofs_root_inode_operations;
236 inode->i_fop = &autofs_root_operations; 239 inode->i_fop = &autofs_root_operations;
@@ -241,12 +244,12 @@ static void autofs_read_inode(struct inode *inode)
241 inode->i_uid = inode->i_sb->s_root->d_inode->i_uid; 244 inode->i_uid = inode->i_sb->s_root->d_inode->i_uid;
242 inode->i_gid = inode->i_sb->s_root->d_inode->i_gid; 245 inode->i_gid = inode->i_sb->s_root->d_inode->i_gid;
243 246
244 if ( ino >= AUTOFS_FIRST_SYMLINK && ino < AUTOFS_FIRST_DIR_INO ) { 247 if (ino >= AUTOFS_FIRST_SYMLINK && ino < AUTOFS_FIRST_DIR_INO) {
245 /* Symlink inode - should be in symlink list */ 248 /* Symlink inode - should be in symlink list */
246 struct autofs_symlink *sl; 249 struct autofs_symlink *sl;
247 250
248 n = ino - AUTOFS_FIRST_SYMLINK; 251 n = ino - AUTOFS_FIRST_SYMLINK;
249 if ( n >= AUTOFS_MAX_SYMLINKS || !test_bit(n,sbi->symlink_bitmap)) { 252 if (n >= AUTOFS_MAX_SYMLINKS || !test_bit(n,sbi->symlink_bitmap)) {
250 printk("autofs: Looking for bad symlink inode %u\n", (unsigned int) ino); 253 printk("autofs: Looking for bad symlink inode %u\n", (unsigned int) ino);
251 return; 254 return;
252 } 255 }