/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 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() 125 err = sb->s_op->show_options2(mnt, m, mnt_path.dentry); in show_vfsmnt() 133 static int show_mountinfo(struct seq_file *m, struct vfsmount *mnt) in show_mountinfo() argument 136 struct mount *r = real_mount(mnt); in show_mountinfo() [all …]
|
D | mount.h | 38 struct vfsmount mnt; member 79 static inline struct mount *real_mount(struct vfsmount *mnt) in real_mount() argument 81 return container_of(mnt, struct mount, mnt); in real_mount() 84 static inline int mnt_has_parent(struct mount *mnt) in mnt_has_parent() argument 86 return mnt != mnt->mnt_parent; in mnt_has_parent() 89 static inline int is_mounted(struct vfsmount *mnt) in is_mounted() argument 92 return !IS_ERR_OR_NULL(real_mount(mnt)->mnt_ns); in is_mounted() 102 struct mount *m = __lookup_mnt(path->mnt, path->dentry); in __path_is_mountpoint() 103 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() [all …]
|
D | namei.c | 472 mntget(path->mnt); in path_get() 486 mntput(path->mnt); in path_put() 565 struct vfsmount *mnt = path->mnt; in path_connected() local 566 struct super_block *sb = mnt->mnt_sb; in path_connected() 569 if (!(sb->s_iflags & SB_I_MULTIROOT) && (mnt->mnt_root == sb->s_root)) in path_connected() 572 return is_subdir(path->dentry, mnt->mnt_root); in path_connected() 617 int res = __legitimize_mnt(path->mnt, nd->m_seq); in legitimize_path() 620 path->mnt = NULL; in legitimize_path() 647 if (!nd->root.mnt || (nd->flags & LOOKUP_ROOT)) in legitimize_root() 693 nd->path.mnt = NULL; in unlazy_walk() [all …]
|
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 | file_table.c | 214 struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, in alloc_file_pseudo() argument 225 path.dentry = d_alloc_pseudo(mnt->mnt_sb, &this); in alloc_file_pseudo() 228 if (!mnt->mnt_sb->s_d_op) in alloc_file_pseudo() 230 path.mnt = mntget(mnt); in alloc_file_pseudo() 257 struct vfsmount *mnt = file->f_path.mnt; in __fput() local 291 __mnt_drop_write(mnt); in __fput() 295 dissolve_on_fput(mnt); in __fput() 296 mntput(mnt); in __fput()
|
/fs/nfs/ |
D | super.c | 1046 static void nfs_validate_transport_protocol(struct nfs_parsed_mount_data *mnt) in nfs_validate_transport_protocol() argument 1048 switch (mnt->nfs_server.protocol) { in nfs_validate_transport_protocol() 1054 mnt->nfs_server.protocol = XPRT_TRANSPORT_TCP; in nfs_validate_transport_protocol() 1062 static void nfs_set_mount_transport_protocol(struct nfs_parsed_mount_data *mnt) in nfs_set_mount_transport_protocol() argument 1064 nfs_validate_transport_protocol(mnt); in nfs_set_mount_transport_protocol() 1066 if (mnt->mount_server.protocol == XPRT_TRANSPORT_UDP || in nfs_set_mount_transport_protocol() 1067 mnt->mount_server.protocol == XPRT_TRANSPORT_TCP) in nfs_set_mount_transport_protocol() 1069 switch (mnt->nfs_server.protocol) { in nfs_set_mount_transport_protocol() 1071 mnt->mount_server.protocol = XPRT_TRANSPORT_UDP; in nfs_set_mount_transport_protocol() 1075 mnt->mount_server.protocol = XPRT_TRANSPORT_TCP; in nfs_set_mount_transport_protocol() [all …]
|
D | nfs4namespace.c | 245 struct vfsmount *mnt = ERR_PTR(-ENOENT); in try_location() local 282 mnt = vfs_submount(mountdata->dentry, &nfs4_referral_fs_type, page, mountdata); in try_location() 283 if (!IS_ERR(mnt)) in try_location() 287 return mnt; in try_location() 299 struct vfsmount *mnt = ERR_PTR(-ENOENT); in nfs_follow_referral() local 324 mnt = ERR_PTR(error); in nfs_follow_referral() 335 mnt = try_location(&mountdata, page, page2, location); in nfs_follow_referral() 336 if (!IS_ERR(mnt)) in nfs_follow_referral() 343 return mnt; in nfs_follow_referral() 353 struct vfsmount *mnt = ERR_PTR(-ENOMEM); in nfs_do_refmount() local [all …]
|
D | namespace.c | 146 struct vfsmount *mnt; in nfs_d_automount() local 154 mnt = ERR_PTR(-ENOMEM); in nfs_d_automount() 160 mnt = server->nfs_client->rpc_ops->submount(server, path->dentry, fh, fattr); in nfs_d_automount() 161 if (IS_ERR(mnt)) in nfs_d_automount() 164 mntget(mnt); /* prevent immediate expiration */ in nfs_d_automount() 165 mnt_set_expiry(mnt, &nfs_automount_list); in nfs_d_automount() 171 return mnt; in nfs_d_automount() 245 struct vfsmount *mnt; in nfs_do_submount() local 254 mnt = ERR_CAST(devname); in nfs_do_submount() 256 mnt = nfs_do_clone_mount(NFS_SB(dentry->d_sb), devname, &mountdata); in nfs_do_submount() [all …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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() 323 struct mount *mnt = NULL; in fsnotify() local 329 mnt = real_mount(((const struct path *)data)->mnt); in fsnotify() 330 mnt_or_sb_mask |= mnt->mnt_fsnotify_mask; in fsnotify() 344 (!mnt || !mnt->mnt_fsnotify_marks)) in fsnotify() 361 if (mnt) { in fsnotify() 363 fsnotify_first_mark(&mnt->mnt_fsnotify_marks); in fsnotify()
|
/fs/devpts/ |
D | inode.c | 142 sb = path->mnt->mnt_sb; in devpts_ptmx_path() 144 (path->mnt->mnt_root != sb->s_root)) in devpts_ptmx_path() 179 while (path.mnt->mnt_root == path.dentry) in devpts_mntget() 184 if ((path.mnt->mnt_sb->s_magic != DEVPTS_SUPER_MAGIC) || in devpts_mntget() 185 (DEVPTS_SB(path.mnt->mnt_sb) != fsi)) in devpts_mntget() 189 if (DEVPTS_SB(path.mnt->mnt_sb) == fsi) in devpts_mntget() 190 return path.mnt; in devpts_mntget() 195 mntput(path.mnt); in devpts_mntget() 209 if (path.mnt->mnt_sb->s_magic != DEVPTS_SUPER_MAGIC) { in devpts_acquire() 222 sb = path.mnt->mnt_sb; in devpts_acquire()
|
/fs/overlayfs/ |
D | super.c | 237 mntput(ofs->lower_layers[i].mnt); in ovl_free_fs() 642 struct vfsmount *mnt = ofs->upper_mnt; in ovl_workdir_create() local 669 ovl_workdir_cleanup(dir, mnt, work, 0); in ovl_workdir_create() 821 *stack_depth = max(*stack_depth, path->mnt->mnt_sb->s_stack_depth); in ovl_lower_dir() 1067 if (sb_rdonly(upperpath->mnt->mnt_sb)) { in ovl_get_upper() 1109 struct vfsmount *mnt = ofs->upper_mnt; in ovl_make_workdir() local 1114 err = mnt_want_write(mnt); in ovl_make_workdir() 1182 mnt_drop_write(mnt); in ovl_make_workdir() 1197 if (upperpath->mnt != workpath.mnt) { in ovl_get_workdir() 1232 struct vfsmount *mnt = ofs->upper_mnt; in ovl_get_indexdir() local [all …]
|
D | ovl_entry.h | 32 struct vfsmount *mnt; member 47 static_assert(offsetof(struct ovl_layer, mnt) == 0); 48 static_assert(__same_type(typeof_member(struct ovl_layer, mnt), struct vfsmount *));
|
/fs/notify/fanotify/ |
D | fanotify_user.c | 118 if (event->path.dentry && event->path.mnt) in create_fd() 635 struct vfsmount *mnt, __u32 mask, in fanotify_remove_vfsmount_mark() argument 638 return fanotify_remove_mark(group, &real_mount(mnt)->mnt_fsnotify_marks, in fanotify_remove_vfsmount_mark() 730 struct vfsmount *mnt, __u32 mask, in fanotify_add_vfsmount_mark() argument 733 return fanotify_add_mark(group, &real_mount(mnt)->mnt_fsnotify_marks, in fanotify_add_vfsmount_mark() 945 path->mnt->mnt_sb->s_type->fs_flags & FS_DISALLOW_NOTIFY_PERM) in fanotify_events_supported() 959 path->mnt->mnt_sb->s_flags & SB_NOUSER) in fanotify_events_supported() 969 struct vfsmount *mnt = NULL; in do_fanotify_mark() local 1088 mnt = path.mnt; in do_fanotify_mark() 1094 ret = fanotify_add_vfsmount_mark(group, mnt, mask, in do_fanotify_mark() [all …]
|
/fs/hugetlbfs/ |
D | inode.c | 1438 struct vfsmount *mnt; in hugetlb_file_setup() local 1447 mnt = hugetlbfs_vfsmount[hstate_idx]; in hugetlb_file_setup() 1448 if (!mnt) in hugetlb_file_setup() 1465 inode = hugetlbfs_get_inode(mnt->mnt_sb, NULL, S_IFREG | S_IRWXUGO, 0); in hugetlb_file_setup() 1479 file = alloc_file_pseudo(inode, mnt, name, O_RDWR, in hugetlb_file_setup() 1496 struct vfsmount *mnt; in mount_one_hugetlbfs() local 1500 mnt = ERR_CAST(fc); in mount_one_hugetlbfs() 1504 mnt = fc_mount(fc); in mount_one_hugetlbfs() 1507 if (IS_ERR(mnt)) in mount_one_hugetlbfs() 1510 return mnt; in mount_one_hugetlbfs() [all …]
|
/fs/cachefiles/ |
D | bind.c | 118 cache->mnt = path.mnt; in cachefiles_daemon_add_cache() 239 mntput(cache->mnt); in cachefiles_daemon_add_cache() 240 cache->mnt = NULL; in cachefiles_daemon_add_cache() 269 mntput(cache->mnt); in cachefiles_daemon_unbind()
|
/fs/afs/ |
D | mntpt.c | 160 struct vfsmount *mnt; in afs_mntpt_do_automount() local 171 mnt = fc_mount(fc); in afs_mntpt_do_automount() 173 mnt = ERR_PTR(ret); in afs_mntpt_do_automount() 176 return mnt; in afs_mntpt_do_automount()
|
/fs/nfsd/ |
D | vfs.h | 127 ret = mnt_want_write(fh->fh_export->ex_path.mnt); in fh_want_write() 137 mnt_drop_write(fh->fh_export->ex_path.mnt); in fh_drop_write() 143 struct path p = {.mnt = fh->fh_export->ex_path.mnt, in fh_getattr()
|
/fs/proc/ |
D | root.c | 305 struct vfsmount *mnt; in pid_ns_prepare_proc() local 323 mnt = fc_mount(fc); in pid_ns_prepare_proc() 325 if (IS_ERR(mnt)) in pid_ns_prepare_proc() 326 return PTR_ERR(mnt); in pid_ns_prepare_proc() 328 ns->proc_mnt = mnt; in pid_ns_prepare_proc()
|