Commit 84d17192 authored by Al Viro's avatar Al Viro

get rid of full-hash scan on detaching vfsmounts

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e9c5d8a5
......@@ -18,6 +18,12 @@ struct mnt_pcp {
int mnt_writers;
};
struct mountpoint {
struct list_head m_hash;
struct dentry *m_dentry;
int m_count;
};
struct mount {
struct list_head mnt_hash;
struct mount *mnt_parent;
......@@ -40,6 +46,7 @@ struct mount {
struct list_head mnt_slave; /* slave list entry */
struct mount *mnt_master; /* slave is on master->mnt_slave_list */
struct mnt_namespace *mnt_ns; /* containing namespace */
struct mountpoint *mnt_mp; /* where is it mounted */
#ifdef CONFIG_FSNOTIFY
struct hlist_head mnt_fsnotify_marks;
__u32 mnt_fsnotify_mask;
......
This diff is collapsed.
......@@ -217,7 +217,7 @@ static struct mount *get_source(struct mount *dest,
* @source_mnt: source mount.
* @tree_list : list of heads of trees to be attached.
*/
int propagate_mnt(struct mount *dest_mnt, struct dentry *dest_dentry,
int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp,
struct mount *source_mnt, struct list_head *tree_list)
{
struct mount *m, *child;
......@@ -244,8 +244,8 @@ int propagate_mnt(struct mount *dest_mnt, struct dentry *dest_dentry,
goto out;
}
if (is_subdir(dest_dentry, m->mnt.mnt_root)) {
mnt_set_mountpoint(m, dest_dentry, child);
if (is_subdir(dest_mp->m_dentry, m->mnt.mnt_root)) {
mnt_set_mountpoint(m, dest_mp, child);
list_add_tail(&child->mnt_hash, tree_list);
} else {
/*
......
......@@ -31,14 +31,14 @@ static inline void set_mnt_shared(struct mount *mnt)
}
void change_mnt_propagation(struct mount *, int);
int propagate_mnt(struct mount *, struct dentry *, struct mount *,
int propagate_mnt(struct mount *, struct mountpoint *, struct mount *,
struct list_head *);
int propagate_umount(struct list_head *);
int propagate_mount_busy(struct mount *, int);
void mnt_release_group_id(struct mount *);
int get_dominating_id(struct mount *mnt, const struct path *root);
unsigned int mnt_get_count(struct mount *mnt);
void mnt_set_mountpoint(struct mount *, struct dentry *,
void mnt_set_mountpoint(struct mount *, struct mountpoint *,
struct mount *);
void release_mounts(struct list_head *);
void umount_tree(struct mount *, int, struct list_head *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment