pd: don't check blk_execute_rq return value.
The driver never sets req->errors, so blk_execute_rq will always return 0. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
committed by
Jens Axboe
parent
7c4cc30024
commit
75a500ef6e
@@ -739,18 +739,15 @@ static int pd_special_command(struct pd_unit *disk,
|
|||||||
enum action (*func)(struct pd_unit *disk))
|
enum action (*func)(struct pd_unit *disk))
|
||||||
{
|
{
|
||||||
struct request *rq;
|
struct request *rq;
|
||||||
int err = 0;
|
|
||||||
|
|
||||||
rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
|
rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
|
||||||
if (IS_ERR(rq))
|
if (IS_ERR(rq))
|
||||||
return PTR_ERR(rq);
|
return PTR_ERR(rq);
|
||||||
|
|
||||||
rq->special = func;
|
rq->special = func;
|
||||||
|
blk_execute_rq(disk->gd->queue, disk->gd, rq, 0);
|
||||||
err = blk_execute_rq(disk->gd->queue, disk->gd, rq, 0);
|
|
||||||
|
|
||||||
blk_put_request(rq);
|
blk_put_request(rq);
|
||||||
return err;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* kernel glue structures */
|
/* kernel glue structures */
|
||||||
|
|||||||
Reference in New Issue
Block a user