mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
convenience helper get_tree_nodev()
counterpart of mount_nodev(). Switch hugetlb and pseudo to it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
023d066a0d
commit
2ac295d4f0
@ -1299,7 +1299,7 @@ static int hugetlbfs_get_tree(struct fs_context *fc)
|
|||||||
int err = hugetlbfs_validate(fc);
|
int err = hugetlbfs_validate(fc);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
return vfs_get_super(fc, vfs_get_independent_super, hugetlbfs_fill_super);
|
return get_tree_nodev(fc, hugetlbfs_fill_super);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hugetlbfs_fs_context_free(struct fs_context *fc)
|
static void hugetlbfs_fs_context_free(struct fs_context *fc)
|
||||||
|
@ -270,7 +270,7 @@ static int pseudo_fs_fill_super(struct super_block *s, struct fs_context *fc)
|
|||||||
|
|
||||||
static int pseudo_fs_get_tree(struct fs_context *fc)
|
static int pseudo_fs_get_tree(struct fs_context *fc)
|
||||||
{
|
{
|
||||||
return vfs_get_super(fc, vfs_get_independent_super, pseudo_fs_fill_super);
|
return get_tree_nodev(fc, pseudo_fs_fill_super);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pseudo_fs_free(struct fs_context *fc)
|
static void pseudo_fs_free(struct fs_context *fc)
|
||||||
|
@ -1198,6 +1198,14 @@ int vfs_get_super(struct fs_context *fc,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(vfs_get_super);
|
EXPORT_SYMBOL(vfs_get_super);
|
||||||
|
|
||||||
|
int get_tree_nodev(struct fs_context *fc,
|
||||||
|
int (*fill_super)(struct super_block *sb,
|
||||||
|
struct fs_context *fc))
|
||||||
|
{
|
||||||
|
return vfs_get_super(fc, vfs_get_independent_super, fill_super);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(get_tree_nodev);
|
||||||
|
|
||||||
#ifdef CONFIG_BLOCK
|
#ifdef CONFIG_BLOCK
|
||||||
static int set_bdev_super(struct super_block *s, void *data)
|
static int set_bdev_super(struct super_block *s, void *data)
|
||||||
{
|
{
|
||||||
|
@ -151,6 +151,9 @@ extern int vfs_get_super(struct fs_context *fc,
|
|||||||
enum vfs_get_super_keying keying,
|
enum vfs_get_super_keying keying,
|
||||||
int (*fill_super)(struct super_block *sb,
|
int (*fill_super)(struct super_block *sb,
|
||||||
struct fs_context *fc));
|
struct fs_context *fc));
|
||||||
|
extern int get_tree_nodev(struct fs_context *fc,
|
||||||
|
int (*fill_super)(struct super_block *sb,
|
||||||
|
struct fs_context *fc));
|
||||||
|
|
||||||
extern const struct file_operations fscontext_fops;
|
extern const struct file_operations fscontext_fops;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user