diff options
-rw-r--r-- | fs/logfs/dev_bdev.c | 6 | ||||
-rw-r--r-- | fs/logfs/dev_mtd.c | 11 | ||||
-rw-r--r-- | fs/logfs/logfs.h | 3 | ||||
-rw-r--r-- | fs/logfs/super.c | 7 |
4 files changed, 13 insertions, 14 deletions
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index bca8e2a8e55b..a322fec10173 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c | |||
@@ -339,5 +339,9 @@ int logfs_get_sb_bdev(struct logfs_super *p, | |||
339 | return logfs_get_sb_mtd(p, type, flags, mtdnr, mnt); | 339 | return logfs_get_sb_mtd(p, type, flags, mtdnr, mnt); |
340 | } | 340 | } |
341 | 341 | ||
342 | return logfs_get_sb_device(p, type, flags, NULL, bdev, &bd_devops, mnt); | 342 | p->s_bdev = bdev; |
343 | p->s_mtd = NULL; | ||
344 | p->s_devops = &bd_devops; | ||
345 | |||
346 | return logfs_get_sb_device(p, type, flags, mnt); | ||
343 | } | 347 | } |
diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c index e886cdcf9d7e..7b22d57d1469 100644 --- a/fs/logfs/dev_mtd.c +++ b/fs/logfs/dev_mtd.c | |||
@@ -269,13 +269,14 @@ int logfs_get_sb_mtd(struct logfs_super *s, | |||
269 | struct file_system_type *type, int flags, | 269 | struct file_system_type *type, int flags, |
270 | int mtdnr, struct vfsmount *mnt) | 270 | int mtdnr, struct vfsmount *mnt) |
271 | { | 271 | { |
272 | struct mtd_info *mtd; | 272 | struct mtd_info *mtd = get_mtd_device(NULL, mtdnr); |
273 | const struct logfs_device_ops *devops = &mtd_devops; | ||
274 | |||
275 | mtd = get_mtd_device(NULL, mtdnr); | ||
276 | if (IS_ERR(mtd)) { | 273 | if (IS_ERR(mtd)) { |
277 | kfree(s); | 274 | kfree(s); |
278 | return PTR_ERR(mtd); | 275 | return PTR_ERR(mtd); |
279 | } | 276 | } |
280 | return logfs_get_sb_device(s, type, flags, mtd, NULL, devops, mnt); | 277 | |
278 | s->s_bdev = NULL; | ||
279 | s->s_mtd = mtd; | ||
280 | s->s_devops = &mtd_devops; | ||
281 | return logfs_get_sb_device(s, type, flags, mnt); | ||
281 | } | 282 | } |
diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h index a3f0aba9e526..bdd56fa4b084 100644 --- a/fs/logfs/logfs.h +++ b/fs/logfs/logfs.h | |||
@@ -627,8 +627,7 @@ void *memchr_inv(const void *s, int c, size_t n); | |||
627 | int logfs_statfs(struct dentry *dentry, struct kstatfs *stats); | 627 | int logfs_statfs(struct dentry *dentry, struct kstatfs *stats); |
628 | int logfs_get_sb_device(struct logfs_super *s, | 628 | int logfs_get_sb_device(struct logfs_super *s, |
629 | struct file_system_type *type, int flags, | 629 | struct file_system_type *type, int flags, |
630 | struct mtd_info *mtd, struct block_device *bdev, | 630 | struct vfsmount *mnt); |
631 | const struct logfs_device_ops *devops, struct vfsmount *mnt); | ||
632 | int logfs_check_ds(struct logfs_disk_super *ds); | 631 | int logfs_check_ds(struct logfs_disk_super *ds); |
633 | int logfs_write_sb(struct super_block *sb); | 632 | int logfs_write_sb(struct super_block *sb); |
634 | 633 | ||
diff --git a/fs/logfs/super.c b/fs/logfs/super.c index 5e43178add98..c80837e54bb3 100644 --- a/fs/logfs/super.c +++ b/fs/logfs/super.c | |||
@@ -538,8 +538,7 @@ static void logfs_kill_sb(struct super_block *sb) | |||
538 | 538 | ||
539 | int logfs_get_sb_device(struct logfs_super *super, | 539 | int logfs_get_sb_device(struct logfs_super *super, |
540 | struct file_system_type *type, int flags, | 540 | struct file_system_type *type, int flags, |
541 | struct mtd_info *mtd, struct block_device *bdev, | 541 | struct vfsmount *mnt) |
542 | const struct logfs_device_ops *devops, struct vfsmount *mnt) | ||
543 | { | 542 | { |
544 | struct super_block *sb; | 543 | struct super_block *sb; |
545 | int err = -ENOMEM; | 544 | int err = -ENOMEM; |
@@ -547,8 +546,6 @@ int logfs_get_sb_device(struct logfs_super *super, | |||
547 | 546 | ||
548 | log_super("LogFS: Start mount %x\n", mount_count++); | 547 | log_super("LogFS: Start mount %x\n", mount_count++); |
549 | 548 | ||
550 | super->s_mtd = mtd; | ||
551 | super->s_bdev = bdev; | ||
552 | err = -EINVAL; | 549 | err = -EINVAL; |
553 | sb = sget(type, logfs_sb_test, logfs_sb_set, super); | 550 | sb = sget(type, logfs_sb_test, logfs_sb_set, super); |
554 | if (IS_ERR(sb)) | 551 | if (IS_ERR(sb)) |
@@ -561,8 +558,6 @@ int logfs_get_sb_device(struct logfs_super *super, | |||
561 | goto err0; | 558 | goto err0; |
562 | } | 559 | } |
563 | 560 | ||
564 | super->s_devops = devops; | ||
565 | |||
566 | /* | 561 | /* |
567 | * sb->s_maxbytes is limited to 8TB. On 32bit systems, the page cache | 562 | * sb->s_maxbytes is limited to 8TB. On 32bit systems, the page cache |
568 | * only covers 16TB and the upper 8TB are used for indirect blocks. | 563 | * only covers 16TB and the upper 8TB are used for indirect blocks. |