[PATCH 1/2] jbd: rename get_transaction to init_transaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



get_transaction() does nothing but initialization. So, rename it and
also fix the comments.

Signed-off-by: Yuanhan Liu <yliu.null@xxxxxxxxx>
---
 fs/jbd/transaction.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index febc10d..82f8a7a 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -31,12 +31,12 @@
 static void __journal_temp_unlink_buffer(struct journal_head *jh);
 
 /*
- * get_transaction: obtain a new transaction_t object.
+ * init_transaction: Initialise a new transaction_t object.
  *
- * Simply allocate and initialise a new transaction.  Create 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).
+ * Simply initialise a new transaction. initialise 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).
  *
  * Preconditions:
  *	The journal MUST be locked.  We don't perform atomic mallocs on the
@@ -46,8 +46,7 @@ static void __journal_temp_unlink_buffer(struct journal_head *jh);
  * Called under j_state_lock
  */
 
-static transaction_t *
-get_transaction(journal_t *journal, transaction_t *transaction)
+static void init_transaction(journal_t *journal, transaction_t *transaction)
 {
 	transaction->t_journal = journal;
 	transaction->t_state = T_RUNNING;
@@ -63,8 +62,6 @@ get_transaction(journal_t *journal, transaction_t *transaction)
 
 	J_ASSERT(journal->j_running_transaction == NULL);
 	journal->j_running_transaction = transaction;
-
-	return transaction;
 }
 
 /*
@@ -137,7 +134,7 @@ repeat_locked:
 			spin_unlock(&journal->j_state_lock);
 			goto alloc_transaction;
 		}
-		get_transaction(journal, new_transaction);
+		init_transaction(journal, new_transaction);
 		new_transaction = NULL;
 	}
 
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux