Lines Matching refs:mount
17 static inline struct mount *next_peer(struct mount *p) in next_peer()
19 return list_entry(p->mnt_share.next, struct mount, mnt_share); in next_peer()
22 static inline struct mount *first_slave(struct mount *p) in first_slave()
24 return hlist_entry(p->mnt_slave_list.first, struct mount, mnt_slave); in first_slave()
27 static inline struct mount *next_slave(struct mount *p) in next_slave()
29 return hlist_entry(p->mnt_slave.next, struct mount, mnt_slave); in next_slave()
32 static struct mount *get_peer_under_root(struct mount *mnt, in get_peer_under_root()
36 struct mount *m = mnt; in get_peer_under_root()
55 int get_dominating_id(struct mount *mnt, const struct path *root) in get_dominating_id()
57 struct mount *m; in get_dominating_id()
60 struct mount *d = get_peer_under_root(m, mnt->mnt_ns, root); in get_dominating_id()
68 static inline bool will_be_unmounted(struct mount *m) in will_be_unmounted()
73 static struct mount *propagation_source(struct mount *mnt) in propagation_source()
76 struct mount *m; in propagation_source()
86 static void transfer_propagation(struct mount *mnt, struct mount *to) in transfer_propagation()
89 struct mount *m; in transfer_propagation()
105 void change_mnt_propagation(struct mount *mnt, int type) in change_mnt_propagation()
107 struct mount *m = mnt->mnt_master; in change_mnt_propagation()
139 static struct mount *__propagation_next(struct mount *m, in __propagation_next()
140 struct mount *origin) in __propagation_next()
143 struct mount *master = m->mnt_master; in __propagation_next()
146 struct mount *next = next_peer(m); in __propagation_next()
166 static struct mount *propagation_next(struct mount *m, in propagation_next()
167 struct mount *origin) in propagation_next()
176 static struct mount *skip_propagation_subtree(struct mount *m, in skip_propagation_subtree()
177 struct mount *origin) in skip_propagation_subtree()
182 struct mount *p = __propagation_next(m, origin); in skip_propagation_subtree()
190 static struct mount *next_group(struct mount *m, struct mount *origin) in next_group()
194 struct mount *next; in next_group()
207 struct mount *master = m->mnt_master; in next_group()
222 static bool need_secondary(struct mount *m, struct mountpoint *dest_mp) in need_secondary()
236 static struct mount *find_master(struct mount *m, in find_master()
237 struct mount *last_copy, in find_master()
238 struct mount *original) in find_master()
240 struct mount *p; in find_master()
250 struct mount *parent = last_copy->mnt_parent; in find_master()
273 int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, in propagate_mnt()
274 struct mount *source_mnt, struct hlist_head *tree_list) in propagate_mnt()
276 struct mount *m, *n, *copy, *this; in propagate_mnt()
334 static inline int do_refcount_check(struct mount *mnt, int count) in do_refcount_check()
358 bool propagation_would_overmount(const struct mount *from, in propagation_would_overmount()
359 const struct mount *to, in propagation_would_overmount()
368 for (const struct mount *m = to; m; m = m->mnt_master) { in propagation_would_overmount()
386 int propagate_mount_busy(struct mount *mnt, int refcnt) in propagate_mount_busy()
388 struct mount *parent = mnt->mnt_parent; in propagate_mount_busy()
401 for (struct mount *m = propagation_next(parent, parent); m; in propagate_mount_busy()
404 struct mount *child = __lookup_mnt(&m->mnt, mnt->mnt_mountpoint); in propagate_mount_busy()
429 void propagate_mount_unlock(struct mount *mnt) in propagate_mount_unlock()
431 struct mount *parent = mnt->mnt_parent; in propagate_mount_unlock()
432 struct mount *m, *child; in propagate_mount_unlock()
444 static inline bool is_candidate(struct mount *m) in is_candidate()
449 static void umount_one(struct mount *m, struct list_head *to_umount) in umount_one()
457 static void remove_from_candidate_list(struct mount *m) in remove_from_candidate_list()
466 struct mount *m, *p, *q; in gather_candidates()
475 struct mount *child = __lookup_mnt(&q->mnt, in gather_candidates()
505 static void trim_ancestors(struct mount *m) in trim_ancestors()
507 struct mount *p; in trim_ancestors()
528 static void trim_one(struct mount *m, struct list_head *to_umount) in trim_one()
531 struct mount *n; in trim_one()
560 static void handle_locked(struct mount *m, struct list_head *to_umount) in handle_locked()
562 struct mount *cutoff = m, *p; in handle_locked()
594 static void reparent(struct mount *m) in reparent()
596 struct mount *p = m; in reparent()
623 struct mount *m, *p; in propagate_umount()
636 m = list_first_entry(&candidates,struct mount, mnt_list); in propagate_umount()
643 struct mount *over = m->overmount; in propagate_umount()