From patchwork Wed Dec 2 11:25:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwei Tao X-Patchwork-Id: 7745151 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4D6F1BEEE1 for ; Wed, 2 Dec 2015 11:27:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 897772061E for ; Wed, 2 Dec 2015 11:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1B072061A for ; Wed, 2 Dec 2015 11:27:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757915AbbLBL1g (ORCPT ); Wed, 2 Dec 2015 06:27:36 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34104 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754358AbbLBL1a (ORCPT ); Wed, 2 Dec 2015 06:27:30 -0500 Received: by padhx2 with SMTP id hx2so38578940pad.1; Wed, 02 Dec 2015 03:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=LcyUv0eLNPiw5JBwKdFymWHYY0dizu69MvFHsoK2Dew=; b=bXAvJrxpn8RupWQmHotADIedgP1AlkvROwEJTIIQ8nbFyBi9U/B+afGGAEmzLzXqum q7EDUSkzGhXH8ZbCvHilcBnqPr7DzeJPDNHLa1Ql0RSPokeahaH9AMSwVAV5TSlQGi3S FihRbLS0gUtpqPz0l61NI5SXrCvCouIvTvJ/sevhiHwaCoZDBVupYRjdmyl5Hty8dWiL fNbnAbGNxwIOT/ludY6DFJQp6UCOQhD23wqGjISkktJFaxxVlshdbNW7/iMdRBNvQrfu qxb4aZPpXtkOtK/29Km8KL123hA2V8tVCOoTLugwEfpym2juYBvLTdwQyIrVNw1SVcV4 cFLA== X-Received: by 10.66.136.40 with SMTP id px8mr3816553pab.75.1449055649707; Wed, 02 Dec 2015 03:27:29 -0800 (PST) Received: from localhost.localdomain.com ([111.204.49.2]) by smtp.gmail.com with ESMTPSA id cc16sm3796879pac.44.2015.12.02.03.27.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Dec 2015 03:27:29 -0800 (PST) From: Wenwei Tao To: mb@lightnvm.io Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH] lightnvm: use flags as input parameter Date: Wed, 2 Dec 2015 19:25:43 +0800 Message-Id: <1449055543-3736-1-git-send-email-ww.tao0320@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;