diff options
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r-- | fs/ocfs2/journal.c | 9 |
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 | */ |
326 | int ocfs2_extend_trans(struct ocfs2_journal_handle *handle, | 326 | int 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 | } |