Skip to content

Commit 0df6f46

Browse files
Liu Songtytso
authored andcommitted
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>
1 parent 6e876c3 commit 0df6f46

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

fs/jbd2/transaction.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
6363
/*
6464
* jbd2_get_transaction: obtain a new transaction_t object.
6565
*
66-
* Simply allocate and initialise a new transaction. Create it in
66+
* Simply initialise a new transaction. Initialize it in
6767
* RUNNING state and add it to the current journal (which should not
6868
* have an existing running transaction: we only make a new transaction
6969
* once we have started to commit the old one).
@@ -75,8 +75,8 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
7575
*
7676
*/
7777

78-
static transaction_t *
79-
jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
78+
static void jbd2_get_transaction(journal_t *journal,
79+
transaction_t *transaction)
8080
{
8181
transaction->t_journal = journal;
8282
transaction->t_state = T_RUNNING;
@@ -100,8 +100,6 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
100100
transaction->t_max_wait = 0;
101101
transaction->t_start = jiffies;
102102
transaction->t_requested = 0;
103-
104-
return transaction;
105103
}
106104

107105
/*

0 commit comments

Comments
 (0)