Kill mount_ns() as it has been replaced by vfs_get_super() in the new mount API.
Unified · Split
| @@ -1143,44 +1143,6 @@ void kill_litter_super(struct super_block *sb) · 1142 unmodified lines | ||
| 1143 | 1143 | } |
| 1144 | 1144 | EXPORT_SYMBOL(kill_litter_super); |
| 1145 | 1145 | |
| 1146 | −static int ns_test_super(struct super_block *sb, void *data) | |
| 1147 | −{ | |
| 1148 | − return sb->s_fs_info == data; | |
| 1149 | −} | |
| 1150 | − | |
| 1151 | −static int ns_set_super(struct super_block *sb, void *data) | |
| 1152 | −{ | |
| 1153 | − sb->s_fs_info = data; | |
| 1154 | − return set_anon_super(sb, NULL); | |
| 1155 | −} | |
| 1156 | − | |
| 1157 | −struct dentry *mount_ns(struct file_system_type *fs_type, | |
| 1158 | − int flags, void *data, void *ns, struct user_namespace *user_ns, | |
| 1159 | − int (*fill_super)(struct super_block *, void *, int)) | |
| 1160 | −{ | |
| 1161 | − struct super_block *sb; | |
| 1162 | − | |
| 1163 | − sb = sget_userns(fs_type, ns_test_super, ns_set_super, flags, | |
| 1164 | − user_ns, ns); | |
| 1165 | − if (IS_ERR(sb)) | |
| 1166 | − return ERR_CAST(sb); | |
| 1167 | − | |
| 1168 | − if (!sb->s_root) { | |
| 1169 | − int err; | |
| 1170 | − err = fill_super(sb, data, flags & SB_SILENT ? 1 : 0); | |
| 1171 | − if (err) { | |
| 1172 | − deactivate_locked_super(sb); | |
| 1173 | − return ERR_PTR(err); | |
| 1174 | − } | |
| 1175 | − | |
| 1176 | − sb->s_flags |= SB_ACTIVE; | |
| 1177 | − } | |
| 1178 | − | |
| 1179 | − return dget(sb->s_root); | |
| 1180 | −} | |
| 1181 | − | |
| 1182 | −EXPORT_SYMBOL(mount_ns); | |
| 1183 | − | |
| 1184 | 1146 | int set_anon_super_fc(struct super_block *sb, struct fs_context *fc) |
| 1185 | 1147 | { |
| 1186 | 1148 | return set_anon_super(sb, NULL); |
| @@ -2206,9 +2206,6 @@ struct file_system_type { · 2205 unmodified lines | ||
| 2206 | 2206 | |
| 2207 | 2207 | #define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-" NAME) |
| 2208 | 2208 | |
| 2209 | −extern struct dentry *mount_ns(struct file_system_type *fs_type, | |
| 2210 | − int flags, void *data, void *ns, struct user_namespace *user_ns, | |
| 2211 | − int (*fill_super)(struct super_block *, void *, int)); | |
| 2212 | 2209 | #ifdef CONFIG_BLOCK |
| 2213 | 2210 | extern struct dentry *mount_bdev(struct file_system_type *fs_type, |
| 2214 | 2211 | int flags, const char *dev_name, void *data, |