Home
last modified time | relevance | path

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

1234567

/Linux-v4.19/fs/
Dnamespace.c84 static inline struct hlist_head *m_hash(struct vfsmount *mnt, struct dentry *dentry) in m_hash() argument
86 unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); in m_hash()
99 static int mnt_alloc_id(struct mount *mnt) in mnt_alloc_id() argument
105 mnt->mnt_id = res; in mnt_alloc_id()
109 static void mnt_free_id(struct mount *mnt) in mnt_free_id() argument
111 ida_free(&mnt_id_ida, mnt->mnt_id); in mnt_free_id()
117 static int mnt_alloc_group_id(struct mount *mnt) in mnt_alloc_group_id() argument
123 mnt->mnt_group_id = res; in mnt_alloc_group_id()
130 void mnt_release_group_id(struct mount *mnt) in mnt_release_group_id() argument
132 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.h14 #define IS_MNT_SHARED(m) ((m)->mnt.mnt_flags & MNT_SHARED)
17 #define CLEAR_MNT_SHARED(m) ((m)->mnt.mnt_flags &= ~MNT_SHARED)
18 #define IS_MNT_UNBINDABLE(m) ((m)->mnt.mnt_flags & MNT_UNBINDABLE)
19 #define IS_MNT_MARKED(m) ((m)->mnt.mnt_flags & MNT_MARKED)
20 #define SET_MNT_MARK(m) ((m)->mnt.mnt_flags |= MNT_MARKED)
21 #define CLEAR_MNT_MARK(m) ((m)->mnt.mnt_flags &= ~MNT_MARKED)
22 #define IS_MNT_LOCKED(m) ((m)->mnt.mnt_flags & MNT_LOCKED)
35 static inline void set_mnt_shared(struct mount *mnt) in set_mnt_shared() argument
37 mnt->mnt.mnt_flags &= ~MNT_SHARED_MASK; in set_mnt_shared()
38 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
78 if (mnt->mnt_flags & fs_infop->flag) in show_mnt_opts()
97 static int show_vfsmnt(struct seq_file *m, struct vfsmount *mnt) in show_vfsmnt() argument
100 struct mount *r = real_mount(mnt); in show_vfsmnt()
101 struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; in show_vfsmnt()
119 seq_puts(m, __mnt_is_readonly(mnt) ? " ro" : " rw"); in show_vfsmnt()
123 show_mnt_opts(m, mnt); in show_vfsmnt()
131 static int show_mountinfo(struct seq_file *m, struct vfsmount *mnt) in show_mountinfo() argument
134 struct mount *r = real_mount(mnt); in show_mountinfo()
135 struct super_block *sb = mnt->mnt_sb; in show_mountinfo()
[all …]
Dmount.h38 struct vfsmount mnt; member
77 static inline struct mount *real_mount(struct vfsmount *mnt) in real_mount() argument
79 return container_of(mnt, struct mount, mnt); in real_mount()
82 static inline int mnt_has_parent(struct mount *mnt) in mnt_has_parent() argument
84 return mnt != mnt->mnt_parent; in mnt_has_parent()
87 static inline int is_mounted(struct vfsmount *mnt) in is_mounted() argument
90 return !IS_ERR_OR_NULL(real_mount(mnt)->mnt_ns); in is_mounted()
100 struct mount *m = __lookup_mnt(path->mnt, path->dentry); in __path_is_mountpoint()
101 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()
[all …]
Dnamei.c471 mntget(path->mnt); in path_get()
485 mntput(path->mnt); in path_put()
564 struct vfsmount *mnt = path->mnt; in path_connected() local
565 struct super_block *sb = mnt->mnt_sb; in path_connected()
568 if (!(sb->s_iflags & SB_I_MULTIROOT) && (mnt->mnt_root == sb->s_root)) in path_connected()
571 return is_subdir(path->dentry, mnt->mnt_root); in path_connected()
601 if (nd->root.mnt && !(nd->flags & LOOKUP_ROOT)) { in terminate_walk()
603 nd->root.mnt = NULL; in terminate_walk()
608 nd->root.mnt = NULL; in terminate_walk()
618 int res = __legitimize_mnt(path->mnt, nd->m_seq); in legitimize_path()
[all …]
Dd_path.c81 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()
113 if (mnt != parent) { in prepend_path()
114 dentry = READ_ONCE(mnt->mnt_mountpoint); in prepend_path()
115 mnt = parent; in prepend_path()
116 vfsmnt = &mnt->mnt; in prepend_path()
274 (!IS_ROOT(path->dentry) || path->dentry != path->mnt->mnt_root)) in d_path()
Dfile_table.c213 struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, in alloc_file_pseudo() argument
224 path.dentry = d_alloc_pseudo(mnt->mnt_sb, &this); in alloc_file_pseudo()
227 if (!mnt->mnt_sb->s_d_op) in alloc_file_pseudo()
229 path.mnt = mntget(mnt); in alloc_file_pseudo()
256 struct vfsmount *mnt = file->f_path.mnt; in __fput() local
289 __mnt_drop_write(mnt); in __fput()
292 mntput(mnt); in __fput()
/Linux-v4.19/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-v4.19/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-v4.19/security/tomoyo/
Dtomoyo.c169 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink()
185 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir()
200 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_rmdir()
216 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_symlink()
233 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mknod()
272 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry }; in tomoyo_path_link()
273 struct path path2 = { .mnt = new_dir->mnt, .dentry = new_dentry }; in tomoyo_path_link()
292 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry }; in tomoyo_path_rename()
293 struct path path2 = { .mnt = new_parent->mnt, .dentry = new_dentry }; in tomoyo_path_rename()
419 static int tomoyo_sb_umount(struct vfsmount *mnt, int flags) in tomoyo_sb_umount() argument
[all …]
/Linux-v4.19/fs/nfs/
Dsuper.c990 static void nfs_validate_transport_protocol(struct nfs_parsed_mount_data *mnt) in nfs_validate_transport_protocol() argument
992 switch (mnt->nfs_server.protocol) { in nfs_validate_transport_protocol()
998 mnt->nfs_server.protocol = XPRT_TRANSPORT_TCP; in nfs_validate_transport_protocol()
1006 static void nfs_set_mount_transport_protocol(struct nfs_parsed_mount_data *mnt) in nfs_set_mount_transport_protocol() argument
1008 nfs_validate_transport_protocol(mnt); in nfs_set_mount_transport_protocol()
1010 if (mnt->mount_server.protocol == XPRT_TRANSPORT_UDP || in nfs_set_mount_transport_protocol()
1011 mnt->mount_server.protocol == XPRT_TRANSPORT_TCP) in nfs_set_mount_transport_protocol()
1013 switch (mnt->nfs_server.protocol) { in nfs_set_mount_transport_protocol()
1015 mnt->mount_server.protocol = XPRT_TRANSPORT_UDP; in nfs_set_mount_transport_protocol()
1019 mnt->mount_server.protocol = XPRT_TRANSPORT_TCP; in nfs_set_mount_transport_protocol()
[all …]
Dnamespace.c141 struct vfsmount *mnt; in nfs_d_automount() local
149 mnt = ERR_PTR(-ENOMEM); in nfs_d_automount()
155 mnt = server->nfs_client->rpc_ops->submount(server, path->dentry, fh, fattr); in nfs_d_automount()
156 if (IS_ERR(mnt)) in nfs_d_automount()
159 mntget(mnt); /* prevent immediate expiration */ in nfs_d_automount()
160 mnt_set_expiry(mnt, &nfs_automount_list); in nfs_d_automount()
166 return mnt; in nfs_d_automount()
240 struct vfsmount *mnt; in nfs_do_submount() local
249 mnt = ERR_CAST(devname); in nfs_do_submount()
251 mnt = nfs_do_clone_mount(NFS_SB(dentry->d_sb), devname, &mountdata); in nfs_do_submount()
[all …]
Dnfs4namespace.c244 struct vfsmount *mnt = ERR_PTR(-ENOENT); in try_location() local
281 mnt = vfs_submount(mountdata->dentry, &nfs4_referral_fs_type, page, mountdata); in try_location()
282 if (!IS_ERR(mnt)) in try_location()
286 return mnt; in try_location()
298 struct vfsmount *mnt = ERR_PTR(-ENOENT); in nfs_follow_referral() local
323 mnt = ERR_PTR(error); in nfs_follow_referral()
334 mnt = try_location(&mountdata, page, page2, location); in nfs_follow_referral()
335 if (!IS_ERR(mnt)) in nfs_follow_referral()
342 return mnt; in nfs_follow_referral()
352 struct vfsmount *mnt = ERR_PTR(-ENOMEM); in nfs_do_refmount() local
[all …]
/Linux-v4.19/fs/autofs/
Dexpire.c32 static int autofs_mount_busy(struct vfsmount *mnt, in autofs_mount_busy() argument
36 struct path path = {.mnt = mnt, .dentry = dentry}; in autofs_mount_busy()
61 if (!may_umount_tree(path.mnt)) { in autofs_mount_busy()
192 static int autofs_direct_busy(struct vfsmount *mnt, in autofs_direct_busy() argument
204 if (!may_umount_tree(mnt)) { in autofs_direct_busy()
224 static int autofs_tree_busy(struct vfsmount *mnt, in autofs_tree_busy() argument
249 if (autofs_mount_busy(mnt, p, how)) { in autofs_tree_busy()
283 static struct dentry *autofs_check_leaves(struct vfsmount *mnt, in autofs_check_leaves() argument
298 if (autofs_mount_busy(mnt, p, how)) in autofs_check_leaves()
317 struct vfsmount *mnt, in autofs_expire_direct() argument
[all …]
/Linux-v4.19/include/linux/
Dmount.h76 extern int mnt_want_write(struct vfsmount *mnt);
78 extern int mnt_clone_write(struct vfsmount *mnt);
79 extern void mnt_drop_write(struct vfsmount *mnt);
81 extern void mntput(struct vfsmount *mnt);
82 extern struct vfsmount *mntget(struct vfsmount *mnt);
84 extern int __mnt_is_readonly(struct vfsmount *mnt);
85 extern bool mnt_may_suid(struct vfsmount *mnt);
98 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
Dpath.h9 struct vfsmount *mnt; member
18 return path1->mnt == path2->mnt && path1->dentry == path2->dentry; in path_equal()
/Linux-v4.19/fs/exportfs/
Dexpfs.c26 static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir, in exportfs_get_name() argument
30 struct path path = {.mnt = mnt, .dentry = dir}; in exportfs_get_name()
120 static struct dentry *reconnect_one(struct vfsmount *mnt, in reconnect_one() argument
129 if (mnt->mnt_sb->s_export_op->get_parent) in reconnect_one()
130 parent = mnt->mnt_sb->s_export_op->get_parent(dentry); in reconnect_one()
141 err = exportfs_get_name(mnt, parent, nbuf, dentry); in reconnect_one()
210 reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) in reconnect_path() argument
217 BUG_ON(dentry == mnt->mnt_sb->s_root); in reconnect_path()
220 parent = reconnect_one(mnt, dentry, nbuf); in reconnect_path()
283 .mnt = path->mnt, in get_name()
[all …]
/Linux-v4.19/fs/cifs/
Dcifs_dfs_ref.c252 struct vfsmount *mnt; in cifs_dfs_do_refmount() local
263 mnt = vfs_submount(mntpt, &cifs_fs_type, devname, mountdata); in cifs_dfs_do_refmount()
266 return mnt; in cifs_dfs_do_refmount()
293 struct vfsmount *mnt; in cifs_dfs_do_automount() local
305 mnt = ERR_PTR(-ENOMEM); in cifs_dfs_do_automount()
315 mnt = ERR_CAST(tlink); in cifs_dfs_do_automount()
328 mnt = ERR_PTR(-ENOENT); in cifs_dfs_do_automount()
337 mnt = ERR_PTR(-EINVAL); in cifs_dfs_do_automount()
340 mnt = cifs_dfs_do_refmount(mntpt, cifs_sb, in cifs_dfs_do_automount()
343 __func__, referrals[i].node_name, mnt); in cifs_dfs_do_automount()
[all …]
/Linux-v4.19/tools/testing/selftests/vm/
Drun_vmtests8 mnt=./huge
61 mkdir $mnt
62 mount -t hugetlbfs none $mnt
123 ./userfaultfd hugetlb $half_ufd_size_MB 32 $mnt/ufd_test_file
130 rm -f $mnt/ufd_test_file
144 umount $mnt
145 rm -rf $mnt
/Linux-v4.19/Documentation/target/
Dtcm_mod_builder.txt30 target:/mnt/sdb/lio-core-2.6.git/Documentation/target# python tcm_mod_builder.py -p iSCSI -m tcm_na…
31 tcm_dir: /mnt/sdb/lio-core-2.6.git/Documentation/target/../../
34 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000
37 /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/tcm_nab5000_base.h
41 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../include/target/target_core_fabric_ops.h
43 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_fabric.c
45 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_fabric.h
47 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_configf…
49 /mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/Kbuild
[all …]
/Linux-v4.19/fs/notify/
Dfsnotify.c39 void __fsnotify_vfsmount_delete(struct vfsmount *mnt) in __fsnotify_vfsmount_delete() argument
41 fsnotify_clear_marks_by_mount(mnt); in __fsnotify_vfsmount_delete()
322 struct mount *mnt; in fsnotify() local
328 mnt = real_mount(((const struct path *)data)->mnt); in fsnotify()
330 mnt = NULL; in fsnotify()
340 (!mnt || !mnt->mnt_fsnotify_marks)) in fsnotify()
349 !(mnt && test_mask & mnt->mnt_fsnotify_mask)) in fsnotify()
356 if (mnt) { in fsnotify()
358 fsnotify_first_mark(&mnt->mnt_fsnotify_marks); in fsnotify()
/Linux-v4.19/security/apparmor/
Dmount.c93 if (aad(sa)->mnt.type) { in audit_cb()
95 audit_log_untrustedstring(ab, aad(sa)->mnt.type); in audit_cb()
97 if (aad(sa)->mnt.src_name) { in audit_cb()
99 audit_log_untrustedstring(ab, aad(sa)->mnt.src_name); in audit_cb()
101 if (aad(sa)->mnt.trans) { in audit_cb()
103 audit_log_untrustedstring(ab, aad(sa)->mnt.trans); in audit_cb()
105 if (aad(sa)->mnt.flags) { in audit_cb()
107 audit_mnt_flags(ab, aad(sa)->mnt.flags); in audit_cb()
110 if (aad(sa)->mnt.data) { in audit_cb()
112 audit_log_untrustedstring(ab, aad(sa)->mnt.data); in audit_cb()
[all …]
/Linux-v4.19/Documentation/filesystems/
Dsharedsubtree.txt44 Let's say /mnt has a mount that is shared.
45 mount --make-shared /mnt
51 # mount --bind /mnt /tmp
52 The above command replicates the mount at /mnt to the mountpoint /tmp
55 #ls /mnt
67 #ls /mnt/a
70 Note that the mount has propagated to the mount at /mnt as well.
72 And the same is true even when /dev/sd0 is mounted on /mnt/a. The
83 Let's say /mnt has a mount which is shared.
84 # mount --make-shared /mnt
[all …]

1234567