Lines Matching refs:mount
127 static int mnt_alloc_id(struct mount *mnt) in mnt_alloc_id()
137 static void mnt_free_id(struct mount *mnt) in mnt_free_id()
145 static int mnt_alloc_group_id(struct mount *mnt) in mnt_alloc_group_id()
158 void mnt_release_group_id(struct mount *mnt) in mnt_release_group_id()
167 static inline void mnt_add_count(struct mount *mnt, int n) in mnt_add_count()
181 int mnt_get_count(struct mount *mnt) in mnt_get_count()
197 static struct mount *alloc_vfsmnt(const char *name) in alloc_vfsmnt()
199 struct mount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL); in alloc_vfsmnt()
276 static inline void mnt_inc_writers(struct mount *mnt) in mnt_inc_writers()
285 static inline void mnt_dec_writers(struct mount *mnt) in mnt_dec_writers()
294 static unsigned int mnt_get_writers(struct mount *mnt) in mnt_get_writers()
344 struct mount *mnt = real_mount(m); in __mnt_want_write()
516 static inline int mnt_hold_writers(struct mount *mnt) in mnt_hold_writers()
559 static inline void mnt_unhold_writers(struct mount *mnt) in mnt_unhold_writers()
569 static int mnt_make_readonly(struct mount *mnt) in mnt_make_readonly()
582 struct mount *mnt; in sb_prepare_remount_readonly()
611 static void free_vfsmnt(struct mount *mnt) in free_vfsmnt()
623 free_vfsmnt(container_of(head, struct mount, mnt_rcu)); in delayed_free_vfsmnt()
629 struct mount *mnt; in __legitimize_mnt()
688 struct mount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry) in __lookup_mnt()
691 struct mount *p; in __lookup_mnt()
717 struct mount *child_mnt; in lookup_mnt()
741 static inline bool mnt_is_cursor(struct mount *mnt) in mnt_is_cursor()
764 struct mount *mnt; in __is_local_mountpoint()
870 static inline int check_mnt(struct mount *mnt) in check_mnt()
900 static struct mountpoint *unhash_mnt(struct mount *mnt) in unhash_mnt()
916 static void umount_mnt(struct mount *mnt) in umount_mnt()
924 void mnt_set_mountpoint(struct mount *mnt, in mnt_set_mountpoint()
926 struct mount *child_mnt) in mnt_set_mountpoint()
951 static void mnt_set_mountpoint_beneath(struct mount *new_parent, in mnt_set_mountpoint_beneath()
952 struct mount *top_mnt, in mnt_set_mountpoint_beneath()
955 struct mount *old_top_parent = top_mnt->mnt_parent; in mnt_set_mountpoint_beneath()
963 static void __attach_mnt(struct mount *mnt, struct mount *parent) in __attach_mnt()
992 static void attach_mnt(struct mount *mnt, struct mount *parent, in attach_mnt()
1008 void mnt_change_mountpoint(struct mount *parent, struct mountpoint *mp, struct mount *mnt) in mnt_change_mountpoint()
1011 struct mount *old_parent = mnt->mnt_parent; in mnt_change_mountpoint()
1026 static void commit_tree(struct mount *mnt) in commit_tree()
1028 struct mount *parent = mnt->mnt_parent; in commit_tree()
1029 struct mount *m; in commit_tree()
1048 static struct mount *next_mnt(struct mount *p, struct mount *root) in next_mnt()
1061 return list_entry(next, struct mount, mnt_child); in next_mnt()
1064 static struct mount *skip_mnt_tree(struct mount *p) in skip_mnt_tree()
1068 p = list_entry(prev, struct mount, mnt_child); in skip_mnt_tree()
1085 struct mount *mnt; in vfs_create_mount()
1166 static struct mount *clone_mnt(struct mount *old, struct dentry *root, in clone_mnt()
1170 struct mount *mnt; in clone_mnt()
1234 static void cleanup_mnt(struct mount *mnt) in cleanup_mnt()
1237 struct mount *m; in cleanup_mnt()
1261 cleanup_mnt(container_of(head, struct mount, mnt_rcu)); in __cleanup_mnt()
1268 struct mount *m, *t; in delayed_mntput()
1275 static void mntput_no_expire(struct mount *mnt) in mntput_no_expire()
1320 struct mount *p, *tmp; in mntput_no_expire()
1346 struct mount *m = real_mount(mnt); in mntput()
1406 struct mount *p; in mnt_clone_internal()
1415 static struct mount *mnt_list_next(struct mnt_namespace *ns, in mnt_list_next()
1418 struct mount *mnt, *ret = NULL; in mnt_list_next()
1456 struct mount *mnt = v; in m_next()
1465 struct mount *mnt = v; in m_stop()
1479 struct mount *r = v; in m_show()
1490 void mnt_cursor_del(struct mnt_namespace *ns, struct mount *cursor) in mnt_cursor_del()
1510 struct mount *mnt = real_mount(m); in may_umount_tree()
1513 struct mount *p; in may_umount_tree()
1563 struct mount *m; in namespace_unlock()
1595 static bool disconnect_mount(struct mount *mnt, enum umount_tree_flags how) in disconnect_mount()
1628 static void umount_tree(struct mount *mnt, enum umount_tree_flags how) in umount_tree()
1631 struct mount *p; in umount_tree()
1654 p = list_first_entry(&tmp_list, struct mount, mnt_list); in umount_tree()
1682 static void shrink_submounts(struct mount *mnt);
1707 static int do_umount(struct mount *mnt, int flags) in do_umount()
1816 struct mount *mnt; in __detach_mounts()
1826 mnt = hlist_entry(mp->m_list.first, struct mount, mnt_mp_list); in __detach_mounts()
1871 struct mount *mnt = real_mount(path->mnt); in can_umount()
1889 struct mount *mnt = real_mount(path->mnt); in path_umount()
1967 struct mount *copy_tree(struct mount *mnt, struct dentry *dentry, in copy_tree()
1970 struct mount *res, *p, *q, *r, *parent; in copy_tree()
1986 struct mount *s; in copy_tree()
2036 struct mount *tree; in collect_mounts()
2079 static bool has_locked_children(struct mount *mnt, struct dentry *dentry) in has_locked_children()
2081 struct mount *child; in has_locked_children()
2105 struct mount *old_mnt = real_mount(path->mnt); in clone_private_mount()
2106 struct mount *new_mnt; in clone_private_mount()
2138 struct mount *mnt; in iterate_mounts()
2150 static void lock_mnt_tree(struct mount *mnt) in lock_mnt_tree()
2152 struct mount *p; in lock_mnt_tree()
2177 static void cleanup_group_ids(struct mount *mnt, struct mount *end) in cleanup_group_ids()
2179 struct mount *p; in cleanup_group_ids()
2187 static int invent_group_ids(struct mount *mnt, bool recurse) in invent_group_ids()
2189 struct mount *p; in invent_group_ids()
2204 int count_mounts(struct mnt_namespace *ns, struct mount *mnt) in count_mounts()
2208 struct mount *p; in count_mounts()
2299 static int attach_recursive_mnt(struct mount *source_mnt, in attach_recursive_mnt()
2300 struct mount *top_mnt, in attach_recursive_mnt()
2308 struct mount *child, *dest_mnt, *p; in attach_recursive_mnt()
2367 struct mount *q; in attach_recursive_mnt()
2386 child = hlist_entry(tree_list.first, struct mount, mnt_hash); in attach_recursive_mnt()
2443 struct mount *m; in do_lock_mount()
2511 static int graft_tree(struct mount *mnt, struct mount *p, struct mountpoint *mp) in graft_tree()
2545 struct mount *m; in do_change_type()
2546 struct mount *mnt = real_mount(path->mnt); in do_change_type()
2575 static struct mount *__do_loopback(struct path *old_path, int recurse) in __do_loopback()
2577 struct mount *mnt = ERR_PTR(-EINVAL), *old = real_mount(old_path->mnt); in __do_loopback()
2606 struct mount *mnt = NULL, *parent; in do_loopback()
2652 struct mount *mnt, *p; in open_detached_copy()
2744 static bool can_change_locked_flags(struct mount *mnt, unsigned int mnt_flags) in can_change_locked_flags()
2771 static int change_mount_ro_state(struct mount *mnt, unsigned int mnt_flags) in change_mount_ro_state()
2785 static void set_mount_attributes(struct mount *mnt, unsigned int mnt_flags) in set_mount_attributes()
2821 struct mount *mnt = real_mount(path->mnt); in do_reconfigure_mnt()
2860 struct mount *mnt = real_mount(path->mnt); in do_remount()
2903 static inline int tree_contains_unbindable(struct mount *mnt) in tree_contains_unbindable()
2905 struct mount *p; in tree_contains_unbindable()
2919 static bool check_for_nsfs_mounts(struct mount *subtree) in check_for_nsfs_mounts()
2921 struct mount *p; in check_for_nsfs_mounts()
2937 struct mount *from, *to; in do_set_group()
2987 struct mount *m = from->mnt_master; in do_set_group()
3052 struct mount *mnt_from = real_mount(from->mnt), in can_move_mount_beneath()
3078 for (struct mount *p = mnt_from; mnt_has_parent(p); p = p->mnt_parent) in can_move_mount_beneath()
3113 struct mount *p; in do_move_mount()
3114 struct mount *old; in do_move_mount()
3115 struct mount *parent; in do_move_mount()
3225 static int do_add_mount(struct mount *newmnt, struct mountpoint *mp, in do_add_mount()
3228 struct mount *parent = real_mount(path->mnt); in do_add_mount()
3358 struct mount *mnt; in finish_automount()
3443 struct mount *mnt, *next; in mark_mounts_for_expiry()
3465 mnt = list_first_entry(&graveyard, struct mount, mnt_expire); in mark_mounts_for_expiry()
3481 static int select_submounts(struct mount *parent, struct list_head *graveyard) in select_submounts()
3483 struct mount *this_parent = parent; in select_submounts()
3492 struct mount *mnt = list_entry(tmp, struct mount, mnt_child); in select_submounts()
3527 static void shrink_submounts(struct mount *mnt) in shrink_submounts()
3530 struct mount *m; in shrink_submounts()
3535 m = list_first_entry(&graveyard, struct mount, in shrink_submounts()
3760 struct mount *p, *q; in copy_mnt_ns()
3761 struct mount *old; in copy_mnt_ns()
3762 struct mount *new; in copy_mnt_ns()
3837 struct mount *mnt = real_mount(m); in mount_subtree()
3872 SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name, in SYSCALL_DEFINE5() argument
3947 struct mount *mnt; in SYSCALL_DEFINE3()
4132 bool is_path_reachable(struct mount *mnt, struct dentry *dentry, in is_path_reachable()
4181 struct mount *new_mnt, *root_mnt, *old_mnt, *root_parent, *ex_parent; in SYSCALL_DEFINE2()
4276 static unsigned int recalc_flags(struct mount_kattr *kattr, struct mount *mnt) in recalc_flags()
4288 static int can_idmap_mount(const struct mount_kattr *kattr, struct mount *mnt) in can_idmap_mount()
4336 const struct mount *mnt) in mnt_allow_writers()
4343 static int mount_setattr_prepare(struct mount_kattr *kattr, struct mount *mnt) in mount_setattr_prepare()
4345 struct mount *m; in mount_setattr_prepare()
4369 struct mount *p; in mount_setattr_prepare()
4392 static void do_idmap_mount(const struct mount_kattr *kattr, struct mount *mnt) in do_idmap_mount()
4408 static void mount_setattr_commit(struct mount_kattr *kattr, struct mount *mnt) in mount_setattr_commit()
4410 struct mount *m; in mount_setattr_commit()
4433 struct mount *mnt = real_mount(path->mnt); in do_mount_setattr()
4696 struct mount *m; in init_mount_tree()
4727 mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct mount), in mnt_init()
4838 struct mount *mnt; in mnt_already_visible()
4844 struct mount *child; in mnt_already_visible()