From patchwork Thu Jun 1 01:37:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 13262892 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC8C9C77B73 for ; Thu, 1 Jun 2023 01:38:34 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1q4XGp-0001Ap-Gj; Thu, 01 Jun 2023 01:38:31 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1q4XGm-0001AZ-Pt for linux-f2fs-devel@lists.sourceforge.net; Thu, 01 Jun 2023 01:38:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=MIME-Version:Content-Type:Content-Transfer-Encoding :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1+xDjwK/G5Ell5goJsjITLwZleVeL666IQ0nhhzjTmQ=; b=FtEyQVH9FK+gqkyQjUOTGz/NwT oObPzi+YXsuoS4F4TcVuqfU16NLdEN5D3elC2Vc16dRNlnRbxl/I3MEWaAPh2AwYh9yvZKf51ntlg NHHQezxGaGa0AJEoMZCaFuh16bUNwHHbvvwrAmpxKfkpkgkW0Og+gYNUIMicmMXl3qXQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=1+xDjwK/G5Ell5goJsjITLwZleVeL666IQ0nhhzjTmQ=; b=K d7nrWraV1D51B4DboNUK5lFsrSpKqiJP7pqP61Ohrs6s/6n3md28te4C8bEMhdDuXY1IVKz+FcnuU 0Hf43gd3WZdoUsjiqPaVW5C1FhYsRLMmYjaJm9QPjM0nGO7Qo4U3YuSBfvjmym3oUY0lzaEPDseuU QsC043ICoLZmgM5M=; Received: from mail-psaapc01on2124.outbound.protection.outlook.com ([40.107.255.124] helo=APC01-PSA-obe.outbound.protection.outlook.com) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1q4XGf-007v22-07 for linux-f2fs-devel@lists.sourceforge.net; Thu, 01 Jun 2023 01:38:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bpq4UpBY3i+TzfzeWcBGMtfLeHmi8IryazdDhxgwI4irb5i1ZG5ZxyZiHBBvoqVDEaKosQBpAdLfGkwez4cbM39RKT7lV6pU2XBGlIqvq/X2GbXGeVT6U4Cz1KODiObEFyOETbwTn2LK3gTAWUiOL+kWYfH4ZIWO9NlklFgtq5H2Xdvs4pBn4f2EQ0zHPDKSw/sNskrnxoXOvslNR40b03379zn+o8thn0lxXhau92j6E9kXRuXczI1s9FkObJq1nk1Pk3iB7csuFeIshh1LCotn4kcr1TK8G63hzsRN1+k3JrYPH8SlkGpYI624vfZiv3tBwZB1bm76HM5XOJgBDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1+xDjwK/G5Ell5goJsjITLwZleVeL666IQ0nhhzjTmQ=; b=DIQ+ENCbypw29sqxDV2RJjpoFlwt7QlVmqFDgosu6TipsHNNQhp+wWiVBFRVemLHYSM83SRIoEIIEaKVTIT+iEibKW2q9EZeZcI3bAx4z6+G8x2K1cI3M08JdkXCBVztbd4Db3SJdfwtBn6aSKcsfV7GWPSzeFHdxEbUtAM19NXK/6NEBaWzoQZFPkkjksS86RYoCRlOAxAJxjyaDQnHW9q5NmPsm02zuFtQEnsmLh/6S5+nvQX9RnEmHLhYC0Z1ggz+GOCK12x+rlWtZSIOAllL2lkn9mzhL25u/AFhgvffcStUIInmFWvslP9uYY9G2SR9hgERNkM6srQi6DNa+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1+xDjwK/G5Ell5goJsjITLwZleVeL666IQ0nhhzjTmQ=; b=Fu+vJnmJmD3TAoOKATuLT9ZlRq7/JUdmbLQC53ASYUqkBTmOGP4F52v2mnFd3DxOXCp7k8cgKFdxVQd2a5PPQAOLnZZIIQjODfx5WNDN8+fhNRVnE6LjvWpTNj53DxU6nzp6jhPGmB09QV8Dd3Lw/V240yq/mAmnMX7n+cwtfPwRoVTHV6XBpe3vhK6EWNdNY4kB/ytWHb+zv03rvrm/+MJZ3ehSExgNe42yMtQLVHyDw+QQhptH/JWIapsvz5OM5FTJi6jRrTQyW6LZ/JCZNoqz3M/h6vky92cZYAJhFCF9D/jd7sSR6kOLmQsTD+yeAk7h4GhwXsHa9XtbRJDsdw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3017.apcprd06.prod.outlook.com (2603:1096:100:3a::16) by SEYPR06MB5645.apcprd06.prod.outlook.com (2603:1096:101:c2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Thu, 1 Jun 2023 01:38:11 +0000 Received: from SL2PR06MB3017.apcprd06.prod.outlook.com ([fe80::a9b5:e147:e85a:96d5]) by SL2PR06MB3017.apcprd06.prod.outlook.com ([fe80::a9b5:e147:e85a:96d5%6]) with mapi id 15.20.6455.020; Thu, 1 Jun 2023 01:38:11 +0000 To: Jaegeuk Kim , Chao Yu Date: Thu, 1 Jun 2023 09:37:59 +0800 Message-Id: <20230601013759.75500-1-bo.wu@vivo.com> X-Mailer: git-send-email 2.35.3 X-ClientProxiedBy: SG2PR04CA0156.apcprd04.prod.outlook.com (2603:1096:4::18) To SL2PR06MB3017.apcprd06.prod.outlook.com (2603:1096:100:3a::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SL2PR06MB3017:EE_|SEYPR06MB5645:EE_ X-MS-Office365-Filtering-Correlation-Id: d28b7ccc-e8b5-4bba-dd88-08db6240db36 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D38IGCYG+B52zXqu0AC487yO5ibeY6sFqcDs7oW/MuSn9bqgEWiRtnttBZsEMVPx1EEdDyLMTpPLEryiz67E9oc79zq2bW/DZqamOQLqoiu6ykdpxqA0lYhacctqAWSK7T4zvHfz7vuuzEhar1Y/KLYAtdYlfOtq4+bYaEzUShg18dYj1jcsxoTmUrzA0p6UcrmhuiYie/Ep8MeTlsVVrP6xWZSpPCKz5+GIv7YvojOhRKEzuvAglYSk1AuOoy4CcydfK+e2CLmN7ez3K1gKeNJqVfHlbrUN2J9i3H0Jcq+CRXE0Y3BzLVGOXxmQhbrgb+IIWQFdMfIlWdX019laSqSoXYXY1oK36XC7aDwHOXGWBAQxRl/nIqmJ8pRKW7h/7kdNQqe60QiUIgpF1gBYhY17Cm0m5l+emnoI7TPLg0yHKRpXG3Ej/w1rpB4gpD7l4GJEDoMxDtkAjZ5IUiQ1k912apUM+kJ75975Ju/dlpaY/UR2EFh6kgUXMclnK0eLttsuOsKlyrc+cVStrbNTBBnoJxiDa9vhwUESLwl31iwlcMTwwRkxBQM3nbjpD0P4LMGeNovZHhxhJfbtoyC0Grg8nINpO4vXl4ZwfPidzJDLW7XUaGwPUJ4O3+TzXye9 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SL2PR06MB3017.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(346002)(366004)(39860400002)(136003)(376002)(451199021)(8936002)(8676002)(5660300002)(186003)(478600001)(110136005)(52116002)(6486002)(41300700001)(6666004)(316002)(6512007)(6506007)(4326008)(1076003)(26005)(107886003)(66476007)(66946007)(66556008)(2616005)(2906002)(83380400001)(38350700002)(38100700002)(86362001)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HDo9W5zc6mJt5ud6KufUcGEr9YlSckh+p8/Boaq4zVG2smMAO9Lh3TsyVLo+6aMLB5Zuz1PLpJaN36xLFzfILDqaY5QjPfNO8ns/WkXF8jF61dLNY7hx8aHpkeOd5hxYURnHOJdCUUjhoraFS3veRVK9e264eTZVs7DV7oroBHVQeZc+0SZKUU9/xw0+sgn0l7MegBsieem6CeRbQn9yVKN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kGvuYjhWjBXTbzsjfFG1SES1LUUOn5RRW2c68UT7je8xzfI65NqGIcgnQhLpna3/tpMOfHgY9q58saHL7Vi4K9GXoskMw1BfLBuQDloZ9XI4w3W9amjgCt//H+0BQNKPKz9nRRQ8C/vSaUYpuIRNMkS8S1+ANAnMfx1cn4LzJQ/2NqPmyi2LkwzVASiKxC8ViEMVcdyXVZCM1U1DD64so7jtxdskwbB7nQ9jVISU4S2TUWPGk7kNRz7KWm9uhEraw1WijCtz1Sa1BDmiERRH0+ARlrzrn0dZqg3JMI6PWe28aHEsLm1MLDDBAuI8jcua X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d28b7ccc-e8b5-4bba-dd88-08db6240db36 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3017.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 01:38:10.5433 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4T5eeC7vEkX34E+cMzWptOQowqg+p+a8Zu7DGec4tWXwkI5qSH5pZ5y4PsGIO9n9fqTE6lhKEoNzUdkI7mHpSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5645 X-Headers-End: 1q4XGf-007v22-07 Subject: [f2fs-dev] [PATCH v3 1/1] f2fs: fix args passed to trace_f2fs_lookup_end X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Wu Bo via Linux-f2fs-devel From: Wu Bo Reply-To: Wu Bo Cc: wubo.oduw@gmail.com, linux-kernel@vger.kernel.org, Wu Bo , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net The NULL return of 'd_splice_alias' dosen't mean error. Thus the successful case will also return NULL, which makes the tracepoint always print 'err=-ENOENT'. And the different cases of 'new' & 'err' are list as following: 1) dentry exists: err(0) with new(NULL) --> dentry, err=0 2) dentry exists: err(0) with new(VALID) --> new, err=0 3) dentry exists: err(0) with new(ERR) --> dentry, err=ERR 4) no dentry exists: err(-ENOENT) with new(NULL) --> dentry, err=-ENOENT 5) no dentry exists: err(-ENOENT) with new(VALID) --> new, err=-ENOENT 6) no dentry exists: err(-ENOENT) with new(ERR) --> dentry, err=ERR Signed-off-by: Wu Bo Reviewed-by: Chao Yu --- fs/f2fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 77a71276ecb1..3e35eb7dbb8f 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -576,8 +576,8 @@ 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, !IS_ERR_OR_NULL(new) ? new : dentry, + ino, IS_ERR(new) ? PTR_ERR(new) : err); return new; out_iput: iput(inode);