From: Liu Song Date: Sat, 6 Apr 2019 22:14:17 +0000 (-0400) Subject: jbd2: remove repeated assignments in __jbd2_log_wait_for_space() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fb203751099eecf145317685ee480a51e5b246de;p=linux.git jbd2: remove repeated assignments in __jbd2_log_wait_for_space() 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 Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara --- diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 02e0b79753e70..a1909066bde66 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;