aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-10-05 17:15:36 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-12-01 21:27:04 -0500
commit1fc581467e52546195c7ee8233a34d63c1cc1322 (patch)
tree7aa909dfd9f48c29c7e086aa6c929c8444b461a8 /fs/ocfs2/journal.c
parent01ddf1e186b3b12b38c9e44912e0fd6a1cbc882b (diff)
ocfs2: have ocfs2_extend_trans() take handle_t
No reason to use our wrapper struct in this function, so take the handle_t directly. Also fixes a bug where we were incorrectly setting the handle to NULL in case of a failure from journal_restart() Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index e26cd0ca5176..7c0c57ad517b 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -323,20 +323,18 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle)
323 * good because transaction ids haven't yet been recorded on the 323 * good because transaction ids haven't yet been recorded on the
324 * cluster locks associated with this handle. 324 * cluster locks associated with this handle.
325 */ 325 */
326int ocfs2_extend_trans(struct ocfs2_journal_handle *handle, 326int ocfs2_extend_trans(handle_t *handle, int nblocks)
327 int nblocks)
328{ 327{
329 int status; 328 int status;
330 329
331 BUG_ON(!handle); 330 BUG_ON(!handle);
332 BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED));
333 BUG_ON(!nblocks); 331 BUG_ON(!nblocks);
334 332
335 mlog_entry_void(); 333 mlog_entry_void();
336 334
337 mlog(0, "Trying to extend transaction by %d blocks\n", nblocks); 335 mlog(0, "Trying to extend transaction by %d blocks\n", nblocks);
338 336
339 status = journal_extend(handle->k_handle, nblocks); 337 status = journal_extend(handle, nblocks);
340 if (status < 0) { 338 if (status < 0) {
341 mlog_errno(status); 339 mlog_errno(status);
342 goto bail; 340 goto bail;
@@ -344,9 +342,8 @@ int ocfs2_extend_trans(struct ocfs2_journal_handle *handle,
344 342
345 if (status > 0) { 343 if (status > 0) {
346 mlog(0, "journal_extend failed, trying journal_restart\n"); 344 mlog(0, "journal_extend failed, trying journal_restart\n");
347 status = journal_restart(handle->k_handle, nblocks); 345 status = journal_restart(handle, nblocks);
348 if (status < 0) { 346 if (status < 0) {
349 handle->k_handle = NULL;
350 mlog_errno(status); 347 mlog_errno(status);
351 goto bail; 348 goto bail;
352 } 349 }