/linux-6.6.21/fs/ |
D | namespace.c | 112 static inline struct hlist_head *m_hash(struct vfsmount *mnt, struct dentry *dentry) in m_hash() argument 114 unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); in m_hash() 127 static int mnt_alloc_id(struct mount *mnt) in mnt_alloc_id() argument 133 mnt->mnt_id = res; in mnt_alloc_id() 137 static void mnt_free_id(struct mount *mnt) in mnt_free_id() argument 139 ida_free(&mnt_id_ida, mnt->mnt_id); in mnt_free_id() 145 static int mnt_alloc_group_id(struct mount *mnt) in mnt_alloc_group_id() argument 151 mnt->mnt_group_id = res; in mnt_alloc_group_id() 158 void mnt_release_group_id(struct mount *mnt) in mnt_release_group_id() argument 160 ida_free(&mnt_group_ida, mnt->mnt_group_id); in mnt_release_group_id() [all …]
|
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 …]
|
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 …]
|
D | proc_namespace.c | 64 static void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt) in show_mnt_opts() argument 79 if (mnt->mnt_flags & fs_infop->flag) in show_mnt_opts() 83 if (is_idmapped_mnt(mnt)) in show_mnt_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_mnt_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 …]
|
D | mount.h | 43 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()
|
D | fhandle.c | 76 if (put_user(real_mount(path->mnt)->mnt_id, mnt_id) || in do_sys_name_to_handle() 124 struct vfsmount *mnt; in get_vfsmount_from_fd() local 129 mnt = mntget(fs->pwd.mnt); in get_vfsmount_from_fd() 135 mnt = mntget(f.file->f_path.mnt); in get_vfsmount_from_fd() 138 return mnt; in get_vfsmount_from_fd() 152 path->mnt = get_vfsmount_from_fd(mountdirfd); in do_handle_to_path() 153 if (IS_ERR(path->mnt)) { in do_handle_to_path() 154 retval = PTR_ERR(path->mnt); in do_handle_to_path() 159 path->dentry = exportfs_decode_fh(path->mnt, in do_handle_to_path() 169 mntput(path->mnt); in do_handle_to_path()
|
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()
|
D | namei.c | 549 mntget(path->mnt); in path_get() 563 mntput(path->mnt); in path_put() 603 p->path.mnt = NULL; in __set_nameidata() 653 static bool path_connected(struct vfsmount *mnt, struct dentry *dentry) in path_connected() argument 655 struct super_block *sb = mnt->mnt_sb; in path_connected() 658 if (mnt->mnt_root == sb->s_root) in path_connected() 661 return is_subdir(dentry, mnt->mnt_root); in path_connected() 697 nd->path.mnt = NULL; in terminate_walk() 704 int res = __legitimize_mnt(path->mnt, mseq); in __legitimize_path() 707 path->mnt = NULL; in __legitimize_path() [all …]
|
/linux-6.6.21/kernel/ |
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-6.6.21/tools/lib/api/fs/ |
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-6.6.21/include/linux/ |
D | mount.h | 77 static inline struct mnt_idmap *mnt_idmap(const struct vfsmount *mnt) in mnt_idmap() argument 80 return smp_load_acquire(&mnt->mnt_idmap); in mnt_idmap() 83 extern int mnt_want_write(struct vfsmount *mnt); 85 extern void mnt_drop_write(struct vfsmount *mnt); 87 extern void mntput(struct vfsmount *mnt); 88 extern struct vfsmount *mntget(struct vfsmount *mnt); 89 extern void mnt_make_shortterm(struct vfsmount *mnt); 91 extern bool __mnt_is_readonly(struct vfsmount *mnt); 92 extern bool mnt_may_suid(struct vfsmount *mnt); 107 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list); [all …]
|
D | path.h | 9 struct vfsmount *mnt; member 18 return path1->mnt == path2->mnt && path1->dentry == path2->dentry; in path_equal()
|
/linux-6.6.21/tools/testing/selftests/memfd/ |
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-6.6.21/tools/bpf/bpftool/ |
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-6.6.21/fs/autofs/ |
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() 150 static int autofs_direct_busy(struct vfsmount *mnt, in autofs_direct_busy() argument 162 if (!may_umount_tree(mnt)) { in autofs_direct_busy() 182 static int autofs_tree_busy(struct vfsmount *mnt, in autofs_tree_busy() argument 207 if (autofs_mount_busy(mnt, p, how)) { in autofs_tree_busy() 241 static struct dentry *autofs_check_leaves(struct vfsmount *mnt, in autofs_check_leaves() argument 256 if (autofs_mount_busy(mnt, p, how)) in autofs_check_leaves() 275 struct vfsmount *mnt, in autofs_expire_direct() argument [all …]
|
/linux-6.6.21/security/tomoyo/ |
D | tomoyo.c | 159 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink() 176 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir() 192 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_rmdir() 209 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_symlink() 227 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mknod() 266 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry }; in tomoyo_path_link() 267 struct path path2 = { .mnt = new_dir->mnt, .dentry = new_dentry }; in tomoyo_path_link() 289 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry }; in tomoyo_path_rename() 290 struct path path2 = { .mnt = new_parent->mnt, .dentry = new_dentry }; in tomoyo_path_rename() 424 static int tomoyo_sb_umount(struct vfsmount *mnt, int flags) in tomoyo_sb_umount() argument [all …]
|
/linux-6.6.21/fs/exportfs/ |
D | expfs.c | 27 static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir, in exportfs_get_name() argument 31 struct path path = {.mnt = mnt, .dentry = dir}; in exportfs_get_name() 121 static struct dentry *reconnect_one(struct vfsmount *mnt, in reconnect_one() argument 130 if (mnt->mnt_sb->s_export_op->get_parent) in reconnect_one() 131 parent = mnt->mnt_sb->s_export_op->get_parent(dentry); in reconnect_one() 142 err = exportfs_get_name(mnt, parent, nbuf, dentry); in reconnect_one() 148 tmp = lookup_one_unlocked(mnt_idmap(mnt), nbuf, parent, strlen(nbuf)); in reconnect_one() 212 reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) in reconnect_path() argument 219 BUG_ON(dentry == mnt->mnt_sb->s_root); in reconnect_path() 222 parent = reconnect_one(mnt, dentry, nbuf); in reconnect_path() [all …]
|
/linux-6.6.21/fs/notify/ |
D | fsnotify.c | 26 void __fsnotify_vfsmount_delete(struct vfsmount *mnt) in __fsnotify_vfsmount_delete() argument 28 fsnotify_clear_marks_by_mount(mnt); in __fsnotify_vfsmount_delete() 144 static bool fsnotify_event_needs_parent(struct inode *inode, struct mount *mnt, in fsnotify_event_needs_parent() argument 163 if (mnt) in fsnotify_event_needs_parent() 164 marks_mask |= fsnotify_parent_needed_mask(mnt->mnt_fsnotify_mask); in fsnotify_event_needs_parent() 182 struct mount *mnt = path ? real_mount(path->mnt) : NULL; in __fsnotify_parent() local 198 (!mnt || !mnt->mnt_fsnotify_marks) && !parent_watched) in __fsnotify_parent() 202 parent_needed = fsnotify_event_needs_parent(inode, mnt, mask); in __fsnotify_parent() 487 struct mount *mnt = NULL; in fsnotify() local 495 mnt = real_mount(path->mnt); in fsnotify() [all …]
|
/linux-6.6.21/Documentation/target/ |
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-6.6.21/security/apparmor/ |
D | mount.c | 91 if (ad->mnt.type) { in audit_cb() 93 audit_log_untrustedstring(ab, ad->mnt.type); in audit_cb() 95 if (ad->mnt.src_name) { in audit_cb() 97 audit_log_untrustedstring(ab, ad->mnt.src_name); in audit_cb() 99 if (ad->mnt.trans) { in audit_cb() 101 audit_log_untrustedstring(ab, ad->mnt.trans); in audit_cb() 103 if (ad->mnt.flags) { in audit_cb() 105 audit_mnt_flags(ab, ad->mnt.flags); in audit_cb() 108 if (ad->mnt.data) { in audit_cb() 110 audit_log_untrustedstring(ab, ad->mnt.data); in audit_cb() [all …]
|
/linux-6.6.21/fs/cachefiles/ |
D | cache.c | 43 cache->mnt = path.mnt; in cachefiles_add_cache() 47 if (is_idmapped_mnt(path.mnt)) { in cachefiles_add_cache() 166 mntput(cache->mnt); in cachefiles_add_cache() 167 cache->mnt = NULL; in cachefiles_add_cache() 193 .mnt = cache->mnt, in cachefiles_has_space() 194 .dentry = cache->mnt->mnt_root, in cachefiles_has_space() 353 down_read(&cache->mnt->mnt_sb->s_umount); in cachefiles_sync_cache() 354 ret = sync_filesystem(cache->mnt->mnt_sb); in cachefiles_sync_cache() 355 up_read(&cache->mnt->mnt_sb->s_umount); in cachefiles_sync_cache()
|
/linux-6.6.21/fs/smb/client/ |
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-6.6.21/tools/perf/util/ |
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() 54 char mnt[PATH_MAX + 1]; in read_cgroup_id() local 61 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, "perf_event")) in read_cgroup_id() 64 scnprintf(path, PATH_MAX, "%s/%s", mnt, cgrp->name); in read_cgroup_id() 81 char mnt[PATH_MAX + 1]; in cgroup_is_v2() local 84 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, subsys)) in cgroup_is_v2() 87 if (statfs(mnt, &stbuf) < 0) in cgroup_is_v2() 294 char mnt[PATH_MAX]; in match_cgroups() local [all …]
|
/linux-6.6.21/tools/testing/selftests/mm/ |
D | charge_reserved_hugetlb.sh | 52 if [[ -e /mnt/huge ]]; then 53 rm -rf /mnt/huge/* 54 umount /mnt/huge || echo error 55 rmdir /mnt/huge 260 if [[ -e /mnt/huge ]]; then 261 rm -rf /mnt/huge/* 262 umount /mnt/huge 263 rmdir /mnt/huge 290 mkdir -p /mnt/huge 291 mount -t hugetlbfs -o pagesize=${MB}M,size=256M none /mnt/huge [all …]
|
/linux-6.6.21/Documentation/filesystems/ |
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 …]
|