[<prev] [next>] [day] [month] [year] [list]
Message-ID: <155257987238.13720.10312346738261438810.stgit@warthog.procyon.org.uk>
Date: Thu, 14 Mar 2019 16:11:12 +0000
From: David Howells <dhowells@...hat.com>
To: viro@...iv.linux.org.uk
Cc: linux-fsdevel@...r.kernel.org, dhowells@...hat.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 17/38] vfs: Kill off mount_pseudo() and mount_pseudo_xattr()
Kill off mount_pseudo() and mount_pseudo_xattr() as they're replaced with
vfs_init_pseudo_fs_context().
Signed-off-by: David Howells <dhowells@...hat.com>
cc: linux-fsdevel@...r.kernel.org
---
fs/libfs.c | 53 ----------------------------------------------------
include/linux/fs.h | 13 -------------
2 files changed, 66 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs.c
index ceaf69c885c2..9a15590b65da 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -326,59 +326,6 @@ int vfs_init_pseudo_fs_context(struct fs_context *fc,
}
EXPORT_SYMBOL(vfs_init_pseudo_fs_context);
-/*
- * 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,
- 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);
- if (IS_ERR(s))
- return ERR_CAST(s);
-
- s->s_maxbytes = MAX_LFS_FILESIZE;
- s->s_blocksize = PAGE_SIZE;
- s->s_blocksize_bits = PAGE_SHIFT;
- s->s_magic = magic;
- s->s_op = ops ? ops : &simple_super_operations;
- s->s_xattr = xattr;
- s->s_time_gran = 1;
- root = new_inode(s);
- if (!root)
- goto Enomem;
- /*
- * since this is the first inode, make it number 1. New inodes created
- * after this must take care not to collide with it (by passing
- * max_reserved of 1 to iunique).
- */
- 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);
- 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);
-
-Enomem:
- deactivate_locked_super(s);
- return ERR_PTR(-ENOMEM);
-}
-EXPORT_SYMBOL(mount_pseudo_xattr);
-
int simple_open(struct inode *inode, struct file *file)
{
if (inode->i_private)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8b42df09b04c..b738e8e5b096 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2245,19 +2245,6 @@ struct super_block *sget(struct file_system_type *type,
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 *,
- 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,
- const struct super_operations *ops,
- const struct dentry_operations *dops, unsigned long magic)
-{
- return mount_pseudo_xattr(fs_type, name, ops, NULL, dops, magic);
-}
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
#define fops_get(fops) \
Powered by blists - more mailing lists