diff mbox

lightnvm: use flags as input parameter

Message ID 1449055543-3736-1-git-send-email-ww.tao0320@gmail.com
State New, archived
Headers show

Commit Message

Wenwei Tao Dec. 2, 2015, 11:25 a.m. UTC
rrpc_get_blk use constant 0 as the input parameter
of nvm_get_blk, this may result in getting gc block
failed unexpectedly.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
---
 drivers/lightnvm/rrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matias Bjørling Dec. 2, 2015, 11:35 a.m. UTC | #1
On 12/02/2015 12:25 PM, Wenwei Tao wrote:
> rrpc_get_blk use constant 0 as the input parameter
> of nvm_get_blk, this may result in getting gc block
> failed unexpectedly.
>
> Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
> ---
>   drivers/lightnvm/rrpc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index 75e59c3..d606c7a 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -182,7 +182,7 @@ static struct rrpc_block *rrpc_get_blk(struct rrpc *rrpc, struct rrpc_lun *rlun,
>   	struct nvm_block *blk;
>   	struct rrpc_block *rblk;
>
> -	blk = nvm_get_blk(rrpc->dev, rlun->parent, 0);
> +	blk = nvm_get_blk(rrpc->dev, rlun->parent, flags);
>   	if (!blk)
>   		return NULL;
>
>

Thanks Tao, applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index 75e59c3..d606c7a 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -182,7 +182,7 @@  static struct rrpc_block *rrpc_get_blk(struct rrpc *rrpc, struct rrpc_lun *rlun,
 	struct nvm_block *blk;
 	struct rrpc_block *rblk;
 
-	blk = nvm_get_blk(rrpc->dev, rlun->parent, 0);
+	blk = nvm_get_blk(rrpc->dev, rlun->parent, flags);
 	if (!blk)
 		return NULL;