aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/dev_mtd.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-07-26 03:25:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-29 04:16:41 -0400
commit71a1c0125f132b2a4656689ca585c5d8931e539c (patch)
tree5c33185d3b7b00d1e23e1725b70b5ef14795f5fc /fs/logfs/dev_mtd.c
parentd2d1ea93069bd7706206b9c124e438ab2795612c (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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c
index a85d47d13e4b..e886cdcf9d7e 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 = {
265 .put_device = mtd_put_device, 265 .put_device = mtd_put_device,
266}; 266};
267 267
268int logfs_get_sb_mtd(struct file_system_type *type, int flags, 268int logfs_get_sb_mtd(struct logfs_super *s,
269 struct file_system_type *type, int flags,
269 int mtdnr, struct vfsmount *mnt) 270 int mtdnr, struct vfsmount *mnt)
270{ 271{
271 struct mtd_info *mtd; 272 struct mtd_info *mtd;
272 const struct logfs_device_ops *devops = &mtd_devops; 273 const struct logfs_device_ops *devops = &mtd_devops;
273 274
274 mtd = get_mtd_device(NULL, mtdnr); 275 mtd = get_mtd_device(NULL, mtdnr);
275 if (IS_ERR(mtd)) 276 if (IS_ERR(mtd)) {
277 kfree(s);
276 return PTR_ERR(mtd); 278 return PTR_ERR(mtd);
277 return logfs_get_sb_device(type, flags, mtd, NULL, devops, mnt); 279 }
280 return logfs_get_sb_device(s, type, flags, mtd, NULL, devops, mnt);
278} 281}