Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1821766iob; Thu, 19 May 2022 15:51:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXaC25OhbK1ga2Y8CjASYkhIsDoS1ZTsDYkWbpaOwuqkt9R5urtrImEJrlKJw+N3qu9l4a X-Received: by 2002:a05:6a00:84e:b0:510:5fbc:7738 with SMTP id q14-20020a056a00084e00b005105fbc7738mr7139968pfk.86.1653000715138; Thu, 19 May 2022 15:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653000715; cv=none; d=google.com; s=arc-20160816; b=qyowCraEz+IE74+jONrjXXk4MEJASLytkAXTuzVpKZiLMpF1vsMKwqMKyyJuMWk/Au ObFM5JD4LLBukULkm4ROET4H7K0b7CmTDW1LItmT7RtInd3MLfD5J3ag6bkDrkMHlc1W vW9vyCKwJNcvX65693vuP9spyvqIwyhzI2mI1Xs81mociWu9vF0dffOEatImZo71wjj0 f/ayk9Bw3rEJvPl1dWG8+6bDcEHQK54gYSzdSBwuWaVgHm4GgtCvgL+vf5/kT41x+NpK PhiRPmolAfwGRpshK6NIb74/nMGW8Qmuw6FZm+fN+x3w64v3yCli0/aoC4aCiEyRA3U4 KI8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WVV1dRw9CXbITFRFAr38oo/Tg0GD/yZ0EddEdw7HELs=; b=0pFfrZ9IEGYV6dSVA7RykDRpJL7+U+sGVNxFGFbqSbOfOl536Uj8YpEe0np+baiOyG TsTWwK0eTUJIcZBl22Xnle/jX/39Dd8F5cY2WZlLk1jthEskmWRNtcles21KUe2L1FD9 f8aw9j/XVtbBQfco9Jq9TOqrLELONqKfiEMPTK+GnPd1cG/WYeNcNip4bca5hi6UutLJ uamaecxmC9vbMiflMc2iLXm7b53G3iuVt+/7JTsn7LSjRnf4+imuUJU9RS8LwG7ISsBF sg5WSkESs/L5sQlGnXQMz7COhMsKRBvPFOxf5ViAB+KmbRkh0mUWUcwRFW/IClKLk0Nh EUrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DNzH6Huo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a656790000000b003f61ceca086si6083223pgr.205.2022.05.19.15.51.43; Thu, 19 May 2022 15:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DNzH6Huo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236811AbiESKko (ORCPT + 99 others); Thu, 19 May 2022 06:40:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbiESKkl (ORCPT ); Thu, 19 May 2022 06:40:41 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16CF5AE25A for ; Thu, 19 May 2022 03:40:41 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id v5-20020a17090a7c0500b001df84fa82f8so4851538pjf.5 for ; Thu, 19 May 2022 03:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WVV1dRw9CXbITFRFAr38oo/Tg0GD/yZ0EddEdw7HELs=; b=DNzH6HuorMvOBHr9yxuvuIHtguwSss2h0NhcB901IipyCSG56/vKC4VNhExwsp2ON9 oyQmliTQlX6QGf7x/cxK6xqnlYnw2IYUTCk3SOmfeICpkwMBee4X/nb7wcDqzePpAB3e 9ksi0hOqmzy94hGGJNkHHA5gXJoyzvkm1+sGY2xvDm/wSRuDYFRaNE5qc5krz+t2baW/ VgMx1WomNaiQ7ANz4zFpald6ez5cwo0X+hnCWMd0/QplY5l08hNe/q5bWD++WztmhBlU ZcXQ2ReiWszZaGO40nJBTOQDhOnH1L1MfHvdcsqqYZ6T777/dREvW84pff5gm6ZIzYH+ FxIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WVV1dRw9CXbITFRFAr38oo/Tg0GD/yZ0EddEdw7HELs=; b=mtkuZJmEaaUwi0DNXhfsYGOwk78a72mfItMUeqXM/4eNPc5ZmUZz2oHCz3EgHo9Zqf bfU1XDWv1uJTryBids18IO+7DBsEqPEJGJvxh9SeDKRcJv+ytX56Uw05p2naFqLECyAS Jn5evlouvGkC1ZlVBU7ql4V6AyUV5/w7WZK7D0nJin2KtwVinBRsubYIiNMxtrOcoWi7 AEzgDOoP54O6FI95LUr+MgmYHg4uHg3nIfObmzti6rfB+d3ZMnyCEHRkMNC7xYOdDW16 isr2quwFXdPTyFsE2GxbDkErgjsyMcM0O+BaNUuOSzFIdQm7PD9WRTsF8Y1tNeeiZKX5 fXYQ== X-Gm-Message-State: AOAM533STdy8bCWh5vYlE9mnahAcvAAVnQfHhZY4JtHK4IP0wDzRcj2+ bpbolloZvIe74YYy/bzVkHs= X-Received: by 2002:a17:902:eb90:b0:15e:b55f:d9c5 with SMTP id q16-20020a170902eb9000b0015eb55fd9c5mr1986867plg.33.1652956840621; Thu, 19 May 2022 03:40:40 -0700 (PDT) Received: from localhost.localdomain ([103.220.76.197]) by smtp.gmail.com with ESMTPSA id y16-20020a17090264d000b00161527e1d9fsm3344206pli.294.2022.05.19.03.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 03:40:40 -0700 (PDT) From: Chao Liu To: Jaegeuk Kim , Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yue Hu , Wayne Zhang , Chao Liu Subject: [PATCH RESEND] f2fs: make f2fs_read_inline_data() more readable Date: Thu, 19 May 2022 18:40:10 +0800 Message-Id: <20220519104010.2814819-1-chaoliu719@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Chao Liu 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 --- 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.36.1