Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
Linus Torvalds committed Jul 5, 2011
2 parents fe0d422 + 032016a commit a8728d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
out_put_hidden_dir:
iput(sbi->hidden_dir);
out_put_root:
iput(sbi->alloc_file);
iput(root);
out_put_alloc_file:
iput(sbi->alloc_file);
out_close_cat_tree:
Expand Down
7 changes: 5 additions & 2 deletions fs/hfsplus/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
{
DECLARE_COMPLETION_ONSTACK(wait);
struct bio *bio;
int ret = 0;

bio = bio_alloc(GFP_NOIO, 1);
bio->bi_sector = sector;
Expand All @@ -54,8 +55,10 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
wait_for_completion(&wait);

if (!bio_flagged(bio, BIO_UPTODATE))
return -EIO;
return 0;
ret = -EIO;

bio_put(bio);
return ret;
}

static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd)
Expand Down

0 comments on commit a8728d3

Please sign in to comment.