|
@@ -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;
|
|
@@ -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)
|