Skip to content

Commit

Permalink
jbd2: remove repeated assignments in __jbd2_log_wait_for_space()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Song authored and Theodore Ts'o committed Apr 6, 2019
1 parent 79a3aaa commit fb20375
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/jbd2/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fb20375

Please sign in to comment.