Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1229007pxb; Wed, 20 Oct 2021 00:26:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyayqekJsRZmD14D6f36tec7Ozj09Bs1tJtwbE0/QCceORzU5KkSKYZXQSWWyOEDBJ9F+Kz X-Received: by 2002:a17:90b:341:: with SMTP id fh1mr5504177pjb.6.1634714784588; Wed, 20 Oct 2021 00:26:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634714784; cv=pass; d=google.com; s=arc-20160816; b=IewBuyOQvxRx1vcZuwz25S8Fw9eqafxbUb372KgVaT6/zvgqx76PlV9Y5f/oDkFj+L DZRnXpSgCwIB8mZ2E1wOMQvQ6W4bDayalqj+fH2za1YSHLWNb0hQJLXZ3TFB0MNbikUD vj/Ay3YmYRxrI5tDqkrKQ3E+zsxdoT9EmZE/JHx0746J9EPGIT4fTwCQpG7NZGwEILIu EfRef5MEhA3EeP3aiClZYHZytXFDr/neLtRsV9Ilmm3+gLwc1N5gMGLmMWic4qeuXBsU dCmzNsZQSRdsV0BiQGxiUvuZkaJTLT8DIYgJIEHQuZlIocyne6A+hTsXdHygnLIkPl/T mo/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=f4xan3PItXj5j22TJ6rbNfBxfqENKBYRh7FyHGlfOjk=; b=SUHkpbbTLL3Qj1Xr8SIxzyMtSBEQ53qAVTZNK6slr84zJZhL6phU/nNMzZHt+DNacV bOJW3L8c1WlSzDvTkUdkvAYSnfHptpoRZKEtSehIoJQuonA9n5JFZQ1v2om15ja62A0r DmNHNwiLTvGYrFPwxXiC3Qkf9n3GJnArBCnCfps8BNKz7KUm3Wb1ggdUsmM4pBPOrsdw zm0uibrR3GUgD+JY1s+2U55oJE3HZleMQKYZORJAD/3XOssj7BvWHffkycsYgRGx9y8V I8zOMVF9GhbWGZCtuaNRSu8nuhCPYgYZpyXEHjk+XBRE8S3uOWN0NnDT7cRLHWIz2RN2 2bFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=eJfKfQ9x; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si2042771pfk.186.2021.10.20.00.26.11; Wed, 20 Oct 2021 00:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=eJfKfQ9x; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230082AbhJTH0J (ORCPT + 99 others); Wed, 20 Oct 2021 03:26:09 -0400 Received: from mail-eopbgr1300124.outbound.protection.outlook.com ([40.107.130.124]:17856 "EHLO APC01-HK2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230061AbhJTH0I (ORCPT ); Wed, 20 Oct 2021 03:26:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XPAZZkCxv7JRugQZ8kHdZko8vdQ9x5+YWh0JbPZQ8mh943dRUaJT5UXrIMYPlC1HDradvHsJygMc+grzFJwUfRzqXxVjGVorhp+ZcwNBrmDcVoS+N/YMGByazSr/4K75f0li0TVOvNGMrcmtN1BRubEXFiDXUQ12aZdib2TZHIBsUFwagVyJsNwIE7lFcJXMX149n5DfWPPTQquK6fXQwfo1eWbR4OUzTkiv1TsLzWU1RulFnRKA5lcMsygSzp2XbTW6Aze0iP98PDU/dKUhBi2ThKhCh1KUyEJsHBsd6Nyr8wkJAWz4pjgsYw47YF2RtfkzjmkNtVYQWr1Yoa9Whg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f4xan3PItXj5j22TJ6rbNfBxfqENKBYRh7FyHGlfOjk=; b=KGFlakcpWL6N61Pvd/5WB916/fDQvmAA7FHXApLYY5ro9lwo2awa+lyBR3FdXS9xTLC8dJtedo8dXbhU25+LzexePaTM3EENpoBw+lxH7z976s/rG3pzyYLlpgvtPrDss2pKCNMNRcJUt+WlHHd5GyiUjme/HI0oUqimfca1or/NJMBaUVjLu6RZ4gTM50IqUg3u0gATBG3ybIDwl+ZFDBB5+Mf7IQAYbU48iW9YGChA5nE7PXiZnWEzRe1L4h2agDuEsbovnfUpa45MGVAPUTm19Y62zT7KKbhox8Ve9f6YipsXuPEE/zSiEUC0r4KrV0NG3V3paKTuX1uYU1d5dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f4xan3PItXj5j22TJ6rbNfBxfqENKBYRh7FyHGlfOjk=; b=eJfKfQ9xGoePGgxhFmCmo390B3SCubZT/yQf/gmtCn/WZCsGnd4beLWPe90Df0hfXKcL1pDA+nojRJjGJAlcHIPV+PP76osfDDyBxLYrBWGZvG39s1Vt5G7LPYC8jrDifwMtbhJu33Ssu2zAovxmbrDmPT/XTw/ElK78TbLXsCg= Authentication-Results: fb.com; dkim=none (message not signed) header.d=none;fb.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3114.apcprd06.prod.outlook.com (2603:1096:100:34::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Wed, 20 Oct 2021 07:23:52 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4608.018; Wed, 20 Oct 2021 07:23:52 +0000 From: Qing Wang To: Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Wang Qing Subject: [PATCH] btrfs: simplify redundant logic judgment Date: Wed, 20 Oct 2021 00:23:41 -0700 Message-Id: <1634714621-58190-1-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 Content-Type: text/plain X-ClientProxiedBy: HK2PR0302CA0008.apcprd03.prod.outlook.com (2603:1096:202::18) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (218.213.202.189) by HK2PR0302CA0008.apcprd03.prod.outlook.com (2603:1096:202::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4628.9 via Frontend Transport; Wed, 20 Oct 2021 07:23:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e89bea51-a947-40d5-2136-08d9939a9108 X-MS-TrafficTypeDiagnostic: SL2PR06MB3114: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:962; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d33TSrXoteSGE20p9LPznCN1N/Vb0jmeD8l3SuX8eHkUkwvJbC33Xxj/du9SdVNbsnx5LYFktjmjqMMMeOano8bJlDp4RquUPfu1KonhGnSGNuyScKSbWV2VJkA8Qf2fz7QEy5XkiuAHw0t1eMZ2LbZy7zm1KJtGo4poZRFfBD4M13P0aLY6G8GXsIr5wWq9HuJYIQMLdycTUMRZ5NDEnt4Pmk0u2s9LUlwc4zmQX6XTd503jcf4+R+2+iCDbf1B/gITjMCDh5fILv7isyA3Y9Fjwb/4fTP+CyKKYfI2BevG1BafeT3TaDAXPtQR0mI9FZwrC58WNPY/kz7R/Mo2efkqfs3Wk7dIWG7jPG7VG5zij71GrvCgK4Wfb70I0a6dBl0MSh4YfWqmDW3qxJrucqOkIapS/vR49JOBveI7JSDynotp9m5rE3QBzDqosrGrm8fYgHVSYVxIkdoGgbWTV6s3bBEl5CvC26cUabsUOdQTtrGzyTOcr6xCkpmF9HkoDooXLmqh/s3HaiS2TZrvu1CwvhFnp2NXd+Do78q9NqgJU522HEOVJVFWXaQP/ltZGazSZvA0TAgu+Ttk6Sf2adH77eUCbGnvZ+BzMvUMbbNDqOY20YTrKft+FK1gViUmW2u1KYmAXjrGuD5cFX2svUdT0vh7yZBfX6c3I2lI51sbo4viLJsXuj+3uJt4LORZXh+qi0Be+O9wACN0iIaPTw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(508600001)(4744005)(110136005)(26005)(316002)(66476007)(52116002)(5660300002)(6506007)(66556008)(83380400001)(6666004)(38350700002)(6486002)(38100700002)(86362001)(6512007)(956004)(66946007)(36756003)(4326008)(8676002)(8936002)(2616005)(107886003)(2906002)(186003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?h4JaGBNT2gdb9xghWCNf5ZZdhqB5oeUzx3gmae5rL0y4t6lSltbkS7eypLFD?= =?us-ascii?Q?D4igt4iWe48CCXv4pSbZNNT9c60NBrJoTHtdWOdAuNxIPocCVlti+lqmUPei?= =?us-ascii?Q?B2EOCZ27TLEAYB0SUWyEp3bL+t6kitvHQb55PkLZeQXBidrUdX57+oju0uAF?= =?us-ascii?Q?kwnrkcLCdh8v5XsQDwYgh+4rQt/GCOT2lK6WQ9nyaaK9BVzzGDPmtniJGO1+?= =?us-ascii?Q?lmKyzEMtj9YBYDmMLGsy1NrPBVl9cASQ7b/YEN/3Asdmaz+k+jy3Q88NJ6fK?= =?us-ascii?Q?W7xzOQm4ALWhMtnlILdxXKp3QGxqCbZmKY9iDZULq639KSCzsxUyWYCkFflz?= =?us-ascii?Q?nuXWk5gjiomFE5rpXFCyVbNtAwHcvjZpLdjvVfipPGEMgk1bN4YijVMYtF9A?= =?us-ascii?Q?isrQW6IriFZQlU/TEFV7d+TgIOOu9ZMWpPED8ovglwwWUkMj0CvJFUbr8kZG?= =?us-ascii?Q?YUO+YyC1EYcK4Bk4TAQ7MRTEiEi/aIy1vb+Q3HrKIBWWEPnLthQFtkDet4Ec?= =?us-ascii?Q?1MYu0u7a5kSerCg6iTeMGsgxnR5mKqrOmWQ/KpFxfhnwON6TBERizhWdmTls?= =?us-ascii?Q?PFIgxHHG27aqymDsI7RF8wFIoOojnG+K43qZvBCmMCHqQtcKFJEW9N5nkf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yGrQPrYcTYgBYOWlOtFPetXJsI+sv4AQBF3J?= =?us-ascii?Q?EyhhCQ0Whs7FY02SG3/4xwxXhufC3arxt7Y7ss0eBHcWEIGBVnWdwc6ewApg?= =?us-ascii?Q?NnBHnqJKWEShpla4ceKyB0E=3D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e89bea51-a947-40d5-2136-08d9939a9108 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2021 07:23:51.8810 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: g0TpprEO6n0E78Hz+sO1yXGD5l+l/+4WPYA/YsAwuYKhKEyWPX6nogaCPphgNZSlgU3aYK6ye8+Owy7iQFQsow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3114 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Qing A || (!A && B) is equal to A || B Signed-off-by: Wang Qing --- fs/btrfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 07ba22dd..e0d2660 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2011,8 +2011,7 @@ int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page * to use run_delalloc_nocow() here, like for regular * preallocated inodes. */ - ASSERT(!zoned || - (zoned && btrfs_is_data_reloc_root(inode->root))); + ASSERT(!zoned || btrfs_is_data_reloc_root(inode->root)); ret = run_delalloc_nocow(inode, locked_page, start, end, page_started, nr_written); } else if (!inode_can_compress(inode) || -- 2.7.4