/linux/fs/ |
H A D | pnode.c | 37 static struct mount *get_peer_under_root(struct mount *mnt, in get_peer_under_root() argument 41 struct mount *m = mnt; in get_peer_under_root() 45 if (m->mnt_ns == ns && is_path_reachable(m, m->mnt.mnt_root, root)) in get_peer_under_root() 49 } while (m != mnt); in get_peer_under_root() 60 int get_dominating_id(struct mount *mnt, const struct path *root) in get_dominating_id() argument 64 for (m = mnt->mnt_master; m != NULL; m = m->mnt_master) { in get_dominating_id() 65 struct mount *d = get_peer_under_root(m, mnt->mnt_ns, root); in get_dominating_id() 73 static int do_make_slave(struct mount *mnt) in do_make_slave() argument 77 if (list_empty(&mnt->mnt_share)) { in do_make_slave() 78 if (IS_MNT_SHARED(mnt)) { in do_make_slave() [all …]
|
H A D | pnode.h | 13 #define IS_MNT_SHARED(m) ((m)->mnt.mnt_flags & MNT_SHARED) 16 #define CLEAR_MNT_SHARED(m) ((m)->mnt.mnt_flags &= ~MNT_SHARED) 17 #define IS_MNT_UNBINDABLE(m) ((m)->mnt.mnt_flags & MNT_UNBINDABLE) 18 #define IS_MNT_MARKED(m) ((m)->mnt.mnt_flags & MNT_MARKED) 19 #define SET_MNT_MARK(m) ((m)->mnt.mnt_flags |= MNT_MARKED) 20 #define CLEAR_MNT_MARK(m) ((m)->mnt.mnt_flags &= ~MNT_MARKED) 21 #define IS_MNT_LOCKED(m) ((m)->mnt.mnt_flags & MNT_LOCKED) 33 static inline void set_mnt_shared(struct mount *mnt) in set_mnt_shared() argument 35 mnt->mnt.mnt_flags &= ~MNT_SHARED_MASK; in set_mnt_shared() 36 mnt->mnt.mnt_flags |= MNT_SHARED; in set_mnt_shared() [all …]
|
H A D | mount.h | 39 struct vfsmount mnt; member 84 static inline struct mount *real_mount(struct vfsmount *mnt) in real_mount() argument 86 return container_of(mnt, struct mount, mnt); in real_mount() 89 static inline int mnt_has_parent(struct mount *mnt) in mnt_has_parent() argument 91 return mnt != mnt->mnt_parent; in mnt_has_parent() 94 static inline int is_mounted(struct vfsmount *mnt) in is_mounted() argument 97 return !IS_ERR_OR_NULL(real_mount(mnt)->mnt_ns); in is_mounted() 106 struct mount *m = __lookup_mnt(path->mnt, path->dentry); in __path_is_mountpoint() 107 return m && likely(!(m->mnt.mnt_flags & MNT_SYNC_UMOUNT)); in __path_is_mountpoint() 148 static inline void move_from_ns(struct mount *mnt, struct list_head *dt_list) in move_from_ns() argument [all …]
|
H A D | proc_namespace.c | 64 static void show_vfsmnt_opts(struct seq_file *m, struct vfsmount *mnt) in show_vfsmnt_opts() argument 79 if (mnt->mnt_flags & fs_infop->flag) in show_vfsmnt_opts() 83 if (is_idmapped_mnt(mnt)) in show_vfsmnt_opts() 101 static int show_vfsmnt(struct seq_file *m, struct vfsmount *mnt) in show_vfsmnt() argument 104 struct mount *r = real_mount(mnt); in show_vfsmnt() 105 struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; in show_vfsmnt() 123 seq_puts(m, __mnt_is_readonly(mnt) ? " ro" : " rw"); in show_vfsmnt() 127 show_vfsmnt_opts(m, mnt); in show_vfsmnt() 135 static int show_mountinfo(struct seq_file *m, struct vfsmount *mnt) in show_mountinfo() argument 138 struct mount *r = real_mount(mnt); in show_mountinfo() [all …]
|
H A D | d_path.c | 104 static int __prepend_path(const struct dentry *dentry, const struct mount *mnt, in __prepend_path() argument 107 while (dentry != root->dentry || &mnt->mnt != root->mnt) { in __prepend_path() 110 if (dentry == mnt->mnt.mnt_root) { in __prepend_path() 111 struct mount *m = READ_ONCE(mnt->mnt_parent); in __prepend_path() 114 if (likely(mnt != m)) { in __prepend_path() 115 dentry = READ_ONCE(mnt->mnt_mountpoint); in __prepend_path() 116 mnt = m; in __prepend_path() 120 mnt_ns = READ_ONCE(mnt->mnt_ns); in __prepend_path() 172 error = __prepend_path(path->dentry, real_mount(path->mnt), root, &b); in prepend_path() 282 (!IS_ROOT(path->dentry) || path->dentry != path->mnt->mnt_root)) in d_path()
|
H A D | namei.c | 612 mntget(path->mnt); in path_get() 626 mntput(path->mnt); in path_put() 668 p->path.mnt = NULL; in __set_nameidata() 718 static bool path_connected(struct vfsmount *mnt, struct dentry *dentry) in path_connected() argument 720 struct super_block *sb = mnt->mnt_sb; in path_connected() 723 if (mnt->mnt_root == sb->s_root) in path_connected() 726 return is_subdir(dentry, mnt->mnt_root); in path_connected() 762 nd->path.mnt = NULL; in terminate_walk() 769 int res = __legitimize_mnt(path->mnt, mseq); in __legitimize_path() 772 path->mnt = NULL; in __legitimize_path() [all …]
|
H A D | file_table.c | 352 struct vfsmount *mnt, struct path *path) in alloc_path_pseudo() argument 356 path->dentry = d_alloc_pseudo(mnt->mnt_sb, &this); in alloc_path_pseudo() 359 path->mnt = mntget(mnt); in alloc_path_pseudo() 364 struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, in alloc_file_pseudo() argument 372 ret = alloc_path_pseudo(name, inode, mnt, &path); in alloc_file_pseudo() 386 struct vfsmount *mnt, const char *name, in alloc_file_pseudo_noaccount() argument 394 ret = alloc_path_pseudo(name, inode, mnt, &path); in alloc_file_pseudo_noaccount() 427 struct vfsmount *mnt = file->f_path.mnt; in __fput() local 460 dissolve_on_fput(mnt); in __fput() 461 mntput(mnt); in __fput()
|
H A D | init.c | 91 error = mnt_want_write(path.mnt); in init_chown() 94 mnt_drop_write(path.mnt); in init_chown() 159 error = vfs_mknod(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mknod() 182 if (old_path.mnt != new_path.mnt) in init_link() 184 idmap = mnt_idmap(new_path.mnt); in init_link() 211 error = vfs_symlink(mnt_idmap(path.mnt), path.dentry->d_inode, in init_symlink() 234 error = vfs_mkdir(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mkdir()
|
/linux/kernel/ |
H A D | usermode_driver.c | 15 struct vfsmount *mnt; in blob_to_mnt() local 24 mnt = kern_mount(type); in blob_to_mnt() 26 if (IS_ERR(mnt)) in blob_to_mnt() 27 return mnt; in blob_to_mnt() 29 file = file_open_root_mnt(mnt, name, O_CREAT | O_WRONLY, 0700); in blob_to_mnt() 31 kern_unmount(mnt); in blob_to_mnt() 41 kern_unmount(mnt); in blob_to_mnt() 50 return mnt; in blob_to_mnt() 62 struct vfsmount *mnt; in umd_load_blob() local 64 if (WARN_ON_ONCE(info->wd.dentry || info->wd.mnt)) in umd_load_blob() [all …]
|
/linux/include/linux/ |
H A D | mount.h | 76 static inline struct mnt_idmap *mnt_idmap(const struct vfsmount *mnt) in mnt_idmap() argument 79 return smp_load_acquire(&mnt->mnt_idmap); in mnt_idmap() 82 extern int mnt_want_write(struct vfsmount *mnt); 84 extern void mnt_drop_write(struct vfsmount *mnt); 86 extern void mntput(struct vfsmount *mnt); 87 extern struct vfsmount *mntget(struct vfsmount *mnt); 88 extern void mnt_make_shortterm(struct vfsmount *mnt); 90 extern bool __mnt_is_readonly(struct vfsmount *mnt); 91 extern bool mnt_may_suid(struct vfsmount *mnt); 94 int mnt_get_write_access(struct vfsmount *mnt); [all …]
|
H A D | path.h | 9 struct vfsmount *mnt; member 18 return path1->mnt == path2->mnt && path1->dentry == path2->dentry; in path_equal()
|
/linux/tools/lib/api/fs/ |
H A D | tracing_path.c | 26 const char *mnt; in tracing_path_tracefs_mount() local 28 mnt = tracefs__mount(); in tracing_path_tracefs_mount() 29 if (!mnt) in tracing_path_tracefs_mount() 32 __tracing_path_set("", mnt); in tracing_path_tracefs_mount() 39 const char *mnt; in tracing_path_debugfs_mount() local 41 mnt = debugfs__mount(); in tracing_path_debugfs_mount() 42 if (!mnt) in tracing_path_debugfs_mount() 45 __tracing_path_set("tracing/", mnt); in tracing_path_debugfs_mount() 52 const char *mnt; in tracing_path_mount() local 54 mnt = tracing_path_tracefs_mount(); in tracing_path_mount() [all …]
|
/linux/fs/autofs/ |
H A D | expire.c | 29 static int autofs_mount_busy(struct vfsmount *mnt, in autofs_mount_busy() argument 33 struct path path = {.mnt = mnt, .dentry = dentry}; in autofs_mount_busy() 58 if (!may_umount_tree(path.mnt)) { in autofs_mount_busy() 147 static int autofs_direct_busy(struct vfsmount *mnt, in autofs_direct_busy() argument 159 if (!may_umount_tree(mnt)) { in autofs_direct_busy() 179 static int autofs_tree_busy(struct vfsmount *mnt, in autofs_tree_busy() argument 204 if (autofs_mount_busy(mnt, p, how)) { in autofs_tree_busy() 238 static struct dentry *autofs_check_leaves(struct vfsmount *mnt, in autofs_check_leaves() argument 253 if (autofs_mount_busy(mnt, p, how)) in autofs_check_leaves() 272 struct vfsmount *mnt, in autofs_expire_direct() argument [all …]
|
/linux/tools/bpf/bpftool/ |
H A D | tracelog.c | 27 static int validate_tracefs_mnt(const char *mnt, unsigned long magic) in validate_tracefs_mnt() argument 31 if (statfs(mnt, &st_fs) < 0) in validate_tracefs_mnt() 40 find_tracefs_mnt_single(unsigned long magic, char *mnt, const char *mntpt) in find_tracefs_mnt_single() argument 53 strcpy(mnt, mntpt); in find_tracefs_mnt_single() 57 static bool get_tracefs_pipe(char *mnt) in get_tracefs_pipe() argument 73 if (find_tracefs_mnt_single(TRACEFS_MAGIC, mnt, *ptr)) in get_tracefs_pipe() 83 while (fscanf(fp, format, mnt, type) == 2) in get_tracefs_pipe() 91 if (found && validate_tracefs_mnt(mnt, TRACEFS_MAGIC)) in get_tracefs_pipe() 103 strcpy(mnt, known_mnts[1]); in get_tracefs_pipe() 104 if (mount_tracefs(mnt)) in get_tracefs_pipe() [all …]
|
/linux/security/tomoyo/ |
H A D | tomoyo.c | 160 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink() 177 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir() 193 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_rmdir() 210 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_symlink() 228 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mknod() 267 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry }; in tomoyo_path_link() 268 struct path path2 = { .mnt = new_dir->mnt, .dentry = new_dentry }; in tomoyo_path_link() 290 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry }; in tomoyo_path_rename() 291 struct path path2 = { .mnt = new_parent->mnt, .dentry = new_dentry }; in tomoyo_path_rename() 426 static int tomoyo_sb_umount(struct vfsmount *mnt, int flags) in tomoyo_sb_umount() argument [all …]
|
/linux/tools/testing/selftests/memfd/ |
H A D | run_fuse_test.sh | 5 fusermount -u ./mnt 6 rmdir ./mnt 11 mkdir mnt 12 ./fuse_mnt ./mnt 13 ./fuse_test ./mnt/memfd $@ 14 fusermount -u ./mnt 15 rmdir ./mnt
|
/linux/Documentation/target/ |
H A D | tcm_mod_builder.rst | 32 …target:/mnt/sdb/lio-core-2.6.git/Documentation/target# python tcm_mod_builder.py -p iSCSI -m tcm_n… 33 tcm_dir: /mnt/sdb/lio-core-2.6.git/Documentation/target/../../ 36 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000 39 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000 41 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_base.h 43 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../include/target/target_core_fabric_ops.h 45 …/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_fabric… 47 …/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_fabric… 49 …/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_config… 51 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/Kbuild [all …]
|
/linux/tools/perf/util/ |
H A D | cgroup.c | 34 char mnt[PATH_MAX + 1]; in open_cgroup() local 38 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, "perf_event")) in open_cgroup() 41 scnprintf(path, PATH_MAX, "%s/%s", mnt, name); in open_cgroup() 69 char mnt[PATH_MAX + 1]; in read_cgroup_id() local 71 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, "perf_event")) in read_cgroup_id() 74 scnprintf(path, PATH_MAX, "%s/%s", mnt, cgrp->name); in read_cgroup_id() 89 char mnt[PATH_MAX + 1]; in cgroup_is_v2() local 92 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, subsys)) in cgroup_is_v2() 95 if (statfs(mnt, &stbuf) < 0) in cgroup_is_v2() 302 char mnt[PATH_MA in match_cgroups() local 606 char mnt[PATH_MAX]; read_all_cgroups() local [all...] |
/linux/security/apparmor/ |
H A D | mount.c | 93 if (ad->mnt.type) { in audit_cb() 95 audit_log_untrustedstring(ab, ad->mnt.type); in audit_cb() 97 if (ad->mnt.src_name) { in audit_cb() 99 audit_log_untrustedstring(ab, ad->mnt.src_name); in audit_cb() 101 if (ad->mnt.trans) { in audit_cb() 103 audit_log_untrustedstring(ab, ad->mnt.trans); in audit_cb() 105 if (ad->mnt.flags) { in audit_cb() 107 audit_mnt_flags(ab, ad->mnt.flags); in audit_cb() 110 if (ad->mnt.data) { in audit_cb() 112 audit_log_untrustedstring(ab, ad->mnt.data); in audit_cb() [all …]
|
/linux/fs/smb/client/ |
H A D | namespace.c | 198 struct vfsmount *mnt; in cifs_do_automount() local 205 fc = fs_context_for_submount(path->mnt->mnt_sb->s_type, mntpt); in cifs_do_automount() 214 mnt = ERR_CAST(full_path); in cifs_do_automount() 227 mnt = ERR_PTR(rc); in cifs_do_automount() 233 mnt = ERR_PTR(rc); in cifs_do_automount() 239 mnt = ERR_CAST(ctx->source); in cifs_do_automount() 247 mnt = fc_mount(fc); in cifs_do_automount() 251 return mnt; in cifs_do_automount()
|
/linux/fs/cachefiles/ |
H A D | cache.c | 44 cache->mnt = path.mnt; in cachefiles_add_cache() 48 if (is_idmapped_mnt(path.mnt)) { in cachefiles_add_cache() 167 mntput(cache->mnt); in cachefiles_add_cache() 168 cache->mnt = NULL; in cachefiles_add_cache() 194 .mnt = cache->mnt, in cachefiles_has_space() 195 .dentry = cache->mnt->mnt_root, in cachefiles_has_space() 395 down_read(&cache->mnt->mnt_sb->s_umount); in cachefiles_sync_cache() 396 ret = sync_filesystem(cache->mnt->mnt_sb); in cachefiles_sync_cache() 397 up_read(&cache->mnt->mnt_sb->s_umount); in cachefiles_sync_cache()
|
/linux/Documentation/filesystems/ |
H A D | sharedsubtree.rst | 47 Let's say /mnt has a mount that is shared:: 49 mount --make-shared /mnt 57 # mount --bind /mnt /tmp 59 The above command replicates the mount at /mnt to the mountpoint /tmp 64 #ls /mnt 77 #ls /mnt/a 80 Note that the mount has propagated to the mount at /mnt as well. 82 And the same is true even when /dev/sd0 is mounted on /mnt/a. The 93 Let's say /mnt has a mount which is shared. 94 # mount --make-shared /mnt [all …]
|
/linux/tools/testing/selftests/mm/ |
H A D | charge_reserved_hugetlb.sh | 54 if [[ -e /mnt/huge ]]; then 55 rm -rf /mnt/huge/* 56 umount /mnt/huge || echo error 57 rmdir /mnt/huge 262 if [[ -e /mnt/huge ]]; then 263 rm -rf /mnt/huge/* 264 umount /mnt/huge 265 rmdir /mnt/huge 292 mkdir -p /mnt/huge 293 mount -t hugetlbfs -o pagesize=${MB}M,size=256M none /mnt/huge [all …]
|
/linux/fs/overlayfs/ |
H A D | super.c | 279 struct vfsmount *mnt = ovl_upper_mnt(ofs); in ovl_workdir_create() local 303 err = ovl_workdir_cleanup(ofs, dir, mnt, work, 0); in ovl_workdir_create() 389 *stack_depth = max(*stack_depth, path->mnt->mnt_sb->s_stack_depth); in ovl_lower_dir() 481 if (__mnt_is_readonly(upperpath->mnt)) { in ovl_get_upper() 505 upper_layer->mnt = upper_mnt; in ovl_get_upper() 638 struct vfsmount *mnt = ovl_upper_mnt(ofs); in ovl_make_workdir() local 646 err = mnt_want_write(mnt); in ovl_make_workdir() 773 mnt_drop_write(mnt); in ovl_make_workdir() 784 if (upperpath->mnt != workpath->mnt) { in ovl_get_workdir() 814 struct vfsmount *mnt = ovl_upper_mnt(ofs); in ovl_get_indexdir() local [all …]
|
/linux/fs/nfs/ |
H A D | namespace.c | 149 struct vfsmount *mnt = ERR_PTR(-ENOMEM); in nfs_d_automount() local 161 fc = fs_context_for_submount(path->mnt->mnt_sb->s_type, path->dentry); in nfs_d_automount() 189 mnt = ERR_PTR(ret); in nfs_d_automount() 194 mnt = vfs_create_mount(fc); in nfs_d_automount() 195 if (IS_ERR(mnt)) in nfs_d_automount() 198 mntget(mnt); /* prevent immediate expiration */ in nfs_d_automount() 202 mnt_set_expiry(mnt, &nfs_automount_list); in nfs_d_automount() 207 return mnt; in nfs_d_automount()
|