Message ID | 20230207233632.4723-1-kunyu@nfschina.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2094317wrn; Sun, 5 Feb 2023 23:14:27 -0800 (PST) X-Google-Smtp-Source: AK7set+88U6klkrTShZoJKElEHzyiNQxk8+vp4IhI7Gl9iPemuTX+p5vj6SJeDOj4/KINDcvzej5 X-Received: by 2002:a05:6402:507:b0:4a2:3606:83ed with SMTP id m7-20020a056402050700b004a2360683edmr19454664edv.22.1675667667555; Sun, 05 Feb 2023 23:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675667667; cv=none; d=google.com; s=arc-20160816; b=xly+c1QFHT7X/zN6x3Mo8Mv7qKEc2SaCgB4V5VemeS6aijhJLvDKB2jl2gDx3cM5sQ yPhvYpLX1J2S3U2oZtO3awb68v1hcUxIzSP/gcs2IBaq3pGSas9SHo+lttOUrKUY5BPR 0MjIJiAJfrO7vMBAUH+rKRjGa5cUzzoSWLZBxnYqwnB3pZO0usZH+SEWYG83vXmy+fb8 TSzNC9WnjzHsQRAAe8NshKO1F7hMaPRj+PwnVFDziT+91Ue0T5GlBewES1waL3i2wItt PibnqbcbWtPP3W6XdvHjUnZu/p4ts97Hs45wCl3q9A9i1PUWPnons7Nuv+M6kaNOzIXQ aviA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=GKQwui4L+jjNfSSfdXVXB0YBfks2Ytj0P/DFhi3Y1Pc=; b=yRJC1rKldj9QP1RHi48S+j3k3gl1mCKYX5Cde+zuWOEgZXg7wu5f0ngnnP/DCfiti+ Q9C5RcLLbiieZNZidVQX3Yi1o069CnwuglFhe3oY2eDFmycn8Hc2NIXqIwwrjFD1XOei OA1KtO3G8Beh1H+fHakuYryX1QYi7u12/V4EJJ5/6r7v/hhkDr/zi0DuMcVZpkhu5pmN m9fjfZWa/x3FJsHAX7q6bfBtpW4RZ31udinfMcJLtRYqHk2JpV/T9FDajg7MlqTJS+7T XIBSKfdIPM6Wy0OWzHEfpdaSVmff8F4N2e9f/GlQUEGDK1qMF/Jiv8IGctWJScoU5Z/O b72Q== ARC-Authentication-Results: i=1; mx.google.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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020aa7df03000000b004a08eb61b71si7699711edy.609.2023.02.05.23.14.04; Sun, 05 Feb 2023 23:14:27 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229916AbjBFHFV (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Mon, 6 Feb 2023 02:05:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229571AbjBFHFU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Feb 2023 02:05:20 -0500 Received: from mail.nfschina.com (unknown [42.101.60.237]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EBFB6582; Sun, 5 Feb 2023 23:05:18 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 64DD81A00A26; Mon, 6 Feb 2023 15:05:46 +0800 (CST) X-Virus-Scanned: amavisd-new at nfschina.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KhHkGqyEvT8U; Mon, 6 Feb 2023 15:05:44 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 6F59C1A00A0A; Mon, 6 Feb 2023 15:05:44 +0800 (CST) From: Li kunyu <kunyu@nfschina.com> To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Li kunyu <kunyu@nfschina.com> Subject: [PATCH] ext4: ialloc: Remove variables defined more than once in a function Date: Wed, 8 Feb 2023 07:36:32 +0800 Message-Id: <20230207233632.4723-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_NONE autolearn=no 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?1757064900532033327?= X-GMAIL-MSGID: =?utf-8?q?1757064900532033327?= |
Series |
ext4: ialloc: Remove variables defined more than once in a function
|
|
Commit Message
Li kunyu
Feb. 7, 2023, 11:36 p.m. UTC
The grp pointer variable has been defined at the beginning of the
function. It is not necessary to define it here, so remove the variable
definition here.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
fs/ext4/ialloc.c | 1 -
1 file changed, 1 deletion(-)
Comments
Li kunyu <kunyu@nfschina.com> writes: > The grp pointer variable has been defined at the beginning of the > function. It is not necessary to define it here, so remove the variable > definition here. > > Signed-off-by: Li kunyu <kunyu@nfschina.com> > --- > fs/ext4/ialloc.c | 1 - > 1 file changed, 1 deletion(-) Looks good to me. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> > > diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c > index 63f9bb6e8851..be9f742f9415 100644 > --- a/fs/ext4/ialloc.c > +++ b/fs/ext4/ialloc.c > @@ -1181,7 +1181,6 @@ struct inode *__ext4_new_inode(struct user_namespace *mnt_userns, > /* Update the relevant bg descriptor fields */ > if (ext4_has_group_desc_csum(sb)) { > int free; > - struct ext4_group_info *grp = NULL; > > if (!(sbi->s_mount_state & EXT4_FC_REPLAY)) { > grp = ext4_get_group_info(sb, group); > -- > 2.18.2
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 63f9bb6e8851..be9f742f9415 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -1181,7 +1181,6 @@ struct inode *__ext4_new_inode(struct user_namespace *mnt_userns, /* Update the relevant bg descriptor fields */ if (ext4_has_group_desc_csum(sb)) { int free; - struct ext4_group_info *grp = NULL; if (!(sbi->s_mount_state & EXT4_FC_REPLAY)) { grp = ext4_get_group_info(sb, group);