aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/inode.c')
-rw-r--r--fs/autofs4/inode.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 7bb3e5ba0537..c7e65bb30ba0 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -53,6 +53,8 @@ struct autofs_info *autofs4_init_ino(struct autofs_info *ino,
53 atomic_set(&ino->count, 0); 53 atomic_set(&ino->count, 0);
54 } 54 }
55 55
56 ino->uid = 0;
57 ino->gid = 0;
56 ino->mode = mode; 58 ino->mode = mode;
57 ino->last_used = jiffies; 59 ino->last_used = jiffies;
58 60
@@ -213,7 +215,7 @@ static const struct super_operations autofs4_sops = {
213enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto, 215enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto,
214 Opt_indirect, Opt_direct, Opt_offset}; 216 Opt_indirect, Opt_direct, Opt_offset};
215 217
216static match_table_t tokens = { 218static const match_table_t tokens = {
217 {Opt_fd, "fd=%u"}, 219 {Opt_fd, "fd=%u"},
218 {Opt_uid, "uid=%u"}, 220 {Opt_uid, "uid=%u"},
219 {Opt_gid, "gid=%u"}, 221 {Opt_gid, "gid=%u"},
@@ -288,7 +290,7 @@ static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid,
288 *type = AUTOFS_TYPE_DIRECT; 290 *type = AUTOFS_TYPE_DIRECT;
289 break; 291 break;
290 case Opt_offset: 292 case Opt_offset:
291 *type = AUTOFS_TYPE_DIRECT | AUTOFS_TYPE_OFFSET; 293 *type = AUTOFS_TYPE_OFFSET;
292 break; 294 break;
293 default: 295 default:
294 return 1; 296 return 1;
@@ -336,7 +338,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
336 sbi->sb = s; 338 sbi->sb = s;
337 sbi->version = 0; 339 sbi->version = 0;
338 sbi->sub_version = 0; 340 sbi->sub_version = 0;
339 sbi->type = 0; 341 sbi->type = AUTOFS_TYPE_INDIRECT;
340 sbi->min_proto = 0; 342 sbi->min_proto = 0;
341 sbi->max_proto = 0; 343 sbi->max_proto = 0;
342 mutex_init(&sbi->wq_mutex); 344 mutex_init(&sbi->wq_mutex);
@@ -378,7 +380,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
378 } 380 }
379 381
380 root_inode->i_fop = &autofs4_root_operations; 382 root_inode->i_fop = &autofs4_root_operations;
381 root_inode->i_op = sbi->type & AUTOFS_TYPE_DIRECT ? 383 root_inode->i_op = sbi->type & AUTOFS_TYPE_TRIGGER ?
382 &autofs4_direct_root_inode_operations : 384 &autofs4_direct_root_inode_operations :
383 &autofs4_indirect_root_inode_operations; 385 &autofs4_indirect_root_inode_operations;
384 386