Lines Matching refs:sbi
68 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_add_active() local
73 spin_lock(&sbi->lookup_lock); in autofs_add_active()
76 list_add(&ino->active, &sbi->active_list); in autofs_add_active()
79 spin_unlock(&sbi->lookup_lock); in autofs_add_active()
85 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_del_active() local
90 spin_lock(&sbi->lookup_lock); in autofs_del_active()
96 spin_unlock(&sbi->lookup_lock); in autofs_del_active()
103 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_dir_open() local
107 if (autofs_oz_mode(sbi)) in autofs_dir_open()
119 spin_lock(&sbi->lookup_lock); in autofs_dir_open()
121 spin_unlock(&sbi->lookup_lock); in autofs_dir_open()
124 spin_unlock(&sbi->lookup_lock); in autofs_dir_open()
133 struct autofs_sb_info *sbi = autofs_sbi(de->d_sb); in autofs_dentry_release() local
140 if (sbi) { in autofs_dentry_release()
141 spin_lock(&sbi->lookup_lock); in autofs_dentry_release()
146 spin_unlock(&sbi->lookup_lock); in autofs_dentry_release()
154 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_lookup_active() local
162 head = &sbi->active_list; in autofs_lookup_active()
165 spin_lock(&sbi->lookup_lock); in autofs_lookup_active()
195 spin_unlock(&sbi->lookup_lock); in autofs_lookup_active()
201 spin_unlock(&sbi->lookup_lock); in autofs_lookup_active()
209 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_lookup_expiring() local
217 head = &sbi->expiring_list; in autofs_lookup_expiring()
220 spin_lock(&sbi->lookup_lock); in autofs_lookup_expiring()
227 spin_unlock(&sbi->lookup_lock); in autofs_lookup_expiring()
255 spin_unlock(&sbi->lookup_lock); in autofs_lookup_expiring()
261 spin_unlock(&sbi->lookup_lock); in autofs_lookup_expiring()
268 struct autofs_sb_info *sbi = autofs_sbi(path->dentry->d_sb); in autofs_mount_wait() local
276 status = autofs_wait(sbi, path, NFY_MOUNT); in autofs_mount_wait()
310 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_mountpoint_changed() local
316 if (autofs_type_indirect(sbi->type) && d_unhashed(dentry)) { in autofs_mountpoint_changed()
335 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_d_automount() local
342 if (autofs_oz_mode(sbi)) in autofs_d_automount()
358 spin_lock(&sbi->fs_lock); in autofs_d_automount()
360 spin_unlock(&sbi->fs_lock); in autofs_d_automount()
373 spin_unlock(&sbi->fs_lock); in autofs_d_automount()
389 if (sbi->version > 4) { in autofs_d_automount()
391 spin_unlock(&sbi->fs_lock); in autofs_d_automount()
396 spin_unlock(&sbi->fs_lock); in autofs_d_automount()
401 spin_unlock(&sbi->fs_lock); in autofs_d_automount()
403 spin_lock(&sbi->fs_lock); in autofs_d_automount()
406 spin_unlock(&sbi->fs_lock); in autofs_d_automount()
410 spin_unlock(&sbi->fs_lock); in autofs_d_automount()
423 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_d_manage() local
430 if (autofs_oz_mode(sbi)) { in autofs_d_manage()
472 spin_lock(&sbi->fs_lock); in autofs_d_manage()
491 spin_unlock(&sbi->fs_lock); in autofs_d_manage()
500 struct autofs_sb_info *sbi; in autofs_lookup() local
510 sbi = autofs_sbi(dir->i_sb); in autofs_lookup()
513 current->pid, task_pgrp_nr(current), sbi->catatonic, in autofs_lookup()
514 autofs_oz_mode(sbi)); in autofs_lookup()
526 if (!autofs_oz_mode(sbi) && !IS_ROOT(dentry->d_parent)) in autofs_lookup()
531 autofs_type_indirect(sbi->type)) in autofs_lookup()
534 ino = autofs_new_ino(sbi); in autofs_lookup()
550 struct autofs_sb_info *sbi = autofs_sbi(dir->i_sb); in autofs_dir_symlink() local
559 if (!autofs_oz_mode(sbi)) in autofs_dir_symlink()
566 if (sbi->catatonic) in autofs_dir_symlink()
618 struct autofs_sb_info *sbi = autofs_sbi(dir->i_sb); in autofs_dir_unlink() local
622 if (!autofs_oz_mode(sbi)) in autofs_dir_unlink()
629 if (sbi->catatonic) in autofs_dir_unlink()
644 spin_lock(&sbi->lookup_lock); in autofs_dir_unlink()
647 spin_unlock(&sbi->lookup_lock); in autofs_dir_unlink()
704 struct autofs_sb_info *sbi = autofs_sbi(dir->i_sb); in autofs_dir_rmdir() local
710 if (!autofs_oz_mode(sbi)) in autofs_dir_rmdir()
717 if (sbi->catatonic) in autofs_dir_rmdir()
720 spin_lock(&sbi->lookup_lock); in autofs_dir_rmdir()
722 spin_unlock(&sbi->lookup_lock); in autofs_dir_rmdir()
727 spin_unlock(&sbi->lookup_lock); in autofs_dir_rmdir()
729 if (sbi->version < 5) in autofs_dir_rmdir()
750 struct autofs_sb_info *sbi = autofs_sbi(dir->i_sb); in autofs_dir_mkdir() local
755 if (!autofs_oz_mode(sbi)) in autofs_dir_mkdir()
762 if (sbi->catatonic) in autofs_dir_mkdir()
778 if (sbi->version < 5) in autofs_dir_mkdir()
794 static inline int autofs_compat_get_set_timeout(struct autofs_sb_info *sbi, in autofs_compat_get_set_timeout() argument
804 rv = put_user(sbi->exp_timeout/HZ, p); in autofs_compat_get_set_timeout()
809 sbi->exp_timeout = 0; in autofs_compat_get_set_timeout()
811 sbi->exp_timeout = ntimeout * HZ; in autofs_compat_get_set_timeout()
819 static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi, in autofs_get_set_timeout() argument
829 rv = put_user(sbi->exp_timeout/HZ, p); in autofs_get_set_timeout()
834 sbi->exp_timeout = 0; in autofs_get_set_timeout()
836 sbi->exp_timeout = ntimeout * HZ; in autofs_get_set_timeout()
844 static inline int autofs_get_protover(struct autofs_sb_info *sbi, in autofs_get_protover() argument
847 return put_user(sbi->version, p); in autofs_get_protover()
851 static inline int autofs_get_protosubver(struct autofs_sb_info *sbi, in autofs_get_protosubver() argument
854 return put_user(sbi->sub_version, p); in autofs_get_protosubver()
892 struct autofs_sb_info *sbi = autofs_sbi(inode->i_sb); in autofs_root_ioctl_unlocked() local
896 cmd, arg, sbi, task_pgrp_nr(current)); in autofs_root_ioctl_unlocked()
902 if (!autofs_oz_mode(sbi) && !capable(CAP_SYS_ADMIN)) in autofs_root_ioctl_unlocked()
907 return autofs_wait_release(sbi, (autofs_wqt_t) arg, 0); in autofs_root_ioctl_unlocked()
909 return autofs_wait_release(sbi, (autofs_wqt_t) arg, -ENOENT); in autofs_root_ioctl_unlocked()
911 autofs_catatonic_mode(sbi); in autofs_root_ioctl_unlocked()
914 return autofs_get_protover(sbi, p); in autofs_root_ioctl_unlocked()
916 return autofs_get_protosubver(sbi, p); in autofs_root_ioctl_unlocked()
918 return autofs_get_set_timeout(sbi, p); in autofs_root_ioctl_unlocked()
921 return autofs_compat_get_set_timeout(sbi, p); in autofs_root_ioctl_unlocked()
929 return autofs_expire_run(inode->i_sb, filp->f_path.mnt, sbi, p); in autofs_root_ioctl_unlocked()
933 filp->f_path.mnt, sbi, p); in autofs_root_ioctl_unlocked()