From: Jan Kara <jack@suse.cz>
To: Liu Song <fishland@aliyun.com>
Cc: tytso@mit.edu, jack@suse.com, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, liu.song11@zte.com.cn
Subject: Re: [PATCH] jbd2: remove repeated assignments in __jbd2_log_wait_for_space
Date: Wed, 27 Mar 2019 17:25:35 +0100 [thread overview]
Message-ID: <20190327162535.GA6742@quack2.suse.cz> (raw)
In-Reply-To: <20190327143135.2784-1-fishland@aliyun.com>
On Wed 27-03-19 22:31:35, Liu Song wrote:
> From: Liu Song <liu.song11@zte.com.cn>
>
> At the beginning, nblocks has been assigned. There is no need
> to repeat the assignment in the while loop, and remove it.
>
> Signed-off-by: Liu Song <liu.song11@zte.com.cn>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/jbd2/checkpoint.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c
> index 26f8d7e46462..23053de5e999 100644
> --- a/fs/jbd2/checkpoint.c
> +++ b/fs/jbd2/checkpoint.c
> @@ -132,7 +132,6 @@ void __jbd2_log_wait_for_space(journal_t *journal)
> return;
> }
> spin_lock(&journal->j_list_lock);
> - nblocks = jbd2_space_needed(journal);
> space_left = jbd2_log_space_left(journal);
> if (space_left < nblocks) {
> int chkpt = journal->j_checkpoint_transactions != NULL;
> --
> 2.19.1
>
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
parent reply other threads:[~2019-03-27 16:25 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20190327143135.2784-1-fishland@aliyun.com>]
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=20190327162535.GA6742@quack2.suse.cz \
--to=jack@suse.cz \
--cc=fishland@aliyun.com \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liu.song11@zte.com.cn \
--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 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®