Commit 0df6f469 authored by Liu Song's avatar Liu Song Committed by Theodore Ts'o

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: default avatarLiu Song <liu.song11@zte.com.cn>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
parent 6e876c3d
...@@ -63,7 +63,7 @@ void jbd2_journal_free_transaction(transaction_t *transaction) ...@@ -63,7 +63,7 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
/* /*
* jbd2_get_transaction: obtain a new transaction_t object. * jbd2_get_transaction: obtain a new transaction_t object.
* *
* Simply allocate and initialise a new transaction. Create it in * Simply initialise a new transaction. Initialize it in
* RUNNING state and add it to the current journal (which should not * RUNNING state and add it to the current journal (which should not
* have an existing running transaction: we only make a new transaction * have an existing running transaction: we only make a new transaction
* once we have started to commit the old one). * once we have started to commit the old one).
...@@ -75,8 +75,8 @@ void jbd2_journal_free_transaction(transaction_t *transaction) ...@@ -75,8 +75,8 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
* *
*/ */
static transaction_t * static void jbd2_get_transaction(journal_t *journal,
jbd2_get_transaction(journal_t *journal, transaction_t *transaction) transaction_t *transaction)
{ {
transaction->t_journal = journal; transaction->t_journal = journal;
transaction->t_state = T_RUNNING; transaction->t_state = T_RUNNING;
...@@ -100,8 +100,6 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction) ...@@ -100,8 +100,6 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
transaction->t_max_wait = 0; transaction->t_max_wait = 0;
transaction->t_start = jiffies; transaction->t_start = jiffies;
transaction->t_requested = 0; transaction->t_requested = 0;
return transaction;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment