summaryrefslogtreecommitdiffstats
path: root/fs/jbd2/transaction.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2013-06-12 22:24:07 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-06-12 22:24:07 -0400
commit9ff864462477206bc23b405a6ae506e92fb6dc9c (patch)
tree9d040520569d8943c33b29e310d5f6e6ccb7a7c1 /fs/jbd2/transaction.c
parent981250ca89261f98bdfd2d6be1fcccb96cbbc00d (diff)
downloadblackbird-op-linux-9ff864462477206bc23b405a6ae506e92fb6dc9c.tar.gz
blackbird-op-linux-9ff864462477206bc23b405a6ae506e92fb6dc9c.zip
jbd2: optimize jbd2_journal_force_commit
Current implementation of jbd2_journal_force_commit() is suboptimal because result in empty and useless commits. But callers just want to force and wait any unfinished commits. We already have jbd2_journal_force_commit_nested() which does exactly what we want, except we are guaranteed that we do not hold journal transaction open. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2/transaction.c')
-rw-r--r--fs/jbd2/transaction.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index f33342a2a95e..dd422e680418 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1661,29 +1661,6 @@ int jbd2_journal_stop(handle_t *handle)
return err;
}
-/**
- * int jbd2_journal_force_commit() - force any uncommitted transactions
- * @journal: journal to force
- *
- * For synchronous operations: force any uncommitted transactions
- * to disk. May seem kludgy, but it reuses all the handle batching
- * code in a very simple manner.
- */
-int jbd2_journal_force_commit(journal_t *journal)
-{
- handle_t *handle;
- int ret;
-
- handle = jbd2_journal_start(journal, 1);
- if (IS_ERR(handle)) {
- ret = PTR_ERR(handle);
- } else {
- handle->h_sync = 1;
- ret = jbd2_journal_stop(handle);
- }
- return ret;
-}
-
/*
*
* List management code snippets: various functions for manipulating the
OpenPOWER on IntegriCloud