/* Initializing function */
-struct super_block *autofs_read_super(struct super_block *, void *,int);
+int autofs_fill_super(struct super_block *, void *, int);
/* Queue management functions */
#include <linux/init.h>
#include "autofs_i.h"
-static DECLARE_FSTYPE(autofs_fs_type, "autofs", autofs_read_super, 0);
+static struct super_block *autofs_get_sb(struct file_system_type *fs_type,
+ int flags, char *dev_name, void *data)
+{
+ return get_sb_nodev(fs_type, flags, data, autofs_fill_super);
+}
+
+static struct file_system_type autofs_fs_type = {
+ owner: THIS_MODULE,
+ name: "autofs",
+ get_sb: autofs_get_sb,
+};
static int __init init_autofs_fs(void)
{
return (*pipefd < 0);
}
-struct super_block *autofs_read_super(struct super_block *s, void *data,
- int silent)
+int autofs_fill_super(struct super_block *s, void *data, int silent)
{
struct inode * root_inode;
struct dentry * root;
* Success! Install the root dentry now to indicate completion.
*/
s->s_root = root;
- return s;
+ return 0;
fail_fput:
printk("autofs: pipe file descriptor does not contain proper ops\n");
fail_free:
kfree(sbi);
fail_unlock:
- return NULL;
+ return -EINVAL;
}
static int autofs_statfs(struct super_block *sb, struct statfs *buf)