Lines Matching refs:sbi

25 struct autofs_info *autofs4_new_ino(struct autofs_sb_info *sbi)  in autofs4_new_ino()  argument
32 ino->sbi = sbi; in autofs4_new_ino()
51 struct autofs_sb_info *sbi = autofs4_sbi(sb); in autofs4_kill_sb() local
59 if (sbi) { in autofs4_kill_sb()
61 autofs4_catatonic_mode(sbi); in autofs4_kill_sb()
62 put_pid(sbi->oz_pgrp); in autofs4_kill_sb()
67 if (sbi) in autofs4_kill_sb()
68 kfree_rcu(sbi, rcu); in autofs4_kill_sb()
73 struct autofs_sb_info *sbi = autofs4_sbi(root->d_sb); in autofs4_show_options() local
76 if (!sbi) in autofs4_show_options()
79 seq_printf(m, ",fd=%d", sbi->pipefd); in autofs4_show_options()
86 seq_printf(m, ",pgrp=%d", pid_vnr(sbi->oz_pgrp)); in autofs4_show_options()
87 seq_printf(m, ",timeout=%lu", sbi->exp_timeout/HZ); in autofs4_show_options()
88 seq_printf(m, ",minproto=%d", sbi->min_proto); in autofs4_show_options()
89 seq_printf(m, ",maxproto=%d", sbi->max_proto); in autofs4_show_options()
91 if (autofs_type_offset(sbi->type)) in autofs4_show_options()
93 else if (autofs_type_direct(sbi->type)) in autofs4_show_options()
211 struct autofs_sb_info *sbi; in autofs4_fill_super() local
217 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in autofs4_fill_super()
218 if (!sbi) in autofs4_fill_super()
220 DPRINTK("starting up, sbi = %p",sbi); in autofs4_fill_super()
222 s->s_fs_info = sbi; in autofs4_fill_super()
223 sbi->magic = AUTOFS_SBI_MAGIC; in autofs4_fill_super()
224 sbi->pipefd = -1; in autofs4_fill_super()
225 sbi->pipe = NULL; in autofs4_fill_super()
226 sbi->catatonic = 1; in autofs4_fill_super()
227 sbi->exp_timeout = 0; in autofs4_fill_super()
228 sbi->oz_pgrp = NULL; in autofs4_fill_super()
229 sbi->sb = s; in autofs4_fill_super()
230 sbi->version = 0; in autofs4_fill_super()
231 sbi->sub_version = 0; in autofs4_fill_super()
232 set_autofs_type_indirect(&sbi->type); in autofs4_fill_super()
233 sbi->min_proto = 0; in autofs4_fill_super()
234 sbi->max_proto = 0; in autofs4_fill_super()
235 mutex_init(&sbi->wq_mutex); in autofs4_fill_super()
236 mutex_init(&sbi->pipe_mutex); in autofs4_fill_super()
237 spin_lock_init(&sbi->fs_lock); in autofs4_fill_super()
238 sbi->queues = NULL; in autofs4_fill_super()
239 spin_lock_init(&sbi->lookup_lock); in autofs4_fill_super()
240 INIT_LIST_HEAD(&sbi->active_list); in autofs4_fill_super()
241 INIT_LIST_HEAD(&sbi->expiring_list); in autofs4_fill_super()
252 ino = autofs4_new_ino(sbi); in autofs4_fill_super()
267 &pgrp, &pgrp_set, &sbi->type, &sbi->min_proto, in autofs4_fill_super()
268 &sbi->max_proto)) { in autofs4_fill_super()
274 sbi->oz_pgrp = find_get_pid(pgrp); in autofs4_fill_super()
275 if (!sbi->oz_pgrp) { in autofs4_fill_super()
281 sbi->oz_pgrp = get_task_pid(current, PIDTYPE_PGID); in autofs4_fill_super()
284 if (autofs_type_trigger(sbi->type)) in autofs4_fill_super()
291 if (sbi->max_proto < AUTOFS_MIN_PROTO_VERSION || in autofs4_fill_super()
292 sbi->min_proto > AUTOFS_MAX_PROTO_VERSION) { in autofs4_fill_super()
295 sbi->min_proto, sbi->max_proto, in autofs4_fill_super()
301 if (sbi->max_proto > AUTOFS_MAX_PROTO_VERSION) in autofs4_fill_super()
302 sbi->version = AUTOFS_MAX_PROTO_VERSION; in autofs4_fill_super()
304 sbi->version = sbi->max_proto; in autofs4_fill_super()
305 sbi->sub_version = AUTOFS_PROTO_SUBVERSION; in autofs4_fill_super()
307 DPRINTK("pipe fd = %d, pgrp = %u", pipefd, pid_nr(sbi->oz_pgrp)); in autofs4_fill_super()
317 sbi->pipe = pipe; in autofs4_fill_super()
318 sbi->pipefd = pipefd; in autofs4_fill_super()
319 sbi->catatonic = 0; in autofs4_fill_super()
340 put_pid(sbi->oz_pgrp); in autofs4_fill_super()
341 kfree(sbi); in autofs4_fill_super()