• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/

Lines Matching refs:mnt

34  * namespace_sem is held, and mnt is attached
36 static bool is_path_reachable(struct vfsmount *mnt, struct dentry *dentry,
39 while (mnt != root->mnt && mnt->mnt_parent != mnt) {
40 dentry = mnt->mnt_mountpoint;
41 mnt = mnt->mnt_parent;
43 return mnt == root->mnt && is_subdir(dentry, root->dentry);
46 static struct vfsmount *get_peer_under_root(struct vfsmount *mnt,
50 struct vfsmount *m = mnt;
58 } while (m != mnt);
69 int get_dominating_id(struct vfsmount *mnt, const struct path *root)
73 for (m = mnt->mnt_master; m != NULL; m = m->mnt_master) {
74 struct vfsmount *d = get_peer_under_root(m, mnt->mnt_ns, root);
82 static int do_make_slave(struct vfsmount *mnt)
84 struct vfsmount *peer_mnt = mnt, *master = mnt->mnt_master;
88 * slave 'mnt' to a peer mount that has the
92 while ((peer_mnt = next_peer(peer_mnt)) != mnt &&
93 peer_mnt->mnt_root != mnt->mnt_root) ;
95 if (peer_mnt == mnt) {
96 peer_mnt = next_peer(mnt);
97 if (peer_mnt == mnt)
100 if (IS_MNT_SHARED(mnt) && list_empty(&mnt->mnt_share))
101 mnt_release_group_id(mnt);
103 list_del_init(&mnt->mnt_share);
104 mnt->mnt_group_id = 0;
110 list_for_each_entry(slave_mnt, &mnt->mnt_slave_list, mnt_slave)
112 list_move(&mnt->mnt_slave, &master->mnt_slave_list);
113 list_splice(&mnt->mnt_slave_list, master->mnt_slave_list.prev);
114 INIT_LIST_HEAD(&mnt->mnt_slave_list);
116 struct list_head *p = &mnt->mnt_slave_list;
124 mnt->mnt_master = master;
125 CLEAR_MNT_SHARED(mnt);
132 void change_mnt_propagation(struct vfsmount *mnt, int type)
135 set_mnt_shared(mnt);
138 do_make_slave(mnt);
140 list_del_init(&mnt->mnt_slave);
141 mnt->mnt_master = NULL;
143 mnt->mnt_flags |= MNT_UNBINDABLE;
145 mnt->mnt_flags &= ~MNT_UNBINDABLE;
289 static inline int do_refcount_check(struct vfsmount *mnt, int count)
291 int mycount = atomic_read(&mnt->mnt_count) - mnt->mnt_ghosts;
296 * check if the mount 'mnt' can be unmounted successfully.
297 * @mnt: the mount to be checked for unmount
298 * NOTE: unmounting 'mnt' would naturally propagate to all
305 int propagate_mount_busy(struct vfsmount *mnt, int refcnt)
308 struct vfsmount *parent = mnt->mnt_parent;
311 if (mnt == parent)
312 return do_refcount_check(mnt, refcnt);
319 if (!list_empty(&mnt->mnt_mounts) || do_refcount_check(mnt, refcnt))
324 child = __lookup_mnt(m, mnt->mnt_mountpoint, 0);
333 * NOTE: unmounting 'mnt' naturally propagates to all other mounts its
336 static void __propagate_umount(struct vfsmount *mnt)
338 struct vfsmount *parent = mnt->mnt_parent;
341 BUG_ON(parent == mnt);
347 mnt->mnt_mountpoint, 0);
353 list_move_tail(&child->mnt_hash, &mnt->mnt_hash);
366 struct vfsmount *mnt;
368 list_for_each_entry(mnt, list, mnt_hash)
369 __propagate_umount(mnt);