Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp578648iob; Wed, 18 May 2022 08:25:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhWYYvWGmlA0OI1MjwWnRYEpFWYUKfttABLvbj2AFeMBkXth5R5jJ2PSMkaq1lRfHa7ujb X-Received: by 2002:a63:6b82:0:b0:39d:a6ce:14dc with SMTP id g124-20020a636b82000000b0039da6ce14dcmr33452pgc.476.1652887531210; Wed, 18 May 2022 08:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652887531; cv=none; d=google.com; s=arc-20160816; b=NLiVq+WO56QoKejOxPh149hEyikXLkRniOtOdFQ7PZdK5rR4aCQUQ8tzHLsjbQBFJV R0l79Jeufl4S5esBXLwVNRc8cV27y0iiA7WX8BNty0tc3eRUiTZn/D5iYQQ1fwkwdkKw jnayj2SZ+LDIwnThxFKL92jAVG1/uoNijxPx4z512/ii5z3r6YRxF6bZp9C8SXtm3Wjb Z/1aH/6ssKw1CHQjCJIvIbzTdtA92atysBvSZburG+JljBF2vEHHpYqoZJCW1sRM363T WijD8q7zxHjx8GVNUlCGcssR+rzma3Ij7dkXnlDrBkUK/H9Rl/afGY5U8rVC/BcuMnqk vdfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=pM0VIzY095/DEXR/lJ/Z1Exn1+wo3LAJu+/oJuaP61E=; b=Y8QB98RmpK71PFTqpKETaE1oc1b2OW7J4yvlHD5U71IeUVLf0U+lJSncSKLVOnh8tD rGLfG4HBo5RpDy4MvS2ZSpw2QX0pnStDAwyZFb34yKV68KRF6yes4t0aELSlRvpCNEad GAlklaToOhwVFM2sZagtkqpniPczbEuaKDOzDlHJ5AJKuP9ErQkZG6E2RvQSPMyQU3xW 0LuhOMdrdtCwf2kTCHHg5J+VP9ItznupDf2V0axCoz5YR5L8tvncwbsE8B9F484xkneZ Bo1OoIbcMM2PtpCUS5caFj/3+qVA/5e+YJP6zoT0TBg3t1QPVHxwl2TbpAefIQ5X8lhJ zrfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=te9UTYWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r20-20020a634414000000b003816043f118si2484364pga.781.2022.05.18.08.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 08:25:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=te9UTYWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 766AB19C3A2; Wed, 18 May 2022 08:24:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239260AbiERPYC (ORCPT + 99 others); Wed, 18 May 2022 11:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiERPYA (ORCPT ); Wed, 18 May 2022 11:24:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6003619C755 for ; Wed, 18 May 2022 08:23:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EA441B8200E for ; Wed, 18 May 2022 15:23:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B140C385A9; Wed, 18 May 2022 15:23:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652887436; bh=YRg8FOBF474wcLMD9+vFBXzah90HH8wz+sqNu2oCaNU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=te9UTYWfbDP+aEEzSFMVtBWdMhj9JyQInKJmsyPAEoDaJFq9imNhql/v4hiXI3Aid GzjBjZYocPzxtCcW15jDPs+3ebJOSFbRxmyKIIJ4hlEKf1+fLSM9/krLSEMMv1ZfKl YXFKPshaOa72Yo6fDN2OCnyAKPzPeEkT3dL/Uop2NyElDncWX7uIN3scQeBFQFhpon dzH23MiqDNv9P/dH0OBS0QJ/z8rYkHNZFy7E0499RIHmX0OI5OrGGgJK954ii5Rhf+ +tsPDR8T7sBBalagXIZhWYYlVUiKyKCfkzA2GC06Ixw/w1Phrcd5+dcvB9ktSmnWpz a9iO+rgh8sBUg== Message-ID: <7d1878ef-e1ae-0550-7d6d-2a2ff858586c@kernel.org> Date: Wed, 18 May 2022 23:23:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] f2fs: make f2fs_read_inline_data() more readable Content-Language: en-US To: Chao Liu , Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yue Hu , Wayne Zhang , Chao Liu References: <20220518023123.2455827-1-liuchao@coolpad.com> From: Chao Yu In-Reply-To: <20220518023123.2455827-1-liuchao@coolpad.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/5/18 10:33, Chao Liu wrote: > In f2fs_read_inline_data(), it is confused with checking of > inline_data flag, as we checked it before calling. So this > patch add some comments for f2fs_has_inline_data(). > > Signed-off-by: Chao Liu It looks email address is missing, but it shows after I can apply this patch to my local git repo... Could you please check your email client configuration? Thanks, > --- > fs/f2fs/f2fs.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index f579e2ed0f14..5071f6636e41 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -3167,6 +3167,10 @@ static inline int inline_xattr_size(struct inode *inode) > return 0; > } > > +/* > + * Notice: check inline_data flag without inode page lock is unsafe. > + * It could change at any time by f2fs_convert_inline_page(). > + */ > static inline int f2fs_has_inline_data(struct inode *inode) > { > return is_inode_flag_set(inode, FI_INLINE_DATA); > -- > 2.25.1 >