From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Colin Ian King <colin.i.king@gmail.com>,
Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
ocfs2-devel@oss.oracle.com, akpm <akpm@linux-foundation.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ocfs2: remove redundant assignment to variable free_space
Date: Thu, 13 Jan 2022 10:18:12 +0800 [thread overview]
Message-ID: <dc5c3f04-b13f-6c32-9836-8d9f9783b81f@linux.alibaba.com> (raw)
In-Reply-To: <20220112230411.1090761-1-colin.i.king@gmail.com>
On 1/13/22 7:04 AM, Colin Ian King wrote:
> Variable free_space is being initialized with a value that is not read,
> it is being re-assigned later in the two paths of an if statement. The
> early initialization is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/dir.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index bd8d534f11cb..f2cc1ff29e6d 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -3343,7 +3343,7 @@ static int ocfs2_find_dir_space_id(struct inode *dir, struct buffer_head *di_bh,
> struct ocfs2_dir_entry *de, *last_de = NULL;
> char *de_buf, *limit;
> unsigned long offset = 0;
> - unsigned int rec_len, new_rec_len, free_space = dir->i_sb->s_blocksize;
> + unsigned int rec_len, new_rec_len, free_space;
>
> /*
> * This calculates how many free bytes we'd have in block zero, should
prev parent reply other threads:[~2022-01-13 2:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 23:04 Colin Ian King
2022-01-13 2:18 ` Joseph Qi [this message]
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=dc5c3f04-b13f-6c32-9836-8d9f9783b81f@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=colin.i.king@gmail.com \
--cc=jlbec@evilplan.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@oss.oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®