All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tian Tao <tiantao6@hisilicon.com>
To: <tytso@mit.edu>, <adilger.kernel@dilger.ca>
Cc: <linux-ext4@vger.kernel.org>, Tian Tao <tiantao6@hisilicon.com>
Subject: [PATCH] ext4: remove set but rewrite variables
Date: Mon, 17 May 2021 10:56:05 +0800	[thread overview]
Message-ID: <1621220165-11849-1-git-send-email-tiantao6@hisilicon.com> (raw)

In line 2500 of the ext4_dx_add_entry function, the at variable is
assigned but not used, and it is reassigned in line 2449, so delete
the assignment of the at variable in line 2500.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 fs/ext4/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index afb9d05..18bbf15 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2497,7 +2497,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
 
 			/* Which index block gets the new entry? */
 			if (at - entries >= icount1) {
-				frame->at = at = at - entries - icount1 + entries2;
+				frame->at = at - entries - icount1 + entries2;
 				frame->entries = entries = entries2;
 				swap(frame->bh, bh2);
 			}
-- 
2.7.4


             reply	other threads:[~2021-05-17  2:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  2:56 Tian Tao [this message]
2021-05-17  8:05 ` [PATCH] ext4: remove set but rewrite variables Благодаренко Артём
2021-05-17  8:44   ` tiantao (H)
2021-05-17  9:18     ` Благодаренко Артём

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1621220165-11849-1-git-send-email-tiantao6@hisilicon.com \
    --to=tiantao6@hisilicon.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.