tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
[linux-2.6-microblaze.git] / block / blk-flush.c
index 76c1624..7942ca6 100644 (file)
@@ -432,23 +432,18 @@ void blk_insert_flush(struct request *rq)
 /**
  * blkdev_issue_flush - queue a flush
  * @bdev:      blockdev to issue flush for
- * @gfp_mask:  memory allocation flags (for bio_alloc)
  *
  * Description:
  *    Issue a flush for the block device in question.
  */
-int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask)
+int blkdev_issue_flush(struct block_device *bdev)
 {
-       struct bio *bio;
-       int ret = 0;
+       struct bio bio;
 
-       bio = bio_alloc(gfp_mask, 0);
-       bio_set_dev(bio, bdev);
-       bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
-
-       ret = submit_bio_wait(bio);
-       bio_put(bio);
-       return ret;
+       bio_init(&bio, NULL, 0);
+       bio_set_dev(&bio, bdev);
+       bio.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
+       return submit_bio_wait(&bio);
 }
 EXPORT_SYMBOL(blkdev_issue_flush);