From patchwork Thu Nov 17 05:01:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsutomu Itoh X-Patchwork-Id: 9433509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E067A6021C for ; Thu, 17 Nov 2016 05:01:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C440729267 for ; Thu, 17 Nov 2016 05:01:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B67362926E; Thu, 17 Nov 2016 05:01:57 +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=-6.9 required=2.0 tests=BAYES_00,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 3EE4229267 for ; Thu, 17 Nov 2016 05:01:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750813AbcKQFBx (ORCPT ); Thu, 17 Nov 2016 00:01:53 -0500 Received: from mgwym03.jp.fujitsu.com ([211.128.242.42]:50478 "EHLO mgwym03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbcKQFBx (ORCPT ); Thu, 17 Nov 2016 00:01:53 -0500 Received: from yt-mxoi2.gw.nic.fujitsu.com (unknown [192.168.229.69]) by mgwym03.jp.fujitsu.com with smtp id 01b1_2b83_53699d01_aa1f_4d09_9a6f_d962804a7697; Thu, 17 Nov 2016 14:01:49 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by yt-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id 0DC17AC01DC for ; Thu, 17 Nov 2016 14:01:48 +0900 (JST) Received: from WIN-5MHF4RKU941.jp.fujitsu.com (unknown [10.124.102.163]) by m3051.s.css.fujitsu.com (Postfix) with SMTP id F1285655 for ; Thu, 17 Nov 2016 14:01:47 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.3.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20150223 X-SHieldMailCheckerMailID: 84047b136d3a4398806cfeda522a8ab9 Message-Id: <201611170501.AA00016@WIN-5MHF4RKU941.jp.fujitsu.com> From: Tsutomu Itoh Date: Thu, 17 Nov 2016 14:01:31 +0900 To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: qgroup: fix error in ASSERT condition expression MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 X-TM-AS-MML: disable 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 Option -f, -F and --sort don't work because a conditional expression of ASSERT is wrong. Signed-off-by: Tsutomu Itoh --- qgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qgroup.c b/qgroup.c index 9d10cb8..071d15e 100644 --- a/qgroup.c +++ b/qgroup.c @@ -480,7 +480,7 @@ int btrfs_qgroup_setup_comparer(struct btrfs_qgroup_comparer_set **comp_set, *comp_set = set; } - ASSERT(set->comps[set->ncomps].comp_func != NULL); + ASSERT(set->comps[set->ncomps].comp_func == NULL); set->comps[set->ncomps].comp_func = all_comp_funcs[comparer]; set->comps[set->ncomps].is_descending = is_descending; @@ -847,7 +847,7 @@ int btrfs_qgroup_setup_filter(struct btrfs_qgroup_filter_set **filter_set, *filter_set = set; } - ASSERT(set->filters[set->nfilters].filter_func != NULL); + ASSERT(set->filters[set->nfilters].filter_func == NULL); set->filters[set->nfilters].filter_func = all_filter_funcs[filter]; set->filters[set->nfilters].data = data; set->nfilters++;