[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-ext4
Subject: [PATCH 12/19] jbd2: Drop pointless wakeup from jbd2_journal_stop()
From: Jan Kara <jack () suse ! cz>
Date: 2019-09-30 10:43:30
Message-ID: 20190930104339.24919-12-jack () suse ! cz
[Download RAW message or body]
When we drop last handle from a transaction and journal->j_barrier_count
> 0, jbd2_journal_stop() wakes up journal->j_wait_transaction_locked
wait queue. This looks pointless - wait for outstanding handles always
happens on journal->j_wait_updates waitqueue.
journal->j_wait_transaction_locked is used to wait for transaction state
changes and by start_this_handle() for waiting until
journal->j_barrier_count drops to 0. The first case is clearly
irrelevant here since only jbd2 thread changes transaction state. The
second case looks related but jbd2_journal_unlock_updates() is
responsible for the wakeup in this case. So just drop the wakeup.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/jbd2/transaction.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index cd00b20bc692..ece3e97279c2 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1828,11 +1828,8 @@ int jbd2_journal_stop(handle_t *handle)
* once we do this, we must not dereference transaction
* pointer again.
*/
- if (atomic_dec_and_test(&transaction->t_updates)) {
+ if (atomic_dec_and_test(&transaction->t_updates))
wake_up(&journal->j_wait_updates);
- if (journal->j_barrier_count)
- wake_up(&journal->j_wait_transaction_locked);
- }
rwsem_release(&journal->j_trans_commit_map, 1, _THIS_IP_);
--
2.16.4
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic