History

vfs: Kill mount_ns()

Kill mount_ns() as it has been replaced by vfs_get_super() in the new mount API.

David Howells committed 7 years ago

Commit bb7b6b21 parent 96a374a2 files · +0 −41Browse files

Unified · Split

2 files
  1. fs/super.c +0 −38
  2. include/linux/fs.h +0 −3
fs/super.c+0−38
@@ -1143,44 +1143,6 @@ void kill_litter_super(struct super_block *sb) · 1142 unmodified lines
11431143 }
11441144 EXPORT_SYMBOL(kill_litter_super);
11451145
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−
11841146 int set_anon_super_fc(struct super_block *sb, struct fs_context *fc)
11851147 {
11861148 return set_anon_super(sb, NULL);
include/linux/fs.h+0−3
@@ -2206,9 +2206,6 @@ struct file_system_type { · 2205 unmodified lines
22062206
22072207 #define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-" NAME)
22082208
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));
22122209 #ifdef CONFIG_BLOCK
22132210 extern struct dentry *mount_bdev(struct file_system_type *fs_type,
22142211 int flags, const char *dev_name, void *data,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t