Message ID | 20230406195615.80078-1-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1273904vqo; Thu, 6 Apr 2023 13:09:39 -0700 (PDT) X-Google-Smtp-Source: AKy350a8F0ee/5DwOLH3gmVZx77quN8IfbJYHXdabwx23WBBmil6juDwNRy2wctzUrF8KX6LGXUw X-Received: by 2002:a17:902:db10:b0:19a:b754:4053 with SMTP id m16-20020a170902db1000b0019ab7544053mr559632plx.26.1680811779512; Thu, 06 Apr 2023 13:09:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680811779; cv=pass; d=google.com; s=arc-20160816; b=V9tXPSe3K9gY1Zhc8GgikTNxvS7schHv/p57BKvsrqLepn5uxV8+YOZqcc45aCZydL njGmqWJMQlep9tj/25+GxpyZB1KHQuYVI7FoCWzZDaIp23Poo+MNsr9oaF9isNWhX1Ao WIrVlxvjBW2/ymQ+S+9tfxlC1ZuA2zKK6tXkwF5LYAi7EstQSwJ1xNCzFdsUKWqObz7U DQKIZF+0f0q97P+Bt85ndLrR3L2Im6wC4zReyebCkXO50nvNW3QmnBJnSz8mCU22n5t1 krRRqeKgqD8i4Holtt3KicSAC+DiE5V2JdIGFVoOhENxfov35NkLccaSeLiqpYktnYmr wG4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=xXmQxOot3aCL7XsLFjpzed5PqSudv0GqRFmxBrKacLE=; b=hNjTMeV4Ht6/8bs3SolQ+nAqPMzMaDUtEOZFFDgBpafcpTYwmr9J/XirVTVy1Mk3pD 7GT7uFx8/OY+n8lHJrM0+WMHWj0YGuIZqoeWLZHSa4HpQgIU7KORlubo2RRrSJ8u/llO XJ68up7tXvih3zMEkovP+rNjXi3vHzNGDe93ehCMRuhKZyTv5YQeimATr1S3lHycGBwg FKjMxNO+chhvZytwH5V08NkdYPaGdZbl0Q6Ga7cLcbY81vltFjU6ct+q5flMY6WoJM0D +OBCx8Wc1m4Dc6yuu5X+voqJYQxHu78Ndxda+Gpjjp/eICqZWvHa2lMIzxWGTYcHtzRJ ioUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aysE9ek0; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t198-20020a635fcf000000b004ff6fe5b263si1994340pgb.749.2023.04.06.13.09.27; Thu, 06 Apr 2023 13:09:39 -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=@vivo.com header.s=selector2 header.b=aysE9ek0; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238546AbjDFT4d (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 6 Apr 2023 15:56:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229795AbjDFT4b (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 6 Apr 2023 15:56:31 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2117.outbound.protection.outlook.com [40.107.255.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACA9559DA; Thu, 6 Apr 2023 12:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cKkmi+o8MqEiMj1X1raIGMnqXyMydzsRzVZWyv2VICJ9C8mThvskQmjnF1TyxA7oJ6SZisIwEm3n7FYQZ+XIyiTpiY8jV/aAo7ldVQN50/9S9/42A1JBndnCybaYKPQK98KioYJ5NYHX5oGHfeLMjhCXuIz+Vh49pyopjeKs+h0tsB9njy9QEmNYV3yKMAXlgvtlzAEfb1ObwgRpyz8DylNj7Uh3zKeKZM1D5Q3DRRjjbN5eDza4wZMkpJLBZXJSY8Wry5kAlFFnvaqWL3pSsfNYr9em41g7lWujl6sMVN4Zsaf71JYpVCqRyJq49Mu/QuM7Yx3TJ5YgitV3AO7IyA== 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=xXmQxOot3aCL7XsLFjpzed5PqSudv0GqRFmxBrKacLE=; b=hPzzeeBdRcTC1SQKPmyb+2E30xZOCt4Qtvksj/wjDtMdtt5o7ujyYNQUwPg3KWSJqZJxepUkSrL3QDbZtq03EH7+CBztHwgnFVd8Y9CAOxajVKUWealUojl68n4TbG00rc4KHSuSkL5DwDw2adDGWD51ZNy3GUH4z2pHJDFOT+DXfDCMLHMc6cUUNrJJYSS3unW1leILHPG9WGVAGInwlY4N/b+4YRQo6qeUq+XPQRYOZoe0j4HG+cLNPIQ4KEdD9eCfMvfsQnV9lMWNUeEsAH/Kl2kvCA1KjObdaxTjKSZmXFc2KAn5z6lNAjVTIoB6HikmMThPciPcdycz5sFDYQ== 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=xXmQxOot3aCL7XsLFjpzed5PqSudv0GqRFmxBrKacLE=; b=aysE9ek0AiRPHRI7fopj5dOPKs1Rro66fj4Vr/D91rej6LUUbPLrKsHVIalbc1c/v2jHlf+o2dFvpzS1O6e+dHjESpqlMI+/TllVidqoulmStIfQzxuGPHoXympxMDlVkhXa66DWttH5SJBCD7zAY3hu8TlaM9e04BurWDZGqrdEr38iswfdJItD4kck2Stg+cMEA5SDOMFXa/daOnORcDJa6Zujz0pgUoYAxXEIs9G2kghp9z2NTucrhdNyExaszTDSbsaaKnCyD42r3DD0r4VULWbddWBNlNoDmt+wkmrkvOne+tneL/DKdIUqjtzGjx72QTLqOEv95N6gx6+3tA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB4096.apcprd06.prod.outlook.com (2603:1096:400:2e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.35; Thu, 6 Apr 2023 19:56:24 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::a3a1:af8e:be1e:437c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::a3a1:af8e:be1e:437c%6]) with mapi id 15.20.6277.031; Thu, 6 Apr 2023 19:56:24 +0000 From: Yangtao Li <frank.li@vivo.com> To: Miklos Szeredi <miklos@szeredi.hu> Cc: Yangtao Li <frank.li@vivo.com>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fuse: remove unnecessary goto Date: Fri, 7 Apr 2023 03:56:14 +0800 Message-Id: <20230406195615.80078-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR06CA0011.apcprd06.prod.outlook.com (2603:1096:4:186::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB4096:EE_ X-MS-Office365-Filtering-Correlation-Id: 960a1e1f-7d99-4868-e70e-08db36d90018 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1JGCY2PynznpqEU0ugIa7Pit/VYF7y9b+PgoKJrs+bqlMwMsH2N9kEpJJGrIA44SC+nGOp6MDdppnGrIwX5+glDsSYeSBCXcGSuZBif1QErttjtyTZbpKiJHX1JhipgRFdpriEYO0gk9z1liP8ICg1kItCWxhlsgMbEGDKU5ZRFUf1AlN6V4+FxIorwq6ksgWgZ883Mb1nnb7+VHFlpt8viIU3w7d8oVyXrzH3E6yWyqfcI7k5IAeRnZhJ70RrzB99d0sRHxiks6H/ziStrEucfJNYZaBybTtP3adhQtoutz7zCFcAIM7VSKkQYLOixOGtUdfwDsfsVGvEgvYO2GyfHfQOkVPQjSIv29KqecexHQ/M8+O1HZ9e+z57MJZ3LLDIyjgicqm51CpmWnvD6zq3Foj5cua7i3kqZSoRGGMKeCFTo1+Rv1RN1dCxOa/3QNcLbO6frW2KeCkWEHtAcKSexfa0SzQluVd7fgHHfrQsnh8eV6k9PzmxeBkAvE3MqNla+ECEL1W6n2n+1qWBo1MbB2s1bM8zYzHFBqXBTZ3aJWoAZAWNE7I6uNgvip+9yu4ZcTu8KKtEtnA/KKkmgWnzWzTLZ727szTbmzryffJVkC4WqbjoJc0AQD2s0Ornbg X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(346002)(396003)(136003)(376002)(451199021)(4326008)(6916009)(66946007)(66476007)(66556008)(8676002)(41300700001)(38100700002)(5660300002)(316002)(38350700002)(8936002)(186003)(83380400001)(6486002)(478600001)(6666004)(52116002)(26005)(6506007)(1076003)(6512007)(2616005)(86362001)(2906002)(36756003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8YyNchpEqatLT4+jyWcILgGs/BXnpIEjbXTemiCKEEjcoXkbCuTdHOEGOpZvRUR3950+AzTNRVBPcxCDbwHRlO0vtzj4DThuUAgMHDscT/gKwJZCMWlEAKf7n0DmRwn1xipjPXoe7hXaP09rb0GSxsZyvOkaq8hPhvCnLB5nvuqANYX7x2KImt8xubrWnCMPP8JNNfVf+6giwBzWxQ3StjL/DEJ37SUX88TP101jDXT79dwBnZ03wmb8xdyTVZj7v0IYGUBwu2GkLrX9+jpozrP7fvy2Z4oZe37BgTff8Xnz88ced9OstmX/vISG1dJpV3lpLNttMQuV6Ebrpvm+5jX8kP3Ef87lA6zq3opTRSp5oFBW2LcEH6GsgQx6VC+LjyDeDPfvl482b3l+z/UyuxAPiEzxUYOCzkAz/2Q/eHELfqacwvPrWcVqeq+1ugcvZmh0yNX66SYdMqhafnmxMNheIEsGIwaMujE78JH5Amr8eRBvXh6Nm3Fae0XAEY+IUr/zWmfnIk9N/1CPto2AAPwWR2wYmG5wIIymrB7pz0j/XAsicbEvfoQU4zzZuOibRL1WRi/E3QjAj2pqiXXe+wey2tvLyzDZUa+/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-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2023 19:56:24.2454 (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: caNJ41wheWruP/HYN7YTjdRt5ycbBLiygHbpycYiZVTfjD4iAHMDiYUNv/nSkTeUbTQporybWHj9tjWuKsDFaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB4096 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762458892432420969?= X-GMAIL-MSGID: =?utf-8?q?1762458892432420969?= |
Series |
fuse: remove unnecessary goto
|
|
Commit Message
李扬韬
April 6, 2023, 7:56 p.m. UTC
In this case, the error code can be returned directly.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/fuse/inode.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Comments
On 23/04/07 03:56AM, Yangtao Li wrote: >In this case, the error code can be returned directly. > >Signed-off-by: Yangtao Li <frank.li@vivo.com> >--- > fs/fuse/inode.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > >diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c >index d66070af145d..56efcf160513 100644 >--- a/fs/fuse/inode.c >+++ b/fs/fuse/inode.c >@@ -1921,10 +1921,8 @@ static int fuse_sysfs_init(void) > int err; > > fuse_kobj = kobject_create_and_add("fuse", fs_kobj); >- if (!fuse_kobj) { >- err = -ENOMEM; >- goto out_err; >- } >+ if (!fuse_kobj) >+ return -ENOMEM; > > err = sysfs_create_mount_point(fuse_kobj, "connections"); > if (err) >@@ -1934,7 +1932,6 @@ static int fuse_sysfs_init(void) > > out_fuse_unregister: > kobject_put(fuse_kobj); >- out_err: > return err; > } > >-- >2.35.1 > Reviewed by: Nitesh Shetty <nj.shetty@samsung.com>
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index d66070af145d..56efcf160513 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1921,10 +1921,8 @@ static int fuse_sysfs_init(void) int err; fuse_kobj = kobject_create_and_add("fuse", fs_kobj); - if (!fuse_kobj) { - err = -ENOMEM; - goto out_err; - } + if (!fuse_kobj) + return -ENOMEM; err = sysfs_create_mount_point(fuse_kobj, "connections"); if (err) @@ -1934,7 +1932,6 @@ static int fuse_sysfs_init(void) out_fuse_unregister: kobject_put(fuse_kobj); - out_err: return err; }