aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Song <fishland@aliyun.com>2019-03-01 00:36:57 -0500
committerTheodore Ts'o <tytso@mit.edu>2019-03-01 00:36:57 -0500
commit0df6f46995a9fc92a6b9e591428e77527dd9609a (patch)
tree02802f1b4279d8e62f7c1d6e16f5f059c659e022
parent6e876c3dd205d30b0db6850e97a03d75457df007 (diff)
jbd2: jbd2_get_transaction does not need to return a value
In jbd2_get_transaction, a new transaction is initialized, and set to the j_running_transaction. No need for a return value, so remove it. Also, adjust some comments to match the actual operation of this function. Signed-off-by: Liu Song <liu.song11@zte.com.cn> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/jbd2/transaction.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index a43b63051355..f940d31c2adc 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -63,7 +63,7 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
63/* 63/*
64 * jbd2_get_transaction: obtain a new transaction_t object. 64 * jbd2_get_transaction: obtain a new transaction_t object.
65 * 65 *
66 * Simply allocate and initialise a new transaction. Create it in 66 * Simply initialise a new transaction. Initialize it in
67 * RUNNING state and add it to the current journal (which should not 67 * RUNNING state and add it to the current journal (which should not
68 * have an existing running transaction: we only make a new transaction 68 * have an existing running transaction: we only make a new transaction
69 * once we have started to commit the old one). 69 * once we have started to commit the old one).
@@ -75,8 +75,8 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
75 * 75 *
76 */ 76 */
77 77
78static transaction_t * 78static void jbd2_get_transaction(journal_t *journal,
79jbd2_get_transaction(journal_t *journal, transaction_t *transaction) 79 transaction_t *transaction)
80{ 80{
81 transaction->t_journal = journal; 81 transaction->t_journal = journal;
82 transaction->t_state = T_RUNNING; 82 transaction->t_state = T_RUNNING;
@@ -100,8 +100,6 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
100 transaction->t_max_wait = 0; 100 transaction->t_max_wait = 0;
101 transaction->t_start = jiffies; 101 transaction->t_start = jiffies;
102 transaction->t_requested = 0; 102 transaction->t_requested = 0;
103
104 return transaction;
105} 103}
106 104
107/* 105/*