diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 678f7ce060f2..af2fb3707d0a 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1091,20 +1091,20 @@ Enomem: | |||
1091 | struct vfsmount *collect_mounts(struct vfsmount *mnt, struct dentry *dentry) | 1091 | struct vfsmount *collect_mounts(struct vfsmount *mnt, struct dentry *dentry) |
1092 | { | 1092 | { |
1093 | struct vfsmount *tree; | 1093 | struct vfsmount *tree; |
1094 | down_read(&namespace_sem); | 1094 | down_write(&namespace_sem); |
1095 | tree = copy_tree(mnt, dentry, CL_COPY_ALL | CL_PRIVATE); | 1095 | tree = copy_tree(mnt, dentry, CL_COPY_ALL | CL_PRIVATE); |
1096 | up_read(&namespace_sem); | 1096 | up_write(&namespace_sem); |
1097 | return tree; | 1097 | return tree; |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | void drop_collected_mounts(struct vfsmount *mnt) | 1100 | void drop_collected_mounts(struct vfsmount *mnt) |
1101 | { | 1101 | { |
1102 | LIST_HEAD(umount_list); | 1102 | LIST_HEAD(umount_list); |
1103 | down_read(&namespace_sem); | 1103 | down_write(&namespace_sem); |
1104 | spin_lock(&vfsmount_lock); | 1104 | spin_lock(&vfsmount_lock); |
1105 | umount_tree(mnt, 0, &umount_list); | 1105 | umount_tree(mnt, 0, &umount_list); |
1106 | spin_unlock(&vfsmount_lock); | 1106 | spin_unlock(&vfsmount_lock); |
1107 | up_read(&namespace_sem); | 1107 | up_write(&namespace_sem); |
1108 | release_mounts(&umount_list); | 1108 | release_mounts(&umount_list); |
1109 | } | 1109 | } |
1110 | 1110 | ||