Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2751248rwd; Fri, 26 May 2023 10:38:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6iLtuMYV68UgsDSz8HMnA20HzBoqOBGn551crC6FzBOr7bYotUT8cVe6TG8Px5gg5YpSmM X-Received: by 2002:a17:90a:4a95:b0:256:21a9:8f82 with SMTP id f21-20020a17090a4a9500b0025621a98f82mr3090104pjh.16.1685122701677; Fri, 26 May 2023 10:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685122701; cv=none; d=google.com; s=arc-20160816; b=VbBnHt3xDX9hje+A2m2pUUlu+haNrPN7lTNyx/9t1HUgQd75dRtcHg0fW4jYavvz09 7/CwywjXuEplKwpc/y5CBZSG4v3AQkLu4V8u4IUVfaqDAyx2C3OlfmNomJCffKzpcl3u idEKSCsQ22D+s8PXCue7g6PRy7GrmXcXVNKW6ZCvMPKpeRFe/x6cr7DnD3/D706tua9U Cf/f23aXd5SEAWd726zdXgGSYKVMhTEHj+1DLtjJnCDSdTBTCLVSQYUzo6VxwSxhoqrg DDD8dNmurxsuMIjsjfa8wPp0GPi+Z5vT60W68F0d5bZ4l0Kd9ynncKAJeJauNR7woSSh WtcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TIjkfSltBGoHMDVJMLIFiM2/FJ3SSYVYXtUCRMj64/A=; b=pyZweJOMCa9N9gmWXXfMm6U9QbS59KyOpZz6oqQ3etk+Im9u4xLeV2mai78qzFDbe0 6gMFPg/GyrTkpf2jEmp83kaM5TJ2xVIoi4FUiEU4j7T9pZgRjq1uOf2VDS+akvwXzsrG TfoyroqZXQQw2BRwabPpmm4ZCjIbV6gl7v2Jpxr1IueZ7y9qLPqCUNHENCywPwufKNz9 jVnohloxDhnHp8souIsHnX+ixTu8VfJHl3sP2dG5iXZk27YkPanSigch0odRheCgsOTI ggcNjU0CJK5xF0LOmnY+14GMFpfpBrHi6TnvHLclpYadr6TYwfkmxwj3O92ivb7cf/ZZ kkfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KCZWZO1P; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v11-20020a17090ad58b00b0024e47fae466si4311994pju.180.2023.05.26.10.38.07; Fri, 26 May 2023 10:38:21 -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=@kernel.org header.s=k20201202 header.b=KCZWZO1P; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230437AbjEZRVU (ORCPT + 99 others); Fri, 26 May 2023 13:21:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236628AbjEZRVR (ORCPT ); Fri, 26 May 2023 13:21:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FDF1DF for ; Fri, 26 May 2023 10:21:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id B590E651E5 for ; Fri, 26 May 2023 17:21:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1489C4339B; Fri, 26 May 2023 17:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685121673; bh=gh6aGwNXF50lyfx9OR33zTQ40B1N9Ok+l110UgV9qcI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KCZWZO1PWnA8Cq7ymgLi3vRtsV0NlSriolEERPEA+bwPTZTWmfaLKm0H3LuxCbkHF j+o1OzQiW3Nu3kkBjBkqZ8lcKomyl4c/96+9/R6XAq2cqjk/SzOSysxhQ7N7XHDj1k 35DTIrnhfczEV6SGpFHZtqDhZ+Ww4CQ+40N1OY9LdynmL4brW1eBsIyAI2Hzu1V3nu VtBKjURAhdG+9lpFHBoQS0eSaUiEWcFe0IwGugC5NEooutaAocq/jlD6/j2bq9TUHl 3QKblWFwpOOLi9bYbwx69M4mPSp/LXSQIxwcAQcvUwewnPXkGQTiFGB33ExAgfRWh8 asFhwsOwQO2nQ== Date: Fri, 26 May 2023 10:21:11 -0700 From: Jaegeuk Kim To: Wu Bo Cc: Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, wubo.oduw@gmail.com Subject: Re: [PATCH 1/1] f2fs: fix args passed to trace_f2fs_lookup_end Message-ID: References: <20230524100812.80741-1-bo.wu@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230524100812.80741-1-bo.wu@vivo.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On 05/24, Wu Bo wrote: > The NULL return of 'd_splice_alias' dosen't mean error. > > Signed-off-by: Wu Bo > --- > fs/f2fs/namei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c > index 77a71276ecb1..e5a3e39ce90c 100644 > --- a/fs/f2fs/namei.c > +++ b/fs/f2fs/namei.c > @@ -577,7 +577,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, > #endif > new = d_splice_alias(inode, dentry); > err = PTR_ERR_OR_ZERO(new); > - trace_f2fs_lookup_end(dir, dentry, ino, !new ? -ENOENT : err); > + trace_f2fs_lookup_end(dir, new ? new : dentry, ino, err); Shouldn't give an error pointer to the dentry field. How about just giving the err? - err = PTR_ERR_OR_ZERO(new); - trace_f2fs_lookup_end(dir, dentry, ino, !new ? -ENOENT : err); + trace_f2fs_lookup_end(dir, dentry, ino, PTR_ERR_OR_ZERO(new)); > return new; > out_iput: > iput(inode); > -- > 2.35.3