Skip to content

Commit

Permalink
jbd2: jbd2_get_transaction does not need to return a value
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
  • Loading branch information
Liu Song authored and tytso committed Mar 1, 2019
1 parent 6e876c3 commit 0df6f46
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
/*
* 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
* have an existing running transaction: we only make a new transaction
* once we have started to commit the old one).
Expand All @@ -75,8 +75,8 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
*
*/

static transaction_t *
jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
static void jbd2_get_transaction(journal_t *journal,
transaction_t *transaction)
{
transaction->t_journal = journal;
transaction->t_state = T_RUNNING;
Expand All @@ -100,8 +100,6 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
transaction->t_max_wait = 0;
transaction->t_start = jiffies;
transaction->t_requested = 0;

return transaction;
}

/*
Expand Down

0 comments on commit 0df6f46

Please sign in to comment.