]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
jbd2: remove repeated assignments in __jbd2_log_wait_for_space()
authorLiu Song <liu.song11@zte.com.cn>
Sat, 6 Apr 2019 22:14:17 +0000 (18:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 6 Apr 2019 22:14:17 +0000 (18:14 -0400)
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/jbd2/checkpoint.c

index 02e0b79753e7068e9b4bb896f8b1f0ddfe972ef2..a1909066bde663d798932ace0f0c71e2002adfe8 100644 (file)
@@ -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;