Home
last modified time | relevance | path

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

1234567

/linux-6.1.9/fs/
Dnamespace.c111 static inline struct hlist_head *m_hash(struct vfsmount *mnt, struct dentry *dentry) in m_hash() argument
113 unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); in m_hash()
126 static int mnt_alloc_id(struct mount *mnt) in mnt_alloc_id() argument
132 mnt->mnt_id = res; in mnt_alloc_id()
136 static void mnt_free_id(struct mount *mnt) in mnt_free_id() argument
138 ida_free(&mnt_id_ida, mnt->mnt_id); in mnt_free_id()
144 static int mnt_alloc_group_id(struct mount *mnt) in mnt_alloc_group_id() argument
150 mnt->mnt_group_id = res; in mnt_alloc_group_id()
157 void mnt_release_group_id(struct mount *mnt) in mnt_release_group_id() argument
159 ida_free(&mnt_group_ida, mnt->mnt_group_id); in mnt_release_group_id()
[all …]
Dpnode.c37 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 …]
Dpnode.h13 #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 …]
Dproc_namespace.c64 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 …]
Dmount.h43 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()
Dfhandle.c72 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()
Dd_path.c103 static int __prepend_path(const struct dentry *dentry, const struct mount *mnt, in __prepend_path() argument
106 while (dentry != root->dentry || &mnt->mnt != root->mnt) { in __prepend_path()
109 if (dentry == mnt->mnt.mnt_root) { in __prepend_path()
110 struct mount *m = READ_ONCE(mnt->mnt_parent); in __prepend_path()
113 if (likely(mnt != m)) { in __prepend_path()
114 dentry = READ_ONCE(mnt->mnt_mountpoint); in __prepend_path()
115 mnt = m; in __prepend_path()
119 mnt_ns = READ_ONCE(mnt->mnt_ns); in __prepend_path()
171 error = __prepend_path(path->dentry, real_mount(path->mnt), root, &b); in prepend_path()
281 (!IS_ROOT(path->dentry) || path->dentry != path->mnt->mnt_root)) in d_path()
Dnamei.c545 mntget(path->mnt); in path_get()
559 mntput(path->mnt); in path_put()
599 p->path.mnt = NULL; in __set_nameidata()
647 static bool path_connected(struct vfsmount *mnt, struct dentry *dentry) in path_connected() argument
649 struct super_block *sb = mnt->mnt_sb; in path_connected()
652 if (mnt->mnt_root == sb->s_root) in path_connected()
655 return is_subdir(dentry, mnt->mnt_root); in path_connected()
691 nd->path.mnt = NULL; in terminate_walk()
698 int res = __legitimize_mnt(path->mnt, mseq); in __legitimize_path()
701 path->mnt = NULL; in __legitimize_path()
[all …]
Dfile_table.c254 struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, in alloc_file_pseudo() argument
265 path.dentry = d_alloc_pseudo(mnt->mnt_sb, &this); in alloc_file_pseudo()
268 if (!mnt->mnt_sb->s_d_op) in alloc_file_pseudo()
270 path.mnt = mntget(mnt); in alloc_file_pseudo()
297 struct vfsmount *mnt = file->f_path.mnt; in __fput() local
330 dissolve_on_fput(mnt); in __fput()
331 mntput(mnt); in __fput()
/linux-6.1.9/kernel/
Dusermode_driver.c15 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.1.9/tools/lib/api/fs/
Dtracing_path.c31 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 …]
/linux-6.1.9/include/linux/
Dmount.h76 static inline struct user_namespace *mnt_user_ns(const struct vfsmount *mnt) in mnt_user_ns() argument
79 return smp_load_acquire(&mnt->mnt_userns); in mnt_user_ns()
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);
89 extern bool __mnt_is_readonly(struct vfsmount *mnt);
90 extern bool mnt_may_suid(struct vfsmount *mnt);
105 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
111 extern bool our_mnt(struct vfsmount *mnt);
[all …]
/linux-6.1.9/tools/testing/selftests/memfd/
Drun_fuse_test.sh5 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.1.9/tools/bpf/bpftool/
Dtracelog.c27 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.1.9/fs/autofs/
Dexpire.c29 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.1.9/security/tomoyo/
Dtomoyo.c147 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink()
164 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir()
180 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_rmdir()
197 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_symlink()
215 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mknod()
254 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry }; in tomoyo_path_link()
255 struct path path2 = { .mnt = new_dir->mnt, .dentry = new_dentry }; in tomoyo_path_link()
277 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry }; in tomoyo_path_rename()
278 struct path path2 = { .mnt = new_parent->mnt, .dentry = new_dentry }; in tomoyo_path_rename()
412 static int tomoyo_sb_umount(struct vfsmount *mnt, int flags) in tomoyo_sb_umount() argument
[all …]
/linux-6.1.9/fs/exportfs/
Dexpfs.c27 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_user_ns(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.1.9/tools/testing/selftests/vm/
Drun_vmtests.sh8 mnt=./huge
87 mkdir "$mnt"
88 mount -t hugetlbfs none "$mnt"
102 run_test ./hugepage-mremap "$mnt"/huge_mremap
103 rm -f "$mnt"/huge_mremap
107 run_test ./hugetlb-madvise "$mnt"/madvise-test
108 rm -f "$mnt"/madvise-test
129 run_test ./userfaultfd hugetlb_shared${mod} "$half_ufd_size_MB" 32 "$mnt"/uffd-test
130 rm -f "$mnt"/uffd-test
135 umount "$mnt"
[all …]
Dcharge_reserved_hugetlb.sh52 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.1.9/fs/notify/
Dfsnotify.c26 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.1.9/Documentation/target/
Dtcm_mod_builder.rst32 …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.1.9/fs/cachefiles/
Dcache.c43 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()
191 .mnt = cache->mnt, in cachefiles_has_space()
192 .dentry = cache->mnt->mnt_root, in cachefiles_has_space()
351 down_read(&cache->mnt->mnt_sb->s_umount); in cachefiles_sync_cache()
352 ret = sync_filesystem(cache->mnt->mnt_sb); in cachefiles_sync_cache()
353 up_read(&cache->mnt->mnt_sb->s_umount); in cachefiles_sync_cache()
/linux-6.1.9/security/apparmor/
Dmount.c90 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 …]
/linux-6.1.9/fs/cifs/
Dcifs_dfs_ref.c276 struct vfsmount *mnt; in cifs_dfs_do_mount() local
298 mnt = vfs_submount(mntpt, &cifs_fs_type, devname, mountdata); in cifs_dfs_do_mount()
301 return mnt; in cifs_dfs_do_mount()
312 struct vfsmount *mnt; in cifs_dfs_do_automount() local
325 mnt = ERR_PTR(-EREMOTE); in cifs_dfs_do_automount()
333 mnt = ERR_CAST(full_path); in cifs_dfs_do_automount()
340 mnt = cifs_dfs_do_mount(mntpt, cifs_sb, full_path); in cifs_dfs_do_automount()
341 cifs_dbg(FYI, "%s: cifs_dfs_do_mount:%s , mnt:%p\n", __func__, full_path + 1, mnt); in cifs_dfs_do_automount()
347 return mnt; in cifs_dfs_do_automount()
/linux-6.1.9/tools/perf/util/
Dcgroup.c34 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 …]

1234567