diff options
Diffstat (limited to 'fs/pnode.c')
-rw-r--r-- | fs/pnode.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/pnode.c b/fs/pnode.c index 8b29d2164da6..3d2a7141b87a 100644 --- a/fs/pnode.c +++ b/fs/pnode.c | |||
@@ -218,7 +218,7 @@ static struct mount *get_source(struct mount *dest, | |||
218 | * @source_mnt: source mount. | 218 | * @source_mnt: source mount. |
219 | * @tree_list : list of heads of trees to be attached. | 219 | * @tree_list : list of heads of trees to be attached. |
220 | */ | 220 | */ |
221 | int propagate_mnt(struct mount *dest_mnt, struct dentry *dest_dentry, | 221 | int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, |
222 | struct mount *source_mnt, struct list_head *tree_list) | 222 | struct mount *source_mnt, struct list_head *tree_list) |
223 | { | 223 | { |
224 | struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns; | 224 | struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns; |
@@ -227,7 +227,6 @@ int propagate_mnt(struct mount *dest_mnt, struct dentry *dest_dentry, | |||
227 | struct mount *prev_dest_mnt = dest_mnt; | 227 | struct mount *prev_dest_mnt = dest_mnt; |
228 | struct mount *prev_src_mnt = source_mnt; | 228 | struct mount *prev_src_mnt = source_mnt; |
229 | LIST_HEAD(tmp_list); | 229 | LIST_HEAD(tmp_list); |
230 | LIST_HEAD(umount_list); | ||
231 | 230 | ||
232 | for (m = propagation_next(dest_mnt, dest_mnt); m; | 231 | for (m = propagation_next(dest_mnt, dest_mnt); m; |
233 | m = propagation_next(m, dest_mnt)) { | 232 | m = propagation_next(m, dest_mnt)) { |
@@ -250,8 +249,8 @@ int propagate_mnt(struct mount *dest_mnt, struct dentry *dest_dentry, | |||
250 | goto out; | 249 | goto out; |
251 | } | 250 | } |
252 | 251 | ||
253 | if (is_subdir(dest_dentry, m->mnt.mnt_root)) { | 252 | if (is_subdir(dest_mp->m_dentry, m->mnt.mnt_root)) { |
254 | mnt_set_mountpoint(m, dest_dentry, child); | 253 | mnt_set_mountpoint(m, dest_mp, child); |
255 | list_add_tail(&child->mnt_hash, tree_list); | 254 | list_add_tail(&child->mnt_hash, tree_list); |
256 | } else { | 255 | } else { |
257 | /* | 256 | /* |
@@ -267,10 +266,9 @@ out: | |||
267 | br_write_lock(&vfsmount_lock); | 266 | br_write_lock(&vfsmount_lock); |
268 | while (!list_empty(&tmp_list)) { | 267 | while (!list_empty(&tmp_list)) { |
269 | child = list_first_entry(&tmp_list, struct mount, mnt_hash); | 268 | child = list_first_entry(&tmp_list, struct mount, mnt_hash); |
270 | umount_tree(child, 0, &umount_list); | 269 | umount_tree(child, 0); |
271 | } | 270 | } |
272 | br_write_unlock(&vfsmount_lock); | 271 | br_write_unlock(&vfsmount_lock); |
273 | release_mounts(&umount_list); | ||
274 | return ret; | 272 | return ret; |
275 | } | 273 | } |
276 | 274 | ||