reiserfs: simplify conditional
PATCH 1/1 reiserfs: simplify conditional
Simplify:
((!a && b) || (!a && c) || (!a && d) || (!a && e)) => (!a && (b || c || d || e))
Signed-off-by Nicolas Kaiser <[email protected]>
--- fs/reiserfs/journal.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-)
fs/reiserfs/journal.c +8 -9
@@ -3055,15 +3055,14 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,** we don't sleep if there aren't other writers */ -if ((!join && journal->j_must_wait >0 ) || - (!join - && (journal->j_len_alloc + nblocks +2 ) >= journal->j_max_batch) - || (!join &&atomic_read (&journal->j_wcount) >0 - && journal->j_trans_start_time >0 - && (now - journal->j_trans_start_time) > - journal->j_max_trans_age) || (!join - &&atomic_read (&journal->j_jlock)) - || (!join && journal->j_cnode_free < (journal->j_trans_max *3 ))) { +if (!join && + ((journal->j_must_wait >0 ) || + ((journal->j_len_alloc + nblocks +2 ) >= journal->j_max_batch) || + (atomic_read (&journal->j_wcount) >0 && + journal->j_trans_start_time >0 && + (now - journal->j_trans_start_time) > journal->j_max_trans_age) || + (atomic_read (&journal->j_jlock)) || + (journal->j_cnode_free < (journal->j_trans_max *3 )))) { old_trans_id = journal->j_trans_id;unlock_journal (sb);/* allow others to finish this transaction */
Signature · 1 line
1.7.2.2