From: Kevin Hao <[email protected]>

And the transaction->t_handle_lock is also not needed in the new
codes.

Signed-off-by: Kevin Hao <[email protected]>
---
Hi Bruce,

Please help me merge this into the v5.15/standard/base branch.

 fs/jbd2/transaction.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 0ec4d6346653..c2125203ef2d 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -853,15 +853,12 @@ void jbd2_journal_wait_updates(journal_t *journal)
                if (!transaction)
                        break;
 
-               spin_lock(&transaction->t_handle_lock);
                prepare_to_wait(&journal->j_wait_updates, &wait,
                                TASK_UNINTERRUPTIBLE);
                if (!atomic_read(&transaction->t_updates)) {
-                       spin_unlock(&transaction->t_handle_lock);
                        finish_wait(&journal->j_wait_updates, &wait);
                        break;
                }
-               spin_unlock(&transaction->t_handle_lock);
                write_unlock(&journal->j_state_lock);
                schedule();
                finish_wait(&journal->j_wait_updates, &wait);
@@ -897,24 +894,6 @@ void jbd2_journal_lock_updates(journal_t *journal)
        /* Wait until there are no running t_updates */
        jbd2_journal_wait_updates(journal);
 
-=======
-       jbd2_might_wait_for_commit(journal);
-
-       write_lock(&journal->j_state_lock);
-       ++journal->j_barrier_count;
-
-       /* Wait until there are no reserved handles */
-       if (atomic_read(&journal->j_reserved_credits)) {
-               write_unlock(&journal->j_state_lock);
-               wait_event(journal->j_wait_reserved,
-                          atomic_read(&journal->j_reserved_credits) == 0);
-               write_lock(&journal->j_state_lock);
-       }
-
-       /* Wait until there are no running t_updates */
-       jbd2_journal_wait_updates(journal);
-
->>>>>>> v5.15.133
        write_unlock(&journal->j_state_lock);
 
        /*
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13126): 
https://lists.yoctoproject.org/g/linux-yocto/message/13126
Mute This Topic: https://lists.yoctoproject.org/mt/101613894/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to