Skip to content

Commit bdfa77e

Browse files
Eric Sandeenbrauner
authored andcommitted
vfs: remove some unused old mount api code
Remove reconfigure_single, mount_single, and compare_single now that no users remain. Signed-off-by: Eric Sandeen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent cb0e0a8 commit bdfa77e

File tree

3 files changed

+0
-60
lines changed

3 files changed

+0
-60
lines changed

fs/super.c

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,61 +1737,6 @@ struct dentry *mount_nodev(struct file_system_type *fs_type,
17371737
}
17381738
EXPORT_SYMBOL(mount_nodev);
17391739

1740-
int reconfigure_single(struct super_block *s,
1741-
int flags, void *data)
1742-
{
1743-
struct fs_context *fc;
1744-
int ret;
1745-
1746-
/* The caller really need to be passing fc down into mount_single(),
1747-
* then a chunk of this can be removed. [Bollocks -- AV]
1748-
* Better yet, reconfiguration shouldn't happen, but rather the second
1749-
* mount should be rejected if the parameters are not compatible.
1750-
*/
1751-
fc = fs_context_for_reconfigure(s->s_root, flags, MS_RMT_MASK);
1752-
if (IS_ERR(fc))
1753-
return PTR_ERR(fc);
1754-
1755-
ret = parse_monolithic_mount_data(fc, data);
1756-
if (ret < 0)
1757-
goto out;
1758-
1759-
ret = reconfigure_super(fc);
1760-
out:
1761-
put_fs_context(fc);
1762-
return ret;
1763-
}
1764-
1765-
static int compare_single(struct super_block *s, void *p)
1766-
{
1767-
return 1;
1768-
}
1769-
1770-
struct dentry *mount_single(struct file_system_type *fs_type,
1771-
int flags, void *data,
1772-
int (*fill_super)(struct super_block *, void *, int))
1773-
{
1774-
struct super_block *s;
1775-
int error;
1776-
1777-
s = sget(fs_type, compare_single, set_anon_super, flags, NULL);
1778-
if (IS_ERR(s))
1779-
return ERR_CAST(s);
1780-
if (!s->s_root) {
1781-
error = fill_super(s, data, flags & SB_SILENT ? 1 : 0);
1782-
if (!error)
1783-
s->s_flags |= SB_ACTIVE;
1784-
} else {
1785-
error = reconfigure_single(s, flags, data);
1786-
}
1787-
if (unlikely(error)) {
1788-
deactivate_locked_super(s);
1789-
return ERR_PTR(error);
1790-
}
1791-
return dget(s->s_root);
1792-
}
1793-
EXPORT_SYMBOL(mount_single);
1794-
17951740
/**
17961741
* vfs_get_tree - Get the mountable root
17971742
* @fc: The superblock configuration context.

include/linux/fs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2641,9 +2641,6 @@ static inline bool is_mgtime(const struct inode *inode)
26412641
extern struct dentry *mount_bdev(struct file_system_type *fs_type,
26422642
int flags, const char *dev_name, void *data,
26432643
int (*fill_super)(struct super_block *, void *, int));
2644-
extern struct dentry *mount_single(struct file_system_type *fs_type,
2645-
int flags, void *data,
2646-
int (*fill_super)(struct super_block *, void *, int));
26472644
extern struct dentry *mount_nodev(struct file_system_type *fs_type,
26482645
int flags, void *data,
26492646
int (*fill_super)(struct super_block *, void *, int));

include/linux/fs_context.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ extern void put_fs_context(struct fs_context *fc);
144144
extern int vfs_parse_fs_param_source(struct fs_context *fc,
145145
struct fs_parameter *param);
146146
extern void fc_drop_locked(struct fs_context *fc);
147-
int reconfigure_single(struct super_block *s,
148-
int flags, void *data);
149147

150148
extern int get_tree_nodev(struct fs_context *fc,
151149
int (*fill_super)(struct super_block *sb,

0 commit comments

Comments
 (0)