[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20101007125015.3040dcc6@absol.kitzblitz>
Date: Thu, 7 Oct 2010 12:50:15 +0200
From: Nicolas Kaiser <nikai@...ai.net>
To: reiserfs-devel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] reiserfs: simplify conditional
Simplify:
((!a && b) || (!a && c) || (!a && d) || (!a && e)) =>
(!a && (b || c || d || e))
Signed-off-by: Nicolas Kaiser <nikai@...ai.net>
---
fs/reiserfs/journal.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 076c8b1..7fa0814 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -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 */
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists