diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-26 03:53:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:46 -0400 |
commit | 7d945a3aa7608f68dba04083d3421e0b43052660 (patch) | |
tree | 6d236bc977372f3c93cfde81e68ef46e55159eff /fs/logfs/dev_bdev.c | |
parent | 0d85c799623cb6022adb1317ed2987ab9c097c2e (diff) |
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.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index a322fec10173..223b673dcc7b 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/bio.h> | 9 | #include <linux/bio.h> |
10 | #include <linux/blkdev.h> | 10 | #include <linux/blkdev.h> |
11 | #include <linux/buffer_head.h> | 11 | #include <linux/buffer_head.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/gfp.h> | 12 | #include <linux/gfp.h> |
14 | 13 | ||
15 | #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) | 14 | #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) |
@@ -321,27 +320,23 @@ static const struct logfs_device_ops bd_devops = { | |||
321 | .put_device = bdev_put_device, | 320 | .put_device = bdev_put_device, |
322 | }; | 321 | }; |
323 | 322 | ||
324 | int logfs_get_sb_bdev(struct logfs_super *p, | 323 | int logfs_get_sb_bdev(struct logfs_super *p, struct file_system_type *type, |
325 | struct file_system_type *type, int flags, | 324 | const char *devname) |
326 | const char *devname, struct vfsmount *mnt) | ||
327 | { | 325 | { |
328 | struct block_device *bdev; | 326 | struct block_device *bdev; |
329 | 327 | ||
330 | bdev = open_bdev_exclusive(devname, FMODE_READ|FMODE_WRITE, type); | 328 | bdev = open_bdev_exclusive(devname, FMODE_READ|FMODE_WRITE, type); |
331 | if (IS_ERR(bdev)) { | 329 | if (IS_ERR(bdev)) |
332 | kfree(p); | ||
333 | return PTR_ERR(bdev); | 330 | return PTR_ERR(bdev); |
334 | } | ||
335 | 331 | ||
336 | if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) { | 332 | if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) { |
337 | int mtdnr = MINOR(bdev->bd_dev); | 333 | int mtdnr = MINOR(bdev->bd_dev); |
338 | close_bdev_exclusive(bdev, FMODE_READ|FMODE_WRITE); | 334 | close_bdev_exclusive(bdev, FMODE_READ|FMODE_WRITE); |
339 | return logfs_get_sb_mtd(p, type, flags, mtdnr, mnt); | 335 | return logfs_get_sb_mtd(p, mtdnr); |
340 | } | 336 | } |
341 | 337 | ||
342 | p->s_bdev = bdev; | 338 | p->s_bdev = bdev; |
343 | p->s_mtd = NULL; | 339 | p->s_mtd = NULL; |
344 | p->s_devops = &bd_devops; | 340 | p->s_devops = &bd_devops; |
345 | 341 | return 0; | |
346 | return logfs_get_sb_device(p, type, flags, mnt); | ||
347 | } | 342 | } |