From: Alexandru Moise <00moses.alexander00@gmail.com>
To: tytso@mit.edu
Cc: jack@suse.com, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] jbd2: redefine jbd2_get_transaction to jbd2_init_transaction
Date: Fri, 13 Nov 2015 00:27:56 +0200 [thread overview]
Message-ID: <20151112222756.GA668@gmail.com> (raw)
This patch follows the same logic of a 2012 patch to jbd
(prior to ext3 removal). Yuanhan Liu renamed the jbd
get_transaction() function to init_transaction(), as the function
was as an initialization function, as it is mostly in our case.
Also remove the return value as it is unused.
Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
Reviewed-by: Jan Kara <jack@suse.com>
---
fs/jbd2/transaction.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 89463ee..3fd597b 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -65,7 +65,7 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
}
/*
- * jbd2_get_transaction: obtain a new transaction_t object.
+ * jbd2_init_transaction: obtain 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
@@ -79,8 +79,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;
@@ -104,8 +104,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;
}
/*
@@ -343,7 +341,7 @@ repeat:
write_lock(&journal->j_state_lock);
if (!journal->j_running_transaction &&
(handle->h_reserved || !journal->j_barrier_count)) {
- jbd2_get_transaction(journal, new_transaction);
+ jbd2_init_transaction(journal, new_transaction);
new_transaction = NULL;
}
write_unlock(&journal->j_state_lock);
--
2.6.2
next reply other threads:[~2015-11-12 22:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 22:27 Alexandru Moise [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-12 20:25 [PATCH] jbd2: redefine jbd2_get_transaction to jbd2_init_transaction Alexandru Moise
2015-11-12 21:27 ` Jan Kara
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=20151112222756.GA668@gmail.com \
--to=00moses.alexander00@gmail.com \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@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