aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4
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/autofs4
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/autofs4')
-rw-r--r--fs/autofs4/inode.c16
-rw-r--r--fs/autofs4/root.c18
2 files changed, 16 insertions, 18 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 5769a2f9ad60..692364e8ffc3 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -218,8 +218,7 @@ static match_table_t tokens = {
218}; 218};
219 219
220static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid, 220static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid,
221 pid_t *pgrp, unsigned int *type, 221 pid_t *pgrp, unsigned int *type, int *minproto, int *maxproto)
222 int *minproto, int *maxproto)
223{ 222{
224 char *p; 223 char *p;
225 substring_t args[MAX_OPT_ARGS]; 224 substring_t args[MAX_OPT_ARGS];
@@ -314,7 +313,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
314 struct autofs_info *ino; 313 struct autofs_info *ino;
315 314
316 sbi = kmalloc(sizeof(*sbi), GFP_KERNEL); 315 sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
317 if ( !sbi ) 316 if (!sbi)
318 goto fail_unlock; 317 goto fail_unlock;
319 DPRINTK("starting up, sbi = %p",sbi); 318 DPRINTK("starting up, sbi = %p",sbi);
320 319
@@ -363,10 +362,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
363 root->d_fsdata = ino; 362 root->d_fsdata = ino;
364 363
365 /* Can this call block? */ 364 /* Can this call block? */
366 if (parse_options(data, &pipefd, 365 if (parse_options(data, &pipefd, &root_inode->i_uid, &root_inode->i_gid,
367 &root_inode->i_uid, &root_inode->i_gid, 366 &sbi->oz_pgrp, &sbi->type, &sbi->min_proto,
368 &sbi->oz_pgrp, &sbi->type, 367 &sbi->max_proto)) {
369 &sbi->min_proto, &sbi->max_proto)) {
370 printk("autofs: called with bogus options\n"); 368 printk("autofs: called with bogus options\n");
371 goto fail_dput; 369 goto fail_dput;
372 } 370 }
@@ -396,11 +394,11 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
396 DPRINTK("pipe fd = %d, pgrp = %u", pipefd, sbi->oz_pgrp); 394 DPRINTK("pipe fd = %d, pgrp = %u", pipefd, sbi->oz_pgrp);
397 pipe = fget(pipefd); 395 pipe = fget(pipefd);
398 396
399 if ( !pipe ) { 397 if (!pipe) {
400 printk("autofs: could not open pipe file descriptor\n"); 398 printk("autofs: could not open pipe file descriptor\n");
401 goto fail_dput; 399 goto fail_dput;
402 } 400 }
403 if ( !pipe->f_op || !pipe->f_op->write ) 401 if (!pipe->f_op || !pipe->f_op->write)
404 goto fail_fput; 402 goto fail_fput;
405 sbi->pipe = pipe; 403 sbi->pipe = pipe;
406 sbi->pipefd = pipefd; 404 sbi->pipefd = pipefd;
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 15170f4e13a7..2d4c8a3e604e 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -759,7 +759,7 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry)
759 struct autofs_info *p_ino; 759 struct autofs_info *p_ino;
760 760
761 /* This allows root to remove symlinks */ 761 /* This allows root to remove symlinks */
762 if ( !autofs4_oz_mode(sbi) && !capable(CAP_SYS_ADMIN) ) 762 if (!autofs4_oz_mode(sbi) && !capable(CAP_SYS_ADMIN))
763 return -EACCES; 763 return -EACCES;
764 764
765 if (atomic_dec_and_test(&ino->count)) { 765 if (atomic_dec_and_test(&ino->count)) {
@@ -833,7 +833,7 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode)
833 struct autofs_info *p_ino; 833 struct autofs_info *p_ino;
834 struct inode *inode; 834 struct inode *inode;
835 835
836 if ( !autofs4_oz_mode(sbi) ) 836 if (!autofs4_oz_mode(sbi))
837 return -EACCES; 837 return -EACCES;
838 838
839 DPRINTK("dentry %p, creating %.*s", 839 DPRINTK("dentry %p, creating %.*s",
@@ -871,11 +871,11 @@ static inline int autofs4_get_set_timeout(struct autofs_sb_info *sbi,
871 int rv; 871 int rv;
872 unsigned long ntimeout; 872 unsigned long ntimeout;
873 873
874 if ( (rv = get_user(ntimeout, p)) || 874 if ((rv = get_user(ntimeout, p)) ||
875 (rv = put_user(sbi->exp_timeout/HZ, p)) ) 875 (rv = put_user(sbi->exp_timeout/HZ, p)))
876 return rv; 876 return rv;
877 877
878 if ( ntimeout > ULONG_MAX/HZ ) 878 if (ntimeout > ULONG_MAX/HZ)
879 sbi->exp_timeout = 0; 879 sbi->exp_timeout = 0;
880 else 880 else
881 sbi->exp_timeout = ntimeout * HZ; 881 sbi->exp_timeout = ntimeout * HZ;
@@ -906,7 +906,7 @@ static inline int autofs4_ask_reghost(struct autofs_sb_info *sbi, int __user *p)
906 DPRINTK("returning %d", sbi->needs_reghost); 906 DPRINTK("returning %d", sbi->needs_reghost);
907 907
908 status = put_user(sbi->needs_reghost, p); 908 status = put_user(sbi->needs_reghost, p);
909 if ( status ) 909 if (status)
910 return status; 910 return status;
911 911
912 sbi->needs_reghost = 0; 912 sbi->needs_reghost = 0;
@@ -975,11 +975,11 @@ static int autofs4_root_ioctl(struct inode *inode, struct file *filp,
975 DPRINTK("cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u", 975 DPRINTK("cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u",
976 cmd,arg,sbi,process_group(current)); 976 cmd,arg,sbi,process_group(current));
977 977
978 if ( _IOC_TYPE(cmd) != _IOC_TYPE(AUTOFS_IOC_FIRST) || 978 if (_IOC_TYPE(cmd) != _IOC_TYPE(AUTOFS_IOC_FIRST) ||
979 _IOC_NR(cmd) - _IOC_NR(AUTOFS_IOC_FIRST) >= AUTOFS_IOC_COUNT ) 979 _IOC_NR(cmd) - _IOC_NR(AUTOFS_IOC_FIRST) >= AUTOFS_IOC_COUNT)
980 return -ENOTTY; 980 return -ENOTTY;
981 981
982 if ( !autofs4_oz_mode(sbi) && !capable(CAP_SYS_ADMIN) ) 982 if (!autofs4_oz_mode(sbi) && !capable(CAP_SYS_ADMIN))
983 return -EPERM; 983 return -EPERM;
984 984
985 switch(cmd) { 985 switch(cmd) {