提交 fb203751 编写于 作者: L Liu Song 提交者: Theodore Ts'o

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: NLiu Song <liu.song11@zte.com.cn>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
Reviewed-by: NJan Kara <jack@suse.cz>
上级 79a3aaa7
...@@ -132,7 +132,6 @@ void __jbd2_log_wait_for_space(journal_t *journal) ...@@ -132,7 +132,6 @@ void __jbd2_log_wait_for_space(journal_t *journal)
return; return;
} }
spin_lock(&journal->j_list_lock); spin_lock(&journal->j_list_lock);
nblocks = jbd2_space_needed(journal);
space_left = jbd2_log_space_left(journal); space_left = jbd2_log_space_left(journal);
if (space_left < nblocks) { if (space_left < nblocks) {
int chkpt = journal->j_checkpoint_transactions != NULL; int chkpt = journal->j_checkpoint_transactions != NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册