[Yaffs] [YAFFS 10/10] Update fs super block read callback

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Waldemar Rymarkiewicz
Date:  
To: yaffs
CC: Waldemar Rymarkiewicz, Waldemar Rymarkiewicz, manningc2
Old-Topics: [Yaffs] [YAFFS 00/10] Add support of v3.2 kernel in single flavour of yaffs
Subject: [Yaffs] [YAFFS 10/10] Update fs super block read callback
From: Waldemar Rymarkiewicz <>

Remove obsolete ->get_sb and use proper ->mount() callback

Signed-off-by: Waldemar Rymarkiewicz <>
---
yaffs_vfs_single.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/yaffs_vfs_single.c b/yaffs_vfs_single.c
index 24ab384..d8379d4 100644
--- a/yaffs_vfs_single.c
+++ b/yaffs_vfs_single.c
@@ -2296,19 +2296,18 @@ static int yaffs_internal_read_super_mtd(struct super_block *sb, void *data,
     return yaffs_internal_read_super(1, sb, data, silent) ? 0 : -EINVAL;
 }


-static int yaffs_read_super(struct file_system_type *fs,
+static struct dentry *yaffs_mount(struct file_system_type *fs,
                 int flags, const char *dev_name,
-                void *data, struct vfsmount *mnt)
+                void *data)
 {
-
-    return get_sb_bdev(fs, flags, dev_name, data,
-               yaffs_internal_read_super_mtd, mnt);
+    return mount_bdev(fs, flags, dev_name, data,
+               yaffs_internal_read_super_mtd);
 }


 static struct file_system_type yaffs_fs_type = {
     .owner = THIS_MODULE,
     .name = "yaffs",
-    .get_sb = yaffs_read_super,
+    .mount = yaffs_mount,
     .kill_sb = kill_block_super,
     .fs_flags = FS_REQUIRES_DEV,
 };
@@ -2319,18 +2318,17 @@ static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
     return yaffs_internal_read_super(2, sb, data, silent) ? 0 : -EINVAL;
 }


-static int yaffs2_read_super(struct file_system_type *fs,
-                 int flags, const char *dev_name, void *data,
-                 struct vfsmount *mnt)
+static struct dentry *yaffs2_mount(struct file_system_type *fs,
+                 int flags, const char *dev_name, void *data)
 {
-    return get_sb_bdev(fs, flags, dev_name, data,
-               yaffs2_internal_read_super_mtd, mnt);
+    return mount_bdev(fs, flags, dev_name, data,
+               yaffs2_internal_read_super_mtd);
 }


 static struct file_system_type yaffs2_fs_type = {
     .owner = THIS_MODULE,
     .name = "yaffs2",
-    .get_sb = yaffs2_read_super,
+    .mount = yaffs2_mount,
     .kill_sb = kill_block_super,
     .fs_flags = FS_REQUIRES_DEV,
 };
-- 
1.7.8