]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
vfs: remove some unused old mount api code
authorEric Sandeen <sandeen@redhat.com>
Wed, 5 Feb 2025 21:34:32 +0000 (15:34 -0600)
committerChristian Brauner <brauner@kernel.org>
Thu, 6 Feb 2025 10:51:43 +0000 (11:51 +0100)
Remove reconfigure_single, mount_single, and compare_single now
that no users remain.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Link: https://lore.kernel.org/r/20250205213931.74614-5-sandeen@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/super.c
include/linux/fs.h
include/linux/fs_context.h

index 5a7db4a556e37323ab89b5e9f5ec7d323c3d029d..723176dee22994025b11cf820e4f92c72d33c3e7 100644 (file)
@@ -1737,61 +1737,6 @@ struct dentry *mount_nodev(struct file_system_type *fs_type,
 }
 EXPORT_SYMBOL(mount_nodev);
 
-int reconfigure_single(struct super_block *s,
-                      int flags, void *data)
-{
-       struct fs_context *fc;
-       int ret;
-
-       /* The caller really need to be passing fc down into mount_single(),
-        * then a chunk of this can be removed.  [Bollocks -- AV]
-        * Better yet, reconfiguration shouldn't happen, but rather the second
-        * mount should be rejected if the parameters are not compatible.
-        */
-       fc = fs_context_for_reconfigure(s->s_root, flags, MS_RMT_MASK);
-       if (IS_ERR(fc))
-               return PTR_ERR(fc);
-
-       ret = parse_monolithic_mount_data(fc, data);
-       if (ret < 0)
-               goto out;
-
-       ret = reconfigure_super(fc);
-out:
-       put_fs_context(fc);
-       return ret;
-}
-
-static int compare_single(struct super_block *s, void *p)
-{
-       return 1;
-}
-
-struct dentry *mount_single(struct file_system_type *fs_type,
-       int flags, void *data,
-       int (*fill_super)(struct super_block *, void *, int))
-{
-       struct super_block *s;
-       int error;
-
-       s = sget(fs_type, compare_single, set_anon_super, flags, NULL);
-       if (IS_ERR(s))
-               return ERR_CAST(s);
-       if (!s->s_root) {
-               error = fill_super(s, data, flags & SB_SILENT ? 1 : 0);
-               if (!error)
-                       s->s_flags |= SB_ACTIVE;
-       } else {
-               error = reconfigure_single(s, flags, data);
-       }
-       if (unlikely(error)) {
-               deactivate_locked_super(s);
-               return ERR_PTR(error);
-       }
-       return dget(s->s_root);
-}
-EXPORT_SYMBOL(mount_single);
-
 /**
  * vfs_get_tree - Get the mountable root
  * @fc: The superblock configuration context.
index be3ad155ec9f74460d971f11b96445e8db579c6f..ff5e8ab9f951fc00459ec9908105b2cb48997efe 100644 (file)
@@ -2641,9 +2641,6 @@ static inline bool is_mgtime(const struct inode *inode)
 extern struct dentry *mount_bdev(struct file_system_type *fs_type,
        int flags, const char *dev_name, void *data,
        int (*fill_super)(struct super_block *, void *, int));
-extern struct dentry *mount_single(struct file_system_type *fs_type,
-       int flags, void *data,
-       int (*fill_super)(struct super_block *, void *, int));
 extern struct dentry *mount_nodev(struct file_system_type *fs_type,
        int flags, void *data,
        int (*fill_super)(struct super_block *, void *, int));
index 4b4bfef6f053a49557118c3592ef64fc7ce1ab39..a19e4bd32e4d3151a21e6d514f76fb9c4408f4fb 100644 (file)
@@ -144,8 +144,6 @@ extern void put_fs_context(struct fs_context *fc);
 extern int vfs_parse_fs_param_source(struct fs_context *fc,
                                     struct fs_parameter *param);
 extern void fc_drop_locked(struct fs_context *fc);
-int reconfigure_single(struct super_block *s,
-                      int flags, void *data);
 
 extern int get_tree_nodev(struct fs_context *fc,
                         int (*fill_super)(struct super_block *sb,