Commit a8728d35 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus:
  hfsplus: Fix double iput of the same inode in hfsplus_fill_super()
  hfsplus: add missing call to bio_put()
parents fe0d4220 032016a5
...@@ -500,7 +500,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) ...@@ -500,7 +500,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
out_put_hidden_dir: out_put_hidden_dir:
iput(sbi->hidden_dir); iput(sbi->hidden_dir);
out_put_root: out_put_root:
iput(sbi->alloc_file); iput(root);
out_put_alloc_file: out_put_alloc_file:
iput(sbi->alloc_file); iput(sbi->alloc_file);
out_close_cat_tree: out_close_cat_tree:
......
...@@ -36,6 +36,7 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector, ...@@ -36,6 +36,7 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
{ {
DECLARE_COMPLETION_ONSTACK(wait); DECLARE_COMPLETION_ONSTACK(wait);
struct bio *bio; struct bio *bio;
int ret = 0;
bio = bio_alloc(GFP_NOIO, 1); bio = bio_alloc(GFP_NOIO, 1);
bio->bi_sector = sector; bio->bi_sector = sector;
...@@ -54,8 +55,10 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector, ...@@ -54,8 +55,10 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
wait_for_completion(&wait); wait_for_completion(&wait);
if (!bio_flagged(bio, BIO_UPTODATE)) if (!bio_flagged(bio, BIO_UPTODATE))
return -EIO; ret = -EIO;
return 0;
bio_put(bio);
return ret;
} }
static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd) static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment