Lines Matching refs:mount

277 static int mnt_alloc_id(struct mount *mnt)  in mnt_alloc_id()
289 static void mnt_free_id(struct mount *mnt) in mnt_free_id()
297 static int mnt_alloc_group_id(struct mount *mnt) in mnt_alloc_group_id()
310 void mnt_release_group_id(struct mount *mnt) in mnt_release_group_id()
319 static inline void mnt_add_count(struct mount *mnt, int n) in mnt_add_count()
333 int mnt_get_count(struct mount *mnt) in mnt_get_count()
349 static struct mount *alloc_vfsmnt(const char *name) in alloc_vfsmnt()
351 struct mount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL); in alloc_vfsmnt()
429 static inline void mnt_inc_writers(struct mount *mnt) in mnt_inc_writers()
438 static inline void mnt_dec_writers(struct mount *mnt) in mnt_dec_writers()
447 static unsigned int mnt_get_writers(struct mount *mnt) in mnt_get_writers()
497 struct mount *mnt = real_mount(m); in mnt_get_write_access()
671 static inline int mnt_hold_writers(struct mount *mnt) in mnt_hold_writers()
714 static inline void mnt_unhold_writers(struct mount *mnt) in mnt_unhold_writers()
724 static int mnt_make_readonly(struct mount *mnt) in mnt_make_readonly()
737 struct mount *mnt; in sb_prepare_remount_readonly()
766 static void free_vfsmnt(struct mount *mnt) in free_vfsmnt()
778 free_vfsmnt(container_of(head, struct mount, mnt_rcu)); in delayed_free_vfsmnt()
784 struct mount *mnt; in __legitimize_mnt()
839 struct mount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry) in __lookup_mnt()
842 struct mount *p; in __lookup_mnt()
868 struct mount *child_mnt; in lookup_mnt()
900 struct mount *mnt, *n; in __is_local_mountpoint()
1007 static inline int check_mnt(struct mount *mnt) in check_mnt()
1012 static inline bool check_anonymous_mnt(struct mount *mnt) in check_anonymous_mnt()
1048 static void __umount_mnt(struct mount *mnt, struct list_head *shrink_list) in __umount_mnt()
1051 struct mount *parent = mnt->mnt_parent; in __umount_mnt()
1067 static void umount_mnt(struct mount *mnt) in umount_mnt()
1075 void mnt_set_mountpoint(struct mount *mnt, in mnt_set_mountpoint()
1077 struct mount *child_mnt) in mnt_set_mountpoint()
1085 static void make_visible(struct mount *mnt) in make_visible()
1087 struct mount *parent = mnt->mnt_parent; in make_visible()
1111 static void attach_mnt(struct mount *mnt, struct mount *parent, in attach_mnt()
1118 void mnt_change_mountpoint(struct mount *parent, struct mountpoint *mp, struct mount *mnt) in mnt_change_mountpoint()
1131 static inline struct mount *node_to_mount(struct rb_node *node) in node_to_mount()
1133 return node ? rb_entry(node, struct mount, mnt_node) : NULL; in node_to_mount()
1136 static void mnt_add_to_ns(struct mnt_namespace *ns, struct mount *mnt) in mnt_add_to_ns()
1165 static struct mount *next_mnt(struct mount *p, struct mount *root) in next_mnt()
1178 return list_entry(next, struct mount, mnt_child); in next_mnt()
1181 static struct mount *skip_mnt_tree(struct mount *p) in skip_mnt_tree()
1185 p = list_entry(prev, struct mount, mnt_child); in skip_mnt_tree()
1194 static void commit_tree(struct mount *mnt) in commit_tree()
1199 for (struct mount *m = mnt; m; m = next_mnt(m, mnt)) in commit_tree()
1220 struct mount *mnt; in vfs_create_mount()
1295 static struct mount *clone_mnt(struct mount *old, struct dentry *root, in clone_mnt()
1299 struct mount *mnt; in clone_mnt()
1355 static void cleanup_mnt(struct mount *mnt) in cleanup_mnt()
1358 struct mount *m; in cleanup_mnt()
1382 cleanup_mnt(container_of(head, struct mount, mnt_rcu)); in __cleanup_mnt()
1389 struct mount *m, *t; in delayed_mntput()
1396 static void mntput_no_expire(struct mount *mnt) in mntput_no_expire()
1443 struct mount *p, *tmp; in mntput_no_expire()
1469 struct mount *m = real_mount(mnt); in mntput()
1529 struct mount *p; in mnt_clone_internal()
1541 static struct mount *mnt_find_id_at(struct mnt_namespace *ns, u64 mnt_id) in mnt_find_id_at()
1544 struct mount *ret = NULL; in mnt_find_id_at()
1547 struct mount *m = node_to_mount(node); in mnt_find_id_at()
1565 static struct mount *mnt_find_id_at_reverse(struct mnt_namespace *ns, u64 mnt_id) in mnt_find_id_at_reverse()
1568 struct mount *ret = NULL; in mnt_find_id_at_reverse()
1571 struct mount *m = node_to_mount(node); in mnt_find_id_at_reverse()
1599 struct mount *next = NULL, *mnt = v; in m_next()
1618 struct mount *r = v; in m_show()
1641 struct mount *mnt = real_mount(m); in may_umount_tree()
1646 for (struct mount *p = mnt; p; p = next_mnt(p, mnt)) { in may_umount_tree()
1687 static void mnt_notify(struct mount *p) in mnt_notify()
1704 struct mount *m, *tmp; in notify_mnt_list()
1735 struct mount *m; in namespace_unlock()
1787 static bool disconnect_mount(struct mount *mnt, enum umount_tree_flags how) in disconnect_mount()
1820 static void umount_tree(struct mount *mnt, enum umount_tree_flags how) in umount_tree()
1823 struct mount *p; in umount_tree()
1848 p = list_first_entry(&tmp_list, struct mount, mnt_list); in umount_tree()
1888 static void shrink_submounts(struct mount *mnt);
1913 static int do_umount(struct mount *mnt, int flags) in do_umount()
2027 struct mount *mnt; in __detach_mounts()
2036 mnt = hlist_entry(mp.node.next, struct mount, mnt_mp_list); in __detach_mounts()
2068 struct mount *mnt = real_mount(path->mnt); in can_umount()
2087 struct mount *mnt = real_mount(path->mnt); in path_umount()
2210 struct mount *copy_tree(struct mount *src_root, struct dentry *dentry, in copy_tree()
2213 struct mount *res, *src_parent, *src_root_child, *src_mnt, in copy_tree()
2304 struct mount *root = real_mount(path->mnt); in collect_paths()
2305 struct mount *child; in collect_paths()
2319 for (struct mount *m = child; m; m = next_mnt(m, child)) { in collect_paths()
2347 struct mount *m = real_mount(mnt); in dissolve_on_fput()
2375 static bool __has_locked_children(struct mount *mnt, struct dentry *dentry) in __has_locked_children()
2377 struct mount *child; in __has_locked_children()
2389 bool has_locked_children(struct mount *mnt, struct dentry *dentry) in has_locked_children()
2405 static bool check_for_nsfs_mounts(struct mount *subtree) in check_for_nsfs_mounts()
2407 struct mount *p; in check_for_nsfs_mounts()
2435 struct mount *old_mnt = real_mount(path->mnt); in clone_private_mount()
2436 struct mount *new_mnt; in clone_private_mount()
2474 static void lock_mnt_tree(struct mount *mnt) in lock_mnt_tree()
2476 struct mount *p; in lock_mnt_tree()
2501 static void cleanup_group_ids(struct mount *mnt, struct mount *end) in cleanup_group_ids()
2503 struct mount *p; in cleanup_group_ids()
2511 static int invent_group_ids(struct mount *mnt, bool recurse) in invent_group_ids()
2513 struct mount *p; in invent_group_ids()
2528 int count_mounts(struct mnt_namespace *ns, struct mount *mnt) in count_mounts()
2532 struct mount *p; in count_mounts()
2622 static int attach_recursive_mnt(struct mount *source_mnt, in attach_recursive_mnt()
2623 struct mount *dest_mnt, in attach_recursive_mnt()
2631 struct mount *child, *p; in attach_recursive_mnt()
2632 struct mount *top; in attach_recursive_mnt()
2697 struct mount *q; in attach_recursive_mnt()
2707 struct mount *r = child; in attach_recursive_mnt()
2722 child = hlist_entry(tree_list.first, struct mount, mnt_hash); in attach_recursive_mnt()
2780 struct mount *m = real_mount(mnt); in do_lock_mount()
2850 static int graft_tree(struct mount *mnt, struct mount *p, struct mountpoint *mp) in graft_tree()
2862 static int may_change_propagation(const struct mount *m) in may_change_propagation()
2897 struct mount *m; in do_change_type()
2898 struct mount *mnt = real_mount(path->mnt); in do_change_type()
2974 struct mount *mnt = real_mount(path->mnt); in may_copy_tree()
2994 static struct mount *__do_loopback(struct path *old_path, int recurse) in __do_loopback()
2996 struct mount *old = real_mount(old_path->mnt); in __do_loopback()
3020 struct mount *mnt = NULL, *parent; in do_loopback()
3064 struct mount *mnt, *p; in open_detached_copy()
3173 static bool can_change_locked_flags(struct mount *mnt, unsigned int mnt_flags) in can_change_locked_flags()
3200 static int change_mount_ro_state(struct mount *mnt, unsigned int mnt_flags) in change_mount_ro_state()
3214 static void set_mount_attributes(struct mount *mnt, unsigned int mnt_flags) in set_mount_attributes()
3258 struct mount *mnt = real_mount(path->mnt); in do_reconfigure_mnt()
3297 struct mount *mnt = real_mount(path->mnt); in do_remount()
3340 static inline int tree_contains_unbindable(struct mount *mnt) in tree_contains_unbindable()
3342 struct mount *p; in tree_contains_unbindable()
3352 struct mount *from, *to; in do_set_group()
3443 static bool mount_is_ancestor(const struct mount *p1, const struct mount *p2) in mount_is_ancestor()
3475 struct mount *mnt_from = real_mount(from->mnt), in can_move_mount_beneath()
3564 static inline bool may_use_mount(struct mount *mnt) in may_use_mount()
3584 struct mount *p; in do_move_mount()
3585 struct mount *old; in do_move_mount()
3586 struct mount *parent; in do_move_mount()
3688 static int do_add_mount(struct mount *newmnt, struct mountpoint *mp, in do_add_mount()
3691 struct mount *parent = real_mount(path->mnt); in do_add_mount()
3820 struct mount *mnt; in finish_automount()
3890 struct mount *mnt, *next; in mark_mounts_for_expiry()
3915 mnt = list_first_entry(&graveyard, struct mount, mnt_expire); in mark_mounts_for_expiry()
3931 static int select_submounts(struct mount *parent, struct list_head *graveyard) in select_submounts()
3933 struct mount *this_parent = parent; in select_submounts()
3942 struct mount *mnt = list_entry(tmp, struct mount, mnt_child); in select_submounts()
3977 static void shrink_submounts(struct mount *mnt) in shrink_submounts()
3980 struct mount *m; in shrink_submounts()
3985 m = list_first_entry(&graveyard, struct mount, in shrink_submounts()
4211 struct mount *p, *q; in copy_mnt_ns()
4212 struct mount *old; in copy_mnt_ns()
4213 struct mount *new; in copy_mnt_ns()
4290 struct mount *mnt = real_mount(m); in mount_subtree()
4324 SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name, in SYSCALL_DEFINE5() argument
4399 struct mount *mnt; in SYSCALL_DEFINE3()
4616 bool is_path_reachable(struct mount *mnt, struct dentry *dentry, in is_path_reachable()
4665 struct mount *new_mnt, *root_mnt, *old_mnt, *root_parent, *ex_parent; in SYSCALL_DEFINE2()
4757 static unsigned int recalc_flags(struct mount_kattr *kattr, struct mount *mnt) in recalc_flags()
4769 static int can_idmap_mount(const struct mount_kattr *kattr, struct mount *mnt) in can_idmap_mount()
4820 const struct mount *mnt) in mnt_allow_writers()
4827 static int mount_setattr_prepare(struct mount_kattr *kattr, struct mount *mnt) in mount_setattr_prepare()
4829 struct mount *m; in mount_setattr_prepare()
4853 struct mount *p; in mount_setattr_prepare()
4876 static void do_idmap_mount(const struct mount_kattr *kattr, struct mount *mnt) in do_idmap_mount()
4890 static void mount_setattr_commit(struct mount_kattr *kattr, struct mount *mnt) in mount_setattr_commit()
4892 struct mount *m; in mount_setattr_commit()
4915 struct mount *mnt = real_mount(path->mnt); in do_mount_setattr()
5223 struct mount *mnt = mnt_find_id_at(ns, id); in lookup_mnt_in_ns()
5275 static u64 mnt_to_propagation_flags(struct mount *m) in mnt_to_propagation_flags()
5304 struct mount *m = real_mount(s->mnt); in statmount_mnt_basic()
5319 struct mount *m = real_mount(s->mnt); in statmount_propagate_from()
5377 struct mount *r = real_mount(s->mnt); in statmount_sb_source()
5649 static struct mount *listmnt_next(struct mount *curr, bool reverse) in listmnt_next()
5663 struct mount *first, *child; in grab_requested_root()
5715 struct mount *m; in do_statmount()
5977 struct mount *r, *first; in do_listmount()
6097 struct mount *m; in init_mount_tree()
6130 mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct mount), in mnt_init()
6245 struct mount *mnt, *n; in mnt_already_visible()
6250 struct mount *child; in mnt_already_visible()