Home
last modified time | relevance | path

Searched refs:mnt (Results 1 – 25 of 156) sorted by relevance

1234567

/fs/
Dnamespace.c53 static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) in hash() argument
55 unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); in hash()
64 static int mnt_alloc_id(struct vfsmount *mnt) in mnt_alloc_id() argument
71 res = ida_get_new(&mnt_id_ida, &mnt->mnt_id); in mnt_alloc_id()
79 static void mnt_free_id(struct vfsmount *mnt) in mnt_free_id() argument
82 ida_remove(&mnt_id_ida, mnt->mnt_id); in mnt_free_id()
91 static int mnt_alloc_group_id(struct vfsmount *mnt) in mnt_alloc_group_id() argument
96 return ida_get_new_above(&mnt_group_ida, 1, &mnt->mnt_group_id); in mnt_alloc_group_id()
102 void mnt_release_group_id(struct vfsmount *mnt) in mnt_release_group_id() argument
104 ida_remove(&mnt_group_ida, mnt->mnt_group_id); in mnt_release_group_id()
[all …]
Dpnode.c36 static bool is_path_reachable(struct vfsmount *mnt, struct dentry *dentry, in is_path_reachable() argument
39 while (mnt != root->mnt && mnt->mnt_parent != mnt) { in is_path_reachable()
40 dentry = mnt->mnt_mountpoint; in is_path_reachable()
41 mnt = mnt->mnt_parent; in is_path_reachable()
43 return mnt == root->mnt && is_subdir(dentry, root->dentry); in is_path_reachable()
46 static struct vfsmount *get_peer_under_root(struct vfsmount *mnt, in get_peer_under_root() argument
50 struct vfsmount *m = mnt; in get_peer_under_root()
58 } while (m != mnt); in get_peer_under_root()
69 int get_dominating_id(struct vfsmount *mnt, const struct path *root) in get_dominating_id() argument
73 for (m = mnt->mnt_master; m != NULL; m = m->mnt_master) { in get_dominating_id()
[all …]
Dpnode.h14 #define IS_MNT_SHARED(mnt) (mnt->mnt_flags & MNT_SHARED) argument
15 #define IS_MNT_SLAVE(mnt) (mnt->mnt_master) argument
16 #define IS_MNT_NEW(mnt) (!mnt->mnt_ns) argument
17 #define CLEAR_MNT_SHARED(mnt) (mnt->mnt_flags &= ~MNT_SHARED) argument
18 #define IS_MNT_UNBINDABLE(mnt) (mnt->mnt_flags & MNT_UNBINDABLE) argument
27 static inline void set_mnt_shared(struct vfsmount *mnt) in set_mnt_shared() argument
29 mnt->mnt_flags &= ~MNT_PNODE_MASK; in set_mnt_shared()
30 mnt->mnt_flags |= MNT_SHARED; in set_mnt_shared()
39 int get_dominating_id(struct vfsmount *mnt, const struct path *root);
Dsuper.c604 struct vfsmount *mnt; in mark_files_ro() local
615 mnt = mntget(f->f_path.mnt); in mark_files_ro()
621 mnt_drop_write(mnt); in mark_files_ro()
622 mntput(mnt); in mark_files_ro()
782 struct vfsmount *mnt) in get_sb_bdev() argument
834 return simple_set_mnt(mnt, s); in get_sb_bdev()
863 struct vfsmount *mnt) in get_sb_nodev() argument
880 return simple_set_mnt(mnt, s); in get_sb_nodev()
893 struct vfsmount *mnt) in get_sb_single() argument
912 return simple_set_mnt(mnt, s); in get_sb_single()
[all …]
Dnfsctl.c28 struct vfsmount *mnt; in do_open() local
31 mnt = do_kern_mount("nfsd", 0, "nfsd", NULL); in do_open()
32 if (IS_ERR(mnt)) in do_open()
33 return (struct file *)mnt; in do_open()
35 error = vfs_path_lookup(mnt->mnt_root, mnt, name, 0, &nd); in do_open()
36 mntput(mnt); /* drop do_kern_mount reference */ in do_open()
47 return dentry_open(nd.path.dentry, nd.path.mnt, flags, in do_open()
Dfile_table.c166 struct file *alloc_file(struct vfsmount *mnt, struct dentry *dentry, in alloc_file() argument
176 init_file(file, mnt, dentry, mode, fop); in alloc_file()
198 int init_file(struct file *file, struct vfsmount *mnt, struct dentry *dentry, in init_file() argument
203 file->f_path.mnt = mntget(mnt); in init_file()
216 error = mnt_want_write(mnt); in init_file()
241 struct vfsmount *mnt = file->f_path.mnt; in drop_file_write_access() local
251 mnt_drop_write(mnt); in drop_file_write_access()
262 struct vfsmount *mnt = file->f_path.mnt; in __fput() local
290 file->f_path.mnt = NULL; in __fput()
293 mntput(mnt); in __fput()
Dnamei.c347 mntget(path->mnt); in path_get()
361 mntput(path->mnt); in path_put()
595 if (path->mnt != nd->path.mnt) in path_put_conditional()
596 mntput(path->mnt); in path_put_conditional()
602 if (nd->path.mnt != path->mnt) in path_to_nameidata()
603 mntput(nd->path.mnt); in path_to_nameidata()
604 nd->path.mnt = path->mnt; in path_to_nameidata()
614 touch_atime(path->mnt, dentry); in __do_follow_link()
617 if (path->mnt != nd->path.mnt) { in __do_follow_link()
621 mntget(path->mnt); in __do_follow_link()
[all …]
Dopen.c248 error = mnt_want_write(path.mnt); in do_sys_truncate()
283 mnt_drop_write(path.mnt); in do_sys_truncate()
491 if (path.mnt->mnt_flags & MNT_NOEXEC) in SYSCALL_DEFINE3()
509 if (__mnt_is_readonly(path.mnt)) in SYSCALL_DEFINE3()
614 err = mnt_want_write(file->f_path.mnt); in SYSCALL_DEFINE2()
624 mnt_drop_write(file->f_path.mnt); in SYSCALL_DEFINE2()
643 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE3()
653 mnt_drop_write(path.mnt); in SYSCALL_DEFINE3()
698 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE3()
702 mnt_drop_write(path.mnt); in SYSCALL_DEFINE3()
[all …]
Dxattr.c264 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE5()
267 mnt_drop_write(path.mnt); in SYSCALL_DEFINE5()
283 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE5()
286 mnt_drop_write(path.mnt); in SYSCALL_DEFINE5()
304 error = mnt_want_write(f->f_path.mnt); in SYSCALL_DEFINE5()
307 mnt_drop_write(f->f_path.mnt); in SYSCALL_DEFINE5()
493 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE2()
496 mnt_drop_write(path.mnt); in SYSCALL_DEFINE2()
511 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE2()
514 mnt_drop_write(path.mnt); in SYSCALL_DEFINE2()
[all …]
/fs/smbfs/
Dinode.c355 parse_options(struct smb_mount_data_kernel *mnt, char *options) in parse_options() argument
378 mnt->version = value; in parse_options()
381 mnt->uid = value; in parse_options()
385 mnt->gid = value; in parse_options()
389 mnt->file_mode = (value & S_IRWXUGO) | S_IFREG; in parse_options()
393 mnt->dir_mode = (value & S_IRWXUGO) | S_IFDIR; in parse_options()
397 strlcpy(mnt->codepage.local_name, optarg, in parse_options()
401 strlcpy(mnt->codepage.remote_name, optarg, in parse_options()
405 mnt->ttl = value; in parse_options()
413 mnt->flags = flags; in parse_options()
[all …]
/fs/nfs/
Dnamespace.c99 struct vfsmount *mnt; in nfs_follow_mountpoint() local
126 mnt = nfs_do_refmount(nd->path.mnt, nd->path.dentry); in nfs_follow_mountpoint()
128 mnt = nfs_do_submount(nd->path.mnt, nd->path.dentry, &fh, in nfs_follow_mountpoint()
130 err = PTR_ERR(mnt); in nfs_follow_mountpoint()
131 if (IS_ERR(mnt)) in nfs_follow_mountpoint()
134 mntget(mnt); in nfs_follow_mountpoint()
135 err = do_add_mount(mnt, &nd->path, nd->path.mnt->mnt_flags|MNT_SHRINKABLE, in nfs_follow_mountpoint()
138 mntput(mnt); in nfs_follow_mountpoint()
144 nd->path.mnt = mnt; in nfs_follow_mountpoint()
145 nd->path.dentry = dget(mnt->mnt_root); in nfs_follow_mountpoint()
[all …]
Dsuper.c232 int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt);
266 int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt);
268 int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt);
270 int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt);
571 static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) in nfs_show_options() argument
573 struct nfs_server *nfss = NFS_SB(mnt->mnt_sb); in nfs_show_options()
587 static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) in nfs_show_stats() argument
590 struct nfs_server *nfss = NFS_SB(mnt->mnt_sb); in nfs_show_stats()
600 seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? "ro" : "rw"); in nfs_show_stats()
601 seq_puts(m, mnt->mnt_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : ""); in nfs_show_stats()
[all …]
Dnfs4namespace.c102 struct vfsmount *mnt = ERR_PTR(-ENOENT); in try_location() local
109 return mnt; in try_location()
138 mnt = vfs_kern_mount(&nfs4_referral_fs_type, 0, page, mountdata); in try_location()
139 if (!IS_ERR(mnt)) in try_location()
142 return mnt; in try_location()
156 struct vfsmount *mnt = ERR_PTR(-ENOENT); in nfs_follow_referral() local
182 mnt = ERR_PTR(error); in nfs_follow_referral()
193 mnt = try_location(&mountdata, page, page2, location); in nfs_follow_referral()
194 if (!IS_ERR(mnt)) in nfs_follow_referral()
202 return mnt; in nfs_follow_referral()
[all …]
/fs/autofs4/
Dexpire.c48 static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) in autofs4_mount_busy() argument
56 mntget(mnt); in autofs4_mount_busy()
59 if (!follow_down(&mnt, &dentry)) in autofs4_mount_busy()
78 if (!may_umount_tree(mnt)) { in autofs4_mount_busy()
88 mntput(mnt); in autofs4_mount_busy()
119 static int autofs4_direct_busy(struct vfsmount *mnt, in autofs4_direct_busy() argument
128 if (!may_umount_tree(mnt)) { in autofs4_direct_busy()
145 static int autofs4_tree_busy(struct vfsmount *mnt, in autofs4_tree_busy() argument
179 if (autofs4_mount_busy(mnt, p)) { in autofs4_tree_busy()
218 static struct dentry *autofs4_check_leaves(struct vfsmount *mnt, in autofs4_check_leaves() argument
[all …]
Ddev-ioctl.c220 while (follow_down(&nd->path.mnt, &nd->path.dentry)) { in autofs_dev_ioctl_find_super()
259 while (follow_down(&nd->path.mnt, &nd->path.dentry)) { in autofs_dev_ioctl_find_sbi_type()
312 filp = dentry_open(nd.path.dentry, nd.path.mnt, O_RDONLY, in autofs_dev_ioctl_open_mountpoint()
529 struct vfsmount *mnt; in autofs_dev_ioctl_expire() local
534 mnt = fp->f_path.mnt; in autofs_dev_ioctl_expire()
537 dentry = autofs4_expire_direct(sbi->sb, mnt, sbi, how); in autofs_dev_ioctl_expire()
539 dentry = autofs4_expire_indirect(sbi->sb, mnt, sbi, how); in autofs_dev_ioctl_expire()
570 if (may_umount(fp->f_path.mnt)) in autofs_dev_ioctl_askumount()
645 nd.path.mnt->mnt_root == nd.path.dentry) { in autofs_dev_ioctl_ismountpoint()
664 if (nd.path.mnt->mnt_mountpoint != nd.path.mnt->mnt_root) { in autofs_dev_ioctl_ismountpoint()
[all …]
/fs/exportfs/
Dexpfs.c22 static int get_name(struct vfsmount *mnt, struct dentry *dentry, char *name,
26 static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir, in exportfs_get_name() argument
34 return get_name(mnt, dir, name, child); in exportfs_get_name()
98 reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) in reconnect_path() argument
120 } else if (pd == mnt->mnt_sb->s_root) { in reconnect_path()
146 if (mnt->mnt_sb->s_export_op->get_parent) in reconnect_path()
147 ppd = mnt->mnt_sb->s_export_op->get_parent(pd); in reconnect_path()
160 err = exportfs_get_name(mnt, ppd, nbuf, pd); in reconnect_path()
250 static int get_name(struct vfsmount *mnt, struct dentry *dentry, in get_name() argument
268 file = dentry_open(dget(dentry), mntget(mnt), O_RDONLY, cred); in get_name()
[all …]
/fs/cifs/
Dcifs_dfs_ref.c245 struct vfsmount *mnt; in cifs_dfs_do_refmount() local
256 mnt = vfs_kern_mount(&cifs_fs_type, 0, devname, mountdata); in cifs_dfs_do_refmount()
259 return mnt; in cifs_dfs_do_refmount()
270 err = do_add_mount(newmnt, &nd->path, nd->path.mnt->mnt_flags, mntlist); in add_mount_helper()
274 nd->path.mnt = newmnt; in add_mount_helper()
282 follow_down(&nd->path.mnt, &nd->path.dentry)) in add_mount_helper()
312 struct vfsmount *mnt = ERR_PTR(-ENOENT); in cifs_dfs_follow_mountpoint() local
358 mnt = cifs_dfs_do_refmount(nd->path.mnt, in cifs_dfs_follow_mountpoint()
363 referrals[i].node_name, mnt)); in cifs_dfs_follow_mountpoint()
366 if (!IS_ERR(mnt)) in cifs_dfs_follow_mountpoint()
[all …]
/fs/devpts/
Dinode.c363 void *data, struct vfsmount *mnt) in new_pts_mount() argument
369 err = get_sb_nodev(fs_type, flags, data, devpts_fill_super, mnt); in new_pts_mount()
373 fsi = DEVPTS_SB(mnt->mnt_sb); in new_pts_mount()
380 err = mknod_ptmx(mnt->mnt_sb); in new_pts_mount()
387 dput(mnt->mnt_sb->s_root); in new_pts_mount()
388 deactivate_super(mnt->mnt_sb); in new_pts_mount()
436 void *data, struct vfsmount *mnt) in get_init_pts_sb() argument
456 return simple_set_mnt(mnt, s); in get_init_pts_sb()
465 void *data, struct vfsmount *mnt) in init_pts_mount() argument
469 err = get_init_pts_sb(fs_type, flags, data, mnt); in init_pts_mount()
[all …]
/fs/ext4/
Dioctl.c47 err = mnt_want_write(filp->f_path.mnt); in ext4_ioctl()
128 mnt_drop_write(filp->f_path.mnt); in ext4_ioctl()
144 err = mnt_want_write(filp->f_path.mnt); in ext4_ioctl()
165 mnt_drop_write(filp->f_path.mnt); in ext4_ioctl()
203 err = mnt_want_write(filp->f_path.mnt); in ext4_ioctl()
213 mnt_drop_write(filp->f_path.mnt); in ext4_ioctl()
229 err = mnt_want_write(filp->f_path.mnt); in ext4_ioctl()
239 mnt_drop_write(filp->f_path.mnt); in ext4_ioctl()
250 err = mnt_want_write(filp->f_path.mnt); in ext4_ioctl()
262 mnt_drop_write(filp->f_path.mnt); in ext4_ioctl()
/fs/proc/
Droot.c39 int flags, const char *dev_name, void *data, struct vfsmount *mnt) in proc_get_sb() argument
83 ns->proc_mnt = mnt; in proc_get_sb()
86 return simple_set_mnt(mnt, sb); in proc_get_sb()
141 static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat in proc_root_getattr() argument
210 struct vfsmount *mnt; in pid_ns_prepare_proc() local
212 mnt = kern_mount_data(&proc_fs_type, ns); in pid_ns_prepare_proc()
213 if (IS_ERR(mnt)) in pid_ns_prepare_proc()
214 return PTR_ERR(mnt); in pid_ns_prepare_proc()
/fs/ext3/
Dioctl.c42 err = mnt_want_write(filp->f_path.mnt); in ext3_ioctl()
128 mnt_drop_write(filp->f_path.mnt); in ext3_ioctl()
143 err = mnt_want_write(filp->f_path.mnt); in ext3_ioctl()
163 mnt_drop_write(filp->f_path.mnt); in ext3_ioctl()
204 err = mnt_want_write(filp->f_path.mnt); in ext3_ioctl()
235 mnt_drop_write(filp->f_path.mnt); in ext3_ioctl()
246 err = mnt_want_write(filp->f_path.mnt); in ext3_ioctl()
261 mnt_drop_write(filp->f_path.mnt); in ext3_ioctl()
272 err = mnt_want_write(filp->f_path.mnt); in ext3_ioctl()
289 mnt_drop_write(filp->f_path.mnt); in ext3_ioctl()
/fs/autofs/
Ddirhash.c38 struct vfsmount *mnt) in autofs_expire() argument
83 mntget(mnt); in autofs_expire()
85 if (!follow_down(&mnt, &dentry)) { in autofs_expire()
87 mntput(mnt); in autofs_expire()
91 while (d_mountpoint(dentry) && follow_down(&mnt, &dentry)) in autofs_expire()
95 if ( may_umount(mnt) ) { in autofs_expire()
96 mntput(mnt); in autofs_expire()
101 mntput(mnt); in autofs_expire()
/fs/ext2/
Dioctl.c39 ret = mnt_want_write(filp->f_path.mnt); in ext2_ioctl()
87 mnt_drop_write(filp->f_path.mnt); in ext2_ioctl()
95 ret = mnt_want_write(filp->f_path.mnt); in ext2_ioctl()
104 mnt_drop_write(filp->f_path.mnt); in ext2_ioctl()
125 ret = mnt_want_write(filp->f_path.mnt); in ext2_ioctl()
149 mnt_drop_write(filp->f_path.mnt); in ext2_ioctl()
/fs/afs/
Dmntpt.c141 struct vfsmount *mnt; in afs_mntpt_do_automount() local
191 mnt = vfs_kern_mount(&afs_fs_type, 0, devname, options); in afs_mntpt_do_automount()
192 _debug("--- mount result %p ---", mnt); in afs_mntpt_do_automount()
196 _leave(" = %p", mnt); in afs_mntpt_do_automount()
197 return mnt; in afs_mntpt_do_automount()
221 nd->path.mnt->mnt_devname, in afs_mntpt_follow_link()
239 nd->path.mnt = newmnt; in afs_mntpt_follow_link()
247 follow_down(&nd->path.mnt, &nd->path.dentry)) in afs_mntpt_follow_link()
/fs/nfsd/
Dvfs.c103 struct vfsmount *mnt = mntget(exp->ex_path.mnt); in nfsd_cross_mnt() local
107 while (follow_down(&mnt,&mounts)&&d_mountpoint(mounts)); in nfsd_cross_mnt()
109 exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts); in nfsd_cross_mnt()
114 mntput(mnt); in nfsd_cross_mnt()
127 mntput(mnt); in nfsd_cross_mnt()
166 struct vfsmount *mnt = mntget(exp->ex_path.mnt); in nfsd_lookup_dentry() local
168 while(dentry == mnt->mnt_root && follow_up(&mnt, &dentry)) in nfsd_lookup_dentry()
174 exp2 = rqst_exp_parent(rqstp, mnt, dentry); in nfsd_lookup_dentry()
181 mntput(mnt); in nfsd_lookup_dentry()
187 mntput(mnt); in nfsd_lookup_dentry()
[all …]

1234567