/kernel/linux/linux-5.10/fs/ |
D | namespace.c | 90 static inline struct hlist_head *m_hash(struct vfsmount *mnt, struct dentry *dentry) in m_hash() argument 92 unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); in m_hash() 105 static int mnt_alloc_id(struct mount *mnt) in mnt_alloc_id() argument 111 mnt->mnt_id = res; in mnt_alloc_id() 115 static void mnt_free_id(struct mount *mnt) in mnt_free_id() argument 117 ida_free(&mnt_id_ida, mnt->mnt_id); in mnt_free_id() 123 static int mnt_alloc_group_id(struct mount *mnt) in mnt_alloc_group_id() argument 129 mnt->mnt_group_id = res; in mnt_alloc_group_id() 136 void mnt_release_group_id(struct mount *mnt) in mnt_release_group_id() argument 138 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() 98 static int show_vfsmnt(struct seq_file *m, struct vfsmount *mnt) in show_vfsmnt() argument 101 struct mount *r = real_mount(mnt); in show_vfsmnt() 102 struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; in show_vfsmnt() 120 seq_puts(m, __mnt_is_readonly(mnt) ? " ro" : " rw"); in show_vfsmnt() 124 show_mnt_opts(m, mnt); in show_vfsmnt() 132 static int show_mountinfo(struct seq_file *m, struct vfsmount *mnt) in show_mountinfo() argument 135 struct mount *r = real_mount(mnt); in show_mountinfo() 136 struct super_block *sb = mnt->mnt_sb; in show_mountinfo() [all …]
|
D | mount.h | 44 struct vfsmount mnt; member 85 static inline struct mount *real_mount(struct vfsmount *mnt) in real_mount() argument 87 return container_of(mnt, struct mount, mnt); in real_mount() 90 static inline int mnt_has_parent(struct mount *mnt) in mnt_has_parent() argument 92 return mnt != mnt->mnt_parent; in mnt_has_parent() 95 static inline int is_mounted(struct vfsmount *mnt) in is_mounted() argument 98 return !IS_ERR_OR_NULL(real_mount(mnt)->mnt_ns); in is_mounted() 108 struct mount *m = __lookup_mnt(path->mnt, path->dentry); in __path_is_mountpoint() 109 return m && likely(!(m->mnt.mnt_flags & MNT_SYNC_UMOUNT)); in __path_is_mountpoint()
|
D | fhandle.c | 72 if (put_user(real_mount(path->mnt)->mnt_id, mnt_id) || in do_sys_name_to_handle() 117 struct vfsmount *mnt; in get_vfsmount_from_fd() local 122 mnt = mntget(fs->pwd.mnt); in get_vfsmount_from_fd() 128 mnt = mntget(f.file->f_path.mnt); in get_vfsmount_from_fd() 131 return mnt; in get_vfsmount_from_fd() 145 path->mnt = get_vfsmount_from_fd(mountdirfd); in do_handle_to_path() 146 if (IS_ERR(path->mnt)) { in do_handle_to_path() 147 retval = PTR_ERR(path->mnt); in do_handle_to_path() 152 path->dentry = exportfs_decode_fh(path->mnt, in do_handle_to_path() 162 mntput(path->mnt); in do_handle_to_path()
|
D | d_path.c | 81 struct mount *mnt; in prepend_path() local 97 vfsmnt = path->mnt; in prepend_path() 98 mnt = real_mount(vfsmnt); in prepend_path() 100 while (dentry != root->dentry || vfsmnt != root->mnt) { in prepend_path() 104 struct mount *parent = READ_ONCE(mnt->mnt_parent); in prepend_path() 115 if (mnt != parent) { in prepend_path() 116 dentry = READ_ONCE(mnt->mnt_mountpoint); in prepend_path() 117 mnt = parent; in prepend_path() 118 vfsmnt = &mnt->mnt; in prepend_path() 121 mnt_ns = READ_ONCE(mnt->mnt_ns); in prepend_path() [all …]
|
D | namei.c | 483 mntget(path->mnt); in path_get() 497 mntput(path->mnt); in path_put() 536 p->path.mnt = NULL; in set_nameidata() 574 static bool path_connected(struct vfsmount *mnt, struct dentry *dentry) in path_connected() argument 576 struct super_block *sb = mnt->mnt_sb; in path_connected() 579 if (mnt->mnt_root == sb->s_root) in path_connected() 582 return is_subdir(dentry, mnt->mnt_root); in path_connected() 612 nd->path.mnt = NULL; in terminate_walk() 619 int res = __legitimize_mnt(path->mnt, mseq); in __legitimize_path() 622 path->mnt = NULL; in __legitimize_path() [all …]
|
/kernel/linux/linux-5.10/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 mntput(mnt); in blob_to_mnt() 41 mntput(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 …]
|
/kernel/linux/linux-5.10/tools/lib/api/fs/ |
D | tracing_path.c | 31 const char *mnt; in tracing_path_tracefs_mount() local 33 mnt = tracefs__mount(); in tracing_path_tracefs_mount() 34 if (!mnt) in tracing_path_tracefs_mount() 37 __tracing_path_set("", mnt); in tracing_path_tracefs_mount() 44 const char *mnt; in tracing_path_debugfs_mount() local 46 mnt = debugfs__mount(); in tracing_path_debugfs_mount() 47 if (!mnt) in tracing_path_debugfs_mount() 50 __tracing_path_set("tracing/", mnt); in tracing_path_debugfs_mount() 57 const char *mnt; in tracing_path_mount() local 59 mnt = tracing_path_tracefs_mount(); in tracing_path_mount() [all …]
|
/kernel/liteos_a/fs/vfs/ |
D | mount.c | 49 struct Mount *mnt = (struct Mount *)zalloc(sizeof(struct Mount)); in MountAlloc() local 50 if (mnt == NULL) { in MountAlloc() 55 LOS_ListInit(&mnt->activeVnodeList); in MountAlloc() 56 LOS_ListInit(&mnt->vnodeList); in MountAlloc() 58 mnt->vnodeBeCovered = vnodeBeCovered; in MountAlloc() 59 vnodeBeCovered->newMount = mnt; in MountAlloc() 62 (VOID)HiRandomHwGetInteger(&mnt->hashseed); in MountAlloc() 65 mnt->hashseed = (uint32_t)random(); in MountAlloc() 67 return mnt; in MountAlloc()
|
/kernel/linux/linux-5.10/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
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/security/tomoyo/ |
D | tomoyo.c | 148 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink() 165 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir() 181 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_rmdir() 198 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_symlink() 216 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mknod() 255 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry }; in tomoyo_path_link() 256 struct path path2 = { .mnt = new_dir->mnt, .dentry = new_dentry }; in tomoyo_path_link() 276 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry }; in tomoyo_path_rename() 277 struct path path2 = { .mnt = new_parent->mnt, .dentry = new_dentry }; in tomoyo_path_rename() 405 static int tomoyo_sb_umount(struct vfsmount *mnt, int flags) in tomoyo_sb_umount() argument [all …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | mount.h | 80 extern int mnt_want_write(struct vfsmount *mnt); 82 extern int mnt_clone_write(struct vfsmount *mnt); 83 extern void mnt_drop_write(struct vfsmount *mnt); 85 extern void mntput(struct vfsmount *mnt); 86 extern struct vfsmount *mntget(struct vfsmount *mnt); 88 extern bool __mnt_is_readonly(struct vfsmount *mnt); 89 extern bool mnt_may_suid(struct vfsmount *mnt); 106 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list); 115 extern void kern_unmount_array(struct vfsmount *mnt[], unsigned int num);
|
/kernel/linux/linux-5.10/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() 146 static bool fsnotify_event_needs_parent(struct inode *inode, struct mount *mnt, in fsnotify_event_needs_parent() argument 165 if (mnt) in fsnotify_event_needs_parent() 166 marks_mask |= fsnotify_parent_needed_mask(mnt->mnt_fsnotify_mask); in fsnotify_event_needs_parent() 184 struct mount *mnt = path ? real_mount(path->mnt) : NULL; in __fsnotify_parent() local 200 (!mnt || !mnt->mnt_fsnotify_marks) && !parent_watched) in __fsnotify_parent() 204 parent_needed = fsnotify_event_needs_parent(inode, mnt, mask); in __fsnotify_parent() 468 struct mount *mnt = NULL; in fsnotify() local 474 mnt = real_mount(path->mnt); in fsnotify() [all …]
|
/kernel/linux/linux-5.10/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() 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() 285 .mnt = path->mnt, in get_name() [all …]
|
/kernel/liteos_a/fs/vfs/operation/ |
D | vfs_force_umount.c | 358 struct Mount *mnt = NULL; in GetDevMountPoint() local 364 LOS_DL_LIST_FOR_EACH_ENTRY(mnt, mntList, struct Mount, mountList) { in GetDevMountPoint() 365 if (mnt->vnodeDev == dev) { in GetDevMountPoint() 366 return mnt; in GetDevMountPoint() 397 static void FileDisableAndClean(const struct Mount *mnt) in FileDisableAndClean() argument 411 if (filep->f_vnode->originMount != mnt) { in FileDisableAndClean() 463 struct Mount *mnt = GetDevMountPoint(dev); in ForceUmountDev() local 464 if (mnt == NULL) { in ForceUmountDev() 469 origin = mnt->vnodeBeCovered; in ForceUmountDev() 471 FileDisableAndClean(mnt); in ForceUmountDev() [all …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/liteos_a/kernel/extended/container/ |
D | los_mnt_container.c | 97 struct Mount *mnt = NULL; in CopyMountList() local 99 LOS_DL_LIST_FOR_EACH_ENTRY(mnt, &parentContainer->mountList, struct Mount, mountList) { in CopyMountList() 105 *newMnt = *mnt; in CopyMountList() 190 struct Mount *mnt = NULL; in FreeMountList() local 199 LOS_DL_LIST_FOR_EACH_ENTRY_SAFE(mnt, nextMnt, mountList, struct Mount, mountList) { in FreeMountList() 200 if (mnt->vnodeCovered->mntCount > 0) { in FreeMountList() 201 mnt->vnodeCovered->mntCount--; in FreeMountList() 202 LOS_ListDelete(&mnt->mountList); in FreeMountList() 203 free(mnt); in FreeMountList() 205 umount(mnt->pathName); in FreeMountList()
|
/kernel/linux/linux-5.10/tools/testing/selftests/vm/ |
D | run_vmtests | 8 mnt=./huge 69 mkdir $mnt 70 mount -t hugetlbfs none $mnt 164 ./userfaultfd hugetlb $half_ufd_size_MB 32 $mnt/ufd_test_file 171 rm -f $mnt/ufd_test_file 185 umount $mnt 186 rm -rf $mnt
|
/kernel/linux/linux-5.10/fs/cifs/ |
D | cifs_dfs_ref.c | 271 struct vfsmount *mnt; in cifs_dfs_do_mount() local 289 mnt = vfs_submount(mntpt, &cifs_fs_type, devname, mountdata); in cifs_dfs_do_mount() 292 return mnt; in cifs_dfs_do_mount() 306 struct vfsmount *mnt; in cifs_dfs_do_automount() local 317 mnt = ERR_PTR(-ENOMEM); in cifs_dfs_do_automount() 321 mnt = ERR_PTR(-EREMOTE); in cifs_dfs_do_automount() 347 mnt = ERR_PTR(-ENOMEM); in cifs_dfs_do_automount() 370 mnt = ERR_PTR(rc); in cifs_dfs_do_automount() 379 mnt = cifs_dfs_do_mount(mntpt, cifs_sb, full_path); in cifs_dfs_do_automount() 381 full_path + 1, mnt); in cifs_dfs_do_automount() [all …]
|
/kernel/liteos_a/testsuites/unittest/libc/io/full/ |
D | It_stdio_hasmntopt_001.cpp | 35 struct mntent* mnt = nullptr; in testcase() local 76 mnt = getmntent(fp); in testcase() 77 if (mnt && !(feof(fp) || ferror(fp))) { in testcase() 78 ret = hasmntopt(mnt, opt); in testcase() 81 mnt = getmntent(fp); in testcase()
|
/kernel/linux/linux-5.10/security/apparmor/ |
D | mount.c | 90 if (aad(sa)->mnt.type) { in audit_cb() 92 audit_log_untrustedstring(ab, aad(sa)->mnt.type); in audit_cb() 94 if (aad(sa)->mnt.src_name) { in audit_cb() 96 audit_log_untrustedstring(ab, aad(sa)->mnt.src_name); in audit_cb() 98 if (aad(sa)->mnt.trans) { in audit_cb() 100 audit_log_untrustedstring(ab, aad(sa)->mnt.trans); in audit_cb() 102 if (aad(sa)->mnt.flags) { in audit_cb() 104 audit_mnt_flags(ab, aad(sa)->mnt.flags); in audit_cb() 107 if (aad(sa)->mnt.data) { in audit_cb() 109 audit_log_untrustedstring(ab, aad(sa)->mnt.data); in audit_cb() [all …]
|