mirror of
https://github.com/torvalds/linux.git
synced 2026-05-15 14:13:39 -04:00
mmc: block: Fix missing blk_put_request()
commit34c089e806upstream. Ensure blk_get_request() is paired with blk_put_request(). Fixes:0493f6fe5b("mmc: block: Move boot partition locking into a driver op") Fixes:627c3ccfb4("mmc: debugfs: Move block debugfs into block module") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4162b2973c
commit
0d8d2b6373
@@ -207,6 +207,7 @@ static ssize_t power_ro_lock_store(struct device *dev,
|
||||
req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_BOOT_WP;
|
||||
blk_execute_rq(mq->queue, NULL, req, 0);
|
||||
ret = req_to_mmc_queue_req(req)->drv_op_result;
|
||||
blk_put_request(req);
|
||||
|
||||
if (!ret) {
|
||||
pr_info("%s: Locking boot partition ro until next power on\n",
|
||||
@@ -2321,6 +2322,7 @@ static int mmc_dbg_card_status_get(void *data, u64 *val)
|
||||
*val = ret;
|
||||
ret = 0;
|
||||
}
|
||||
blk_put_request(req);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2351,6 +2353,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
|
||||
req_to_mmc_queue_req(req)->drv_op_data = &ext_csd;
|
||||
blk_execute_rq(mq->queue, NULL, req, 0);
|
||||
err = req_to_mmc_queue_req(req)->drv_op_result;
|
||||
blk_put_request(req);
|
||||
if (err) {
|
||||
pr_err("FAILED %d\n", err);
|
||||
goto out_free;
|
||||
|
||||
Reference in New Issue
Block a user