From: Yuanhan Liu <yliu.null@gmail.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Yuanhan Liu <yliu.null@gmail.com>
Subject: [PATCH 2/2] jbd2: retname jbd2_get_transaction to jbd2_init_transaction
Date: Mon, 25 Jun 2012 17:08:08 +0800 [thread overview]
Message-ID: <1340615288-24016-1-git-send-email-yliu.null@gmail.com> (raw)
jbd2_get_transaction() does nothing but initialization. So, rename it
and also fix the comments.
Signed-off-by: Yuanhan Liu <yliu.null@gmail.com>
---
fs/jbd2/transaction.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index fb1ab953..4f8b1a0 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -63,12 +63,12 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
}
/*
- * jbd2_get_transaction: obtain a new transaction_t object.
+ * jbd2_init_transaction: Initialize 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. 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).
*
* Preconditions:
* The journal MUST be locked. We don't perform atomic mallocs on the
@@ -77,8 +77,8 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
*
*/
-static transaction_t *
-jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
+static void
+jbd2_init_transaction(journal_t *journal, transaction_t *transaction)
{
transaction->t_journal = journal;
transaction->t_state = T_RUNNING;
@@ -100,8 +100,6 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
journal->j_running_transaction = transaction;
transaction->t_max_wait = 0;
transaction->t_start = jiffies;
reply other threads:[~2012-06-25 9:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340615288-24016-1-git-send-email-yliu.null@gmail.com \
--to=yliu.null@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).