Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8571232rwi; Tue, 25 Oct 2022 08:14:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+EojzIqAxpuGQhSJhvt7Bc4ZCPDI0ibypOQA2Zwh5iEfo/Ja9bXOIhELVuVtEYIRJVoNK X-Received: by 2002:a17:903:248:b0:172:7520:db07 with SMTP id j8-20020a170903024800b001727520db07mr37915886plh.76.1666710860168; Tue, 25 Oct 2022 08:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666710860; cv=none; d=google.com; s=arc-20160816; b=I+RnVbebua1ETgOwSRQIE3Hac+kDsKLk1Fcl+cAdqp7yshigqnGLOQZYWOr9BV+Hc3 rpBGeOuy4Njh7y8MlOr+3L+N7Az2xXIDWeWN+DehWOgXwpyLCkwecB0TQLe6/XoC7qgj UozCLKxpP6it3OHWmrfpYu0Cs+LP+bmTPAvyp2ouJEyW3bpXCd8kLp7NDdo7hq19v5L9 So6uJqXRNVw2+oJW12UNGyuQIXZ+qN8jzcUiOPZiN+092n3RieI1iBfI4nBIKhHpkeqm HSCTjqYXNXh1jbt46PsJA0IqNEjvUDsvKQdgcZtiMNDTSuhDBWrSEZKlMkHiJolFWQFb H8Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=dOHXKpLftXhLHdcSJw2Axjq0vNc/tcBkkzAn1dGdjw4=; b=dQ3fQpWRN+GL94NE+nemIGPb+2zfrAQ5hqjEO371num+XzR/lmEN+1P/aIj+pvlk9V q2+NMpjSAUSpN5Tfuye1zrah9/f72pst2CLT0biC8JvuWxmh6tdcujziuH/M6buYia3z s8iX74wnjMDKUsoUJn3Z+oqKfzR2tb+kSWETHUtupZhKQOzl0BOyipmodMD4vtry+cWx PwpC9u8qcJMi7Ha7r8ggrIA7wD/O9l2pH2M01NgNnCQpSep9YtpStqTLSizldcF23cEo vhMPOwic3X6pARZKT9PJlalO6aygQCjil81azyFi8SycsmGsG5oMI9yNqcIXhntN4stj 8CNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020a639310000000b0042bba5a062csi3407890pge.280.2022.10.25.08.14.00; Tue, 25 Oct 2022 08:14:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231745AbiJYPCF (ORCPT + 99 others); Tue, 25 Oct 2022 11:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbiJYPCE (ORCPT ); Tue, 25 Oct 2022 11:02:04 -0400 X-Greylist: delayed 224 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 25 Oct 2022 08:02:03 PDT Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0FA219E910; Tue, 25 Oct 2022 08:02:03 -0700 (PDT) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Tue, 25 Oct 2022 22:51:35 +0800 (GMT+08:00) X-Originating-IP: [182.148.15.254] Date: Tue, 25 Oct 2022 22:51:35 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: tytso@mit.edu, adilger.kernel@dilger.ca, linkinjeon@kernel.org, sfrench@samba.org, senozhatsky@chromium.org, tom@talpey.com Cc: roman.gushchin@linux.dev, akpm@linux-foundation.org, willy@infradead.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cifs@vger.kernel.org Subject: [PATCH] ext4: replace ternary operator with min() X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <5036013e.4.1840fa09d42.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwCnu+H491djhgQAAA--.1W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAQB2FEYxtGOgADs0 X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Rml4IHRoZSBmb2xsb3dpbmcgY29jY2ljaGVjayB3YXJuaW5nOgoKZnMvZXh0NC9pbmxpbmUuYzox ODM6IFdBUk5JTkcgb3Bwb3J0dW5pdHkgZm9yIG1pbigpCmZzL2lzb2ZzL2lub2RlLmM6MTE1Mzog V0FSTklORyBvcHBvcnR1bml0eSBmb3IgbWluKCkKZnMva3NtYmQvb3Bsb2NrLmM6ODgyOiBXQVJO SU5HIG9w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