summaryrefslogtreecommitdiff
path: root/fs/driverfs
diff options
context:
space:
mode:
authorAlexander Viro <viro@math.psu.edu>2002-02-06 06:08:22 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-06 06:08:22 -0800
commit6709a3288b112923fa73a2174db28bedef14dd33 (patch)
tree1fe72f64c2358ac5a9ee7f0094b9b3c9d740018b /fs/driverfs
parentf0e23d833e5a5b901680bfa8d1151ea33a410955 (diff)
[PATCH] (4/6) more ->get_sb() stuff
driverfs converted.
Diffstat (limited to 'fs/driverfs')
-rw-r--r--fs/driverfs/inode.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/fs/driverfs/inode.c b/fs/driverfs/inode.c
index e5c6de322190..54e35bce866d 100644
--- a/fs/driverfs/inode.c
+++ b/fs/driverfs/inode.c
@@ -449,8 +449,7 @@ static struct super_operations driverfs_ops = {
put_inode: force_delete,
};
-static struct super_block*
-driverfs_read_super(struct super_block *sb, void *data, int silent)
+static int driverfs_fill_super(struct super_block *sb, void *data, int silent)
{
struct inode *inode;
struct dentry *root;
@@ -463,20 +462,31 @@ driverfs_read_super(struct super_block *sb, void *data, int silent)
if (!inode) {
DBG("%s: could not get inode!\n",__FUNCTION__);
- return NULL;
+ return -ENOMEM;
}
root = d_alloc_root(inode);
if (!root) {
DBG("%s: could not get root dentry!\n",__FUNCTION__);
iput(inode);
- return NULL;
+ return -ENOMEM;
}
sb->s_root = root;
- return sb;
+ return 0;
}
-static DECLARE_FSTYPE(driverfs_fs_type, "driverfs", driverfs_read_super, FS_SINGLE | FS_LITTER);
+static struct super_block *driverfs_get_sb(struct file_system_type *fs_type,
+ int flags, char *dev_name, void *data)
+{
+ return get_sb_single(fs_type, flags, data, driverfs_fill_super);
+}
+
+static struct file_system_type driverfs_fs_type = {
+ owner: THIS_MODULE,
+ name: "driverfs",
+ get_sb: driverfs_get_sb,
+ fs_flags: FS_LITTER,
+};
static int get_mount(void)
{