/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() [all …]
|
D | namei.c | 486 mntget(path->mnt); in path_get() 500 mntput(path->mnt); in path_put() 535 p->path.mnt = NULL; in set_nameidata() 572 static bool path_connected(struct vfsmount *mnt, struct dentry *dentry) in path_connected() argument 574 struct super_block *sb = mnt->mnt_sb; in path_connected() 577 if (mnt->mnt_root == sb->s_root) in path_connected() 580 return is_subdir(dentry, mnt->mnt_root); in path_connected() 610 nd->path.mnt = NULL; in terminate_walk() 617 int res = __legitimize_mnt(path->mnt, mseq); in __legitimize_path() 620 path->mnt = NULL; in __legitimize_path() [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 | 215 struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, in alloc_file_pseudo() argument 226 path.dentry = d_alloc_pseudo(mnt->mnt_sb, &this); in alloc_file_pseudo() 229 if (!mnt->mnt_sb->s_d_op) in alloc_file_pseudo() 231 path.mnt = mntget(mnt); in alloc_file_pseudo() 258 struct vfsmount *mnt = file->f_path.mnt; in __fput() local 292 __mnt_drop_write(mnt); in __fput() 296 dissolve_on_fput(mnt); in __fput() 297 mntput(mnt); in __fput()
|
D | nsfs.c | 60 struct vfsmount *mnt = nsfs_mnt; in __ns_get_path() local 75 path->mnt = mntget(mnt); in __ns_get_path() 80 inode = new_inode_pseudo(mnt->mnt_sb); in __ns_get_path() 92 dentry = d_alloc_anon(mnt->mnt_sb); in __ns_get_path()
|
/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 …]
|
D | dev-ioctl.c | 194 while (path.dentry == path.mnt->mnt_root) { in find_autofs_mount() 462 struct vfsmount *mnt; in autofs_dev_ioctl_expire() local 466 mnt = fp->f_path.mnt; in autofs_dev_ioctl_expire() 468 return autofs_do_expire_multi(sbi->sb, mnt, sbi, how); in autofs_dev_ioctl_expire() 477 if (may_umount(fp->f_path.mnt)) in autofs_dev_ioctl_askumount() 532 if (path.mnt->mnt_root == path.dentry) { in autofs_dev_ioctl_ismountpoint()
|
/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 …]
|
/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/nfs/ |
D | namespace.c | 149 struct vfsmount *mnt = ERR_PTR(-ENOMEM); in nfs_d_automount() local 161 fc = fs_context_for_submount(path->mnt->mnt_sb->s_type, path->dentry); in nfs_d_automount() 189 mnt = ERR_PTR(ret); in nfs_d_automount() 194 mnt = vfs_create_mount(fc); in nfs_d_automount() 195 if (IS_ERR(mnt)) in nfs_d_automount() 198 mntget(mnt); /* prevent immediate expiration */ in nfs_d_automount() 202 mnt_set_expiry(mnt, &nfs_automount_list); in nfs_d_automount() 207 return mnt; in nfs_d_automount()
|
/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 | ovl_entry.h | 35 struct vfsmount *mnt; member 50 static_assert(offsetof(struct ovl_layer, mnt) == 0); 51 static_assert(__same_type(typeof_member(struct ovl_layer, mnt), struct vfsmount *)); 98 return ofs->layers[0].mnt; in ovl_upper_mnt()
|
D | super.c | 247 mounts[i] = ofs->layers[i].mnt; in ovl_free_fs() 740 struct vfsmount *mnt = ovl_upper_mnt(ofs); in ovl_workdir_create() local 764 err = ovl_workdir_cleanup(dir, mnt, work, 0); in ovl_workdir_create() 917 *stack_depth = max(*stack_depth, path->mnt->mnt_sb->s_stack_depth); in ovl_lower_dir() 1155 if (sb_rdonly(upperpath->mnt->mnt_sb)) { in ovl_get_upper() 1179 upper_layer->mnt = upper_mnt; in ovl_get_upper() 1310 struct vfsmount *mnt = ovl_upper_mnt(ofs); in ovl_make_workdir() local 1317 err = mnt_want_write(mnt); in ovl_make_workdir() 1419 mnt_drop_write(mnt); in ovl_make_workdir() 1434 if (upperpath->mnt != workpath.mnt) { in ovl_get_workdir() [all …]
|
/fs/notify/fanotify/ |
D | fanotify_user.c | 345 if (path && path->mnt && path->dentry) { in copy_event_to_user() 777 struct vfsmount *mnt, __u32 mask, in fanotify_remove_vfsmount_mark() argument 780 return fanotify_remove_mark(group, &real_mount(mnt)->mnt_fsnotify_marks, in fanotify_remove_vfsmount_mark() 873 struct vfsmount *mnt, __u32 mask, in fanotify_add_vfsmount_mark() argument 876 return fanotify_add_mark(group, &real_mount(mnt)->mnt_fsnotify_marks, in fanotify_add_vfsmount_mark() 1107 path->mnt->mnt_sb->s_type->fs_flags & FS_DISALLOW_NOTIFY_PERM) in fanotify_events_supported() 1121 path->mnt->mnt_sb->s_flags & SB_NOUSER) in fanotify_events_supported() 1131 struct vfsmount *mnt = NULL; in do_fanotify_mark() local 1256 mnt = path.mnt; in do_fanotify_mark() 1259 if (mnt || !S_ISDIR(inode->i_mode)) { in do_fanotify_mark() [all …]
|
/fs/hugetlbfs/ |
D | inode.c | 1478 struct vfsmount *mnt; in hugetlb_file_setup() local 1487 mnt = hugetlbfs_vfsmount[hstate_idx]; in hugetlb_file_setup() 1488 if (!mnt) in hugetlb_file_setup() 1505 inode = hugetlbfs_get_inode(mnt->mnt_sb, NULL, S_IFREG | S_IRWXUGO, 0); in hugetlb_file_setup() 1519 file = alloc_file_pseudo(inode, mnt, name, O_RDWR, in hugetlb_file_setup() 1536 struct vfsmount *mnt; in mount_one_hugetlbfs() local 1540 mnt = ERR_CAST(fc); in mount_one_hugetlbfs() 1544 mnt = fc_mount(fc); in mount_one_hugetlbfs() 1547 if (IS_ERR(mnt)) in mount_one_hugetlbfs() 1550 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()
|
D | namei.c | 307 path.mnt = cache->mnt; in cachefiles_bury_object() 407 path.mnt = cache->mnt; in cachefiles_bury_object() 409 path_to_graveyard.mnt = cache->mnt; in cachefiles_bury_object() 501 path.mnt = cache->mnt; in cachefiles_walk_to_object() 789 path.mnt = cache->mnt; in cachefiles_get_directory()
|
/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 | 141 ret = mnt_want_write(fh->fh_export->ex_path.mnt); in fh_want_write() 151 mnt_drop_write(fh->fh_export->ex_path.mnt); in fh_drop_write() 157 struct path p = {.mnt = fh->fh_export->ex_path.mnt, in fh_getattr()
|