mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
block: remove blk_init_flush() and its pair
Now mission of the two helpers is over, and just call blk_alloc_flush_queue() and blk_free_flush_queue() directly. Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
7c94e1c157
commit
ba483388e3
5 changed files with 10 additions and 23 deletions
|
|
@ -479,8 +479,7 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
|
|||
}
|
||||
EXPORT_SYMBOL(blkdev_issue_flush);
|
||||
|
||||
static struct blk_flush_queue *blk_alloc_flush_queue(
|
||||
struct request_queue *q)
|
||||
struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q)
|
||||
{
|
||||
struct blk_flush_queue *fq;
|
||||
int rq_sz = sizeof(struct request);
|
||||
|
|
@ -511,7 +510,7 @@ static struct blk_flush_queue *blk_alloc_flush_queue(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void blk_free_flush_queue(struct blk_flush_queue *fq)
|
||||
void blk_free_flush_queue(struct blk_flush_queue *fq)
|
||||
{
|
||||
/* bio based request queue hasn't flush queue */
|
||||
if (!fq)
|
||||
|
|
@ -520,17 +519,3 @@ static void blk_free_flush_queue(struct blk_flush_queue *fq)
|
|||
kfree(fq->flush_rq);
|
||||
kfree(fq);
|
||||
}
|
||||
|
||||
int blk_init_flush(struct request_queue *q)
|
||||
{
|
||||
q->fq = blk_alloc_flush_queue(q);
|
||||
if (!q->fq)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void blk_exit_flush(struct request_queue *q)
|
||||
{
|
||||
blk_free_flush_queue(q->fq);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue