diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-26 11:25:05 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:41 -0400 |
commit | 71a1c0125f132b2a4656689ca585c5d8931e539c (patch) | |
tree | 5c33185d3b7b00d1e23e1725b70b5ef14795f5fc /fs/logfs/dev_mtd.c | |
parent | d2d1ea93069bd7706206b9c124e438ab2795612c (diff) |
logfs get_sb massage, part 1
move allocation of logfs_super to logfs_get_sb, pass it to
logfs_get_sb_...().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/logfs/dev_mtd.c')
-rw-r--r-- | fs/logfs/dev_mtd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c index a85d47d13e4..e886cdcf9d7 100644 --- a/fs/logfs/dev_mtd.c +++ b/fs/logfs/dev_mtd.c @@ -265,14 +265,17 @@ static const struct logfs_device_ops mtd_devops = { .put_device = mtd_put_device, }; -int logfs_get_sb_mtd(struct file_system_type *type, int flags, +int logfs_get_sb_mtd(struct logfs_super *s, + struct file_system_type *type, int flags, int mtdnr, struct vfsmount *mnt) { struct mtd_info *mtd; const struct logfs_device_ops *devops = &mtd_devops; mtd = get_mtd_device(NULL, mtdnr); - if (IS_ERR(mtd)) + if (IS_ERR(mtd)) { + kfree(s); return PTR_ERR(mtd); - return logfs_get_sb_device(type, flags, mtd, NULL, devops, mnt); + } + return logfs_get_sb_device(s, type, flags, mtd, NULL, devops, mnt); } |