From patchwork Fri Jan 25 01:50:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10780345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AFFD91E for ; Fri, 25 Jan 2019 01:44:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CC4D2A9F7 for ; Fri, 25 Jan 2019 01:44:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D7D72EBC0; Fri, 25 Jan 2019 01:44:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C88592A9F7 for ; Fri, 25 Jan 2019 01:44:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728265AbfAYBol (ORCPT ); Thu, 24 Jan 2019 20:44:41 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2748 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727983AbfAYBol (ORCPT ); Thu, 24 Jan 2019 20:44:41 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 68B7E8303B2C5798143E; Fri, 25 Jan 2019 09:44:39 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.408.0; Fri, 25 Jan 2019 09:44:30 +0800 From: YueHaibing To: Chris Mason , Josef Bacik , David Sterba , Qu Wenruo CC: YueHaibing , , Subject: [PATCH -next] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR Date: Fri, 25 Jan 2019 01:50:09 +0000 Message-ID: <1548381009-80383-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the call to PTR_ERR to access the value just tested by IS_ERR. Fixes: 2b35a512e9cf ("btrfs: qgroup: Use delayed subtree rescan for balance") Signed-off-by: YueHaibing --- fs/btrfs/qgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 8559ed9..16d7ec8 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -3931,7 +3931,7 @@ int btrfs_qgroup_trace_subtree_after_cow(struct btrfs_trans_handle *trans, block->reloc_generation, block->level, &block->first_key); if (IS_ERR(reloc_eb)) { - ret = PTR_ERR(subv_eb); + ret = PTR_ERR(reloc_eb); reloc_eb = NULL; goto free_out; }