summaryrefslogtreecommitdiffstats
path: root/fs/logfs/dev_bdev.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-07-26 11:53:30 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-29 04:16:46 -0400
commit7d945a3aa7608f68dba04083d3421e0b43052660 (patch)
tree6d236bc977372f3c93cfde81e68ef46e55159eff /fs/logfs/dev_bdev.c
parent0d85c799623cb6022adb1317ed2987ab9c097c2e (diff)
downloadop-kernel-dev-7d945a3aa7608f68dba04083d3421e0b43052660.zip
op-kernel-dev-7d945a3aa7608f68dba04083d3421e0b43052660.tar.gz
logfs get_sb, part 3
take logfs_get_sb_device() calls to logfs_get_sb() itself Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/logfs/dev_bdev.c')
-rw-r--r--fs/logfs/dev_bdev.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
index a322fec..223b673 100644
--- a/fs/logfs/dev_bdev.c
+++ b/fs/logfs/dev_bdev.c
@@ -9,7 +9,6 @@
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/buffer_head.h>
-#include <linux/slab.h>
#include <linux/gfp.h>
#define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1))
@@ -321,27 +320,23 @@ static const struct logfs_device_ops bd_devops = {
.put_device = bdev_put_device,
};
-int logfs_get_sb_bdev(struct logfs_super *p,
- struct file_system_type *type, int flags,
- const char *devname, struct vfsmount *mnt)
+int logfs_get_sb_bdev(struct logfs_super *p, struct file_system_type *type,
+ const char *devname)
{
struct block_device *bdev;
bdev = open_bdev_exclusive(devname, FMODE_READ|FMODE_WRITE, type);
- if (IS_ERR(bdev)) {
- kfree(p);
+ if (IS_ERR(bdev))
return PTR_ERR(bdev);
- }
if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) {
int mtdnr = MINOR(bdev->bd_dev);
close_bdev_exclusive(bdev, FMODE_READ|FMODE_WRITE);
- return logfs_get_sb_mtd(p, type, flags, mtdnr, mnt);
+ return logfs_get_sb_mtd(p, mtdnr);
}
p->s_bdev = bdev;
p->s_mtd = NULL;
p->s_devops = &bd_devops;
-
- return logfs_get_sb_device(p, type, flags, mnt);
+ return 0;
}
OpenPOWER on IntegriCloud