Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2484673pxa; Mon, 3 Aug 2020 17:58:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3m/t3JIQdKRhF62QFw0/FF5pJ1zpdtAjVJIhIL1nb3sUsTyw+gLLnACLvBf/7RmJkTupQ X-Received: by 2002:a17:906:57ce:: with SMTP id u14mr20076695ejr.175.1596502716364; Mon, 03 Aug 2020 17:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596502716; cv=none; d=google.com; s=arc-20160816; b=guC3zXrtwqavDvj1rwFQ6xgUBISygLGkgv55J7sgna08Du8IjahKmG+Ph2vx0q3qq5 rFtDEN4N53g/GK5FIhptVuLTTsvnYblmZZTJWMdqKg4RFdun9Q+tjtpATQi0NmQdKitO CU+1rzZGJtXoM4sJDyvfAk9XHlpO1ON6+0mDnRwNPTzZj4f13gCTImzfAJ8MbaqfUYxY dhyhKVKYhP+y6dIEeGBX/xdw30WibE8XG9HNAzg3TMP4xAc2OVzLCRiBxz/58bhNXNIM U3ITltcCr8dBb8ydfg3I7j+Ekmb64ACktV0Ua969mVF3Mzuq7a1gJgKils23iMEtg6e7 gqsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=79/tnc5+DE/fSmIpQuMmXyyAVoNI9rLeSF+Ee728GOg=; b=VkpFk0f2LH8rq172Qd6OrDHa5nrRK6WDPA/G9jv7ebap89JdncUeuFrm7LQkyn16F0 hPnjf4bf8WqEEpJiL6TarT69ydEFeSOG1Lx7soJd3IGq2i1WsXGz6PbyC4Rxm+PcySw1 5hNPzC8p9wdjKwIsWUQJ9+te7kAhw45Pv1V3JzE6OjMYw4CqKnly9T+FA/3c7cnes5Y/ 20u/nZuaQyyeNIWb+coWmTzLfTHgGZxdFM/jexpH/VGkEqj0VIPQuNhlpJ5ghOkdvzEr lTzn1qHRXakZgEBJSlkso7EDVihQt+cv9uFTJw7Q8AjSUyg/mz/LFUcc8jPcZOwQUT68 gjtg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si2788709edx.320.2020.08.03.17.58.14; Mon, 03 Aug 2020 17:58:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728871AbgHDA5g (ORCPT + 99 others); Mon, 3 Aug 2020 20:57:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47576 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727858AbgHDA5g (ORCPT ); Mon, 3 Aug 2020 20:57:36 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 82BDEFE8FF83CD2F15D5; Tue, 4 Aug 2020 08:57:34 +0800 (CST) Received: from [10.164.122.247] (10.164.122.247) by smtp.huawei.com (10.3.19.202) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 4 Aug 2020 08:57:27 +0800 Subject: Re: [f2fs-dev] [PATCH] f2fs: update_sit_entry: Make the judgment condition of f2fs_bug_on more intuitive To: Zhihao Cheng , , , CC: , References: <20200801032450.3028986-1-chengzhihao1@huawei.com> From: Chao Yu Message-ID: <213c79b1-39cc-1b22-f2d9-d6b5ee3dbdab@huawei.com> Date: Tue, 4 Aug 2020 08:57:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200801032450.3028986-1-chengzhihao1@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.164.122.247] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/8/1 11:24, Zhihao Cheng wrote: > Current judgment condition of f2fs_bug_on in function update_sit_entry(): > new_vblocks >> (sizeof(unsigned short) << 3) || > new_vblocks > sbi->blocks_per_seg > > which equivalents to: > new_vblocks < 0 || new_vblocks > sbi->blocks_per_seg > > The latter is more intuitive. > > Signed-off-by: Zhihao Cheng > Reported-by: Jack Qiu Reviewed-by: Chao Yu Thanks,