diff options
Diffstat (limited to 'fs/logfs/dev_mtd.c')
-rw-r--r-- | fs/logfs/dev_mtd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c index a85d47d13e4b..339e17e9133d 100644 --- a/fs/logfs/dev_mtd.c +++ b/fs/logfs/dev_mtd.c | |||
@@ -60,7 +60,7 @@ static int mtd_write(struct super_block *sb, loff_t ofs, size_t len, void *buf) | |||
60 | * asynchronous properties. So just to prevent the first implementor of such | 60 | * asynchronous properties. So just to prevent the first implementor of such |
61 | * a thing from breaking logfs in 2350, we do the usual pointless dance to | 61 | * a thing from breaking logfs in 2350, we do the usual pointless dance to |
62 | * declare a completion variable and wait for completion before returning | 62 | * declare a completion variable and wait for completion before returning |
63 | * from mtd_erase(). What an excercise in futility! | 63 | * from mtd_erase(). What an exercise in futility! |
64 | */ | 64 | */ |
65 | static void logfs_erase_callback(struct erase_info *ei) | 65 | static void logfs_erase_callback(struct erase_info *ei) |
66 | { | 66 | { |
@@ -230,9 +230,9 @@ static void mtd_writeseg(struct super_block *sb, u64 ofs, size_t len) | |||
230 | __mtd_writeseg(sb, ofs, ofs >> PAGE_SHIFT, len >> PAGE_SHIFT); | 230 | __mtd_writeseg(sb, ofs, ofs >> PAGE_SHIFT, len >> PAGE_SHIFT); |
231 | } | 231 | } |
232 | 232 | ||
233 | static void mtd_put_device(struct super_block *sb) | 233 | static void mtd_put_device(struct logfs_super *s) |
234 | { | 234 | { |
235 | put_mtd_device(logfs_super(sb)->s_mtd); | 235 | put_mtd_device(s->s_mtd); |
236 | } | 236 | } |
237 | 237 | ||
238 | static int mtd_can_write_buf(struct super_block *sb, u64 ofs) | 238 | static int mtd_can_write_buf(struct super_block *sb, u64 ofs) |
@@ -265,14 +265,14 @@ static const struct logfs_device_ops mtd_devops = { | |||
265 | .put_device = mtd_put_device, | 265 | .put_device = mtd_put_device, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | int logfs_get_sb_mtd(struct file_system_type *type, int flags, | 268 | int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr) |
269 | int mtdnr, struct vfsmount *mnt) | ||
270 | { | 269 | { |
271 | struct mtd_info *mtd; | 270 | struct mtd_info *mtd = get_mtd_device(NULL, mtdnr); |
272 | const struct logfs_device_ops *devops = &mtd_devops; | ||
273 | |||
274 | mtd = get_mtd_device(NULL, mtdnr); | ||
275 | if (IS_ERR(mtd)) | 271 | if (IS_ERR(mtd)) |
276 | return PTR_ERR(mtd); | 272 | return PTR_ERR(mtd); |
277 | return logfs_get_sb_device(type, flags, mtd, NULL, devops, mnt); | 273 | |
274 | s->s_bdev = NULL; | ||
275 | s->s_mtd = mtd; | ||
276 | s->s_devops = &mtd_devops; | ||
277 | return 0; | ||
278 | } | 278 | } |