static struct dentry *
pfmfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "pfm:", NULL, &pfmfs_dentry_operations,
+ return mount_pseudo(fs_type, NULL, &pfmfs_dentry_operations,
PFMFS_MAGIC);
}
static struct dentry *dax_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "dax:", &dax_sops, NULL, DAXFS_MAGIC);
+ return mount_pseudo(fs_type, &dax_sops, NULL, DAXFS_MAGIC);
}
static struct file_system_type dax_fs_type = {
static struct dentry *drm_fs_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
- return mount_pseudo(fs_type,
- "drm:",
- NULL,
- NULL,
- 0x010203ff);
+ return mount_pseudo(fs_type, NULL, NULL, 0x010203ff);
}
static struct file_system_type drm_fs_type = {
static struct dentry *cxl_fs_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "cxl:", NULL, NULL,
- CXL_PSEUDO_FS_MAGIC);
+ return mount_pseudo(fs_type, NULL, NULL, CXL_PSEUDO_FS_MAGIC);
}
static struct file_system_type cxl_fs_type = {
int flags, const char *dev_name,
void *data)
{
- return mount_pseudo(fs_type, "ocxlflash:", NULL, NULL,
- OCXLFLASH_FS_MAGIC);
+ return mount_pseudo(fs_type, NULL, NULL, OCXLFLASH_FS_MAGIC);
}
static struct file_system_type ocxlflash_fs_type = {
static struct dentry *balloon_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "balloon-kvm:", NULL, NULL,
- BALLOON_KVM_MAGIC);
+ return mount_pseudo(fs_type, NULL, NULL, BALLOON_KVM_MAGIC);
}
static struct file_system_type balloon_fs = {
static struct dentry *aio_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- struct dentry *root = mount_pseudo(fs_type, "aio:", NULL, NULL,
- AIO_RING_MAGIC);
+ struct dentry *root = mount_pseudo(fs_type, NULL, NULL, AIO_RING_MAGIC);
if (!IS_ERR(root))
root->d_sb->s_iflags |= SB_I_NOEXEC;
static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "anon_inode:", NULL,
- &anon_inodefs_dentry_operations, ANON_INODE_FS_MAGIC);
+ return mount_pseudo(fs_type, NULL, &anon_inodefs_dentry_operations,
+ ANON_INODE_FS_MAGIC);
}
static struct file_system_type anon_inode_fs_type = {
int flags, const char *dev_name, void *data)
{
struct dentry *dent;
- dent = mount_pseudo(fs_type, "bdev:", &bdev_sops, NULL, BDEVFS_MAGIC);
+ dent = mount_pseudo(fs_type, &bdev_sops, NULL, BDEVFS_MAGIC);
if (!IS_ERR(dent))
dent->d_sb->s_iflags |= SB_I_CGROUPWB;
return dent;
int flags, const char *dev_name,
void *data)
{
- return mount_pseudo(fs_type, "btrfs_test:", &btrfs_test_super_ops,
+ return mount_pseudo(fs_type, &btrfs_test_super_ops,
NULL, BTRFS_TEST_MAGIC);
}
* Common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that
* will never be mountable)
*/
-struct dentry *mount_pseudo_xattr(struct file_system_type *fs_type, char *name,
+struct dentry *mount_pseudo_xattr(struct file_system_type *fs_type,
const struct super_operations *ops, const struct xattr_handler **xattr,
const struct dentry_operations *dops, unsigned long magic)
{
struct super_block *s;
- struct dentry *dentry;
struct inode *root;
- struct qstr d_name = QSTR_INIT(name, strlen(name));
s = sget_userns(fs_type, NULL, set_anon_super, SB_KERNMOUNT|SB_NOUSER,
&init_user_ns, NULL);
root->i_ino = 1;
root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
root->i_atime = root->i_mtime = root->i_ctime = current_time(root);
- dentry = __d_alloc(s, &d_name);
- if (!dentry) {
- iput(root);
+ s->s_root = d_make_root(root);
+ if (!s->s_root)
goto Enomem;
- }
- d_instantiate(dentry, root);
- s->s_root = dentry;
s->s_d_op = dops;
s->s_flags |= SB_ACTIVE;
return dget(s->s_root);
static struct dentry *nsfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "nsfs:", &nsfs_ops,
+ return mount_pseudo(fs_type, &nsfs_ops,
&ns_dentry_operations, NSFS_MAGIC);
}
static struct file_system_type nsfs = {
static struct dentry *pipefs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "pipe:", &pipefs_ops,
+ return mount_pseudo(fs_type, &pipefs_ops,
&pipefs_dentry_operations, PIPEFS_MAGIC);
}
int (*test)(struct super_block *,void *),
int (*set)(struct super_block *,void *),
int flags, void *data);
-extern struct dentry *mount_pseudo_xattr(struct file_system_type *, char *,
+extern struct dentry *mount_pseudo_xattr(struct file_system_type *,
const struct super_operations *ops,
const struct xattr_handler **xattr,
const struct dentry_operations *dops,
unsigned long);
static inline struct dentry *
-mount_pseudo(struct file_system_type *fs_type, char *name,
+mount_pseudo(struct file_system_type *fs_type,
const struct super_operations *ops,
const struct dentry_operations *dops, unsigned long magic)
{
- return mount_pseudo_xattr(fs_type, name, ops, NULL, dops, magic);
+ return mount_pseudo_xattr(fs_type, ops, NULL, dops, magic);
}
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
static struct dentry *z3fold_do_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "z3fold:", NULL, NULL, 0x33);
+ return mount_pseudo(fs_type, NULL, NULL, 0x33);
}
static struct file_system_type z3fold_fs = {
static struct dentry *zs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "zsmalloc:", NULL, NULL, ZSMALLOC_MAGIC);
+ return mount_pseudo(fs_type, NULL, NULL, ZSMALLOC_MAGIC);
}
static struct file_system_type zsmalloc_fs = {
static struct dentry *sockfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo_xattr(fs_type, "socket:", &sockfs_ops,
+ return mount_pseudo_xattr(fs_type, &sockfs_ops,
sockfs_xattr_handlers,
&sockfs_dentry_operations, SOCKFS_MAGIC);
}