From 3c5adf12a7a027385d9aee9ca362c87304c12bf5 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Thu, 5 Oct 2006 14:15:36 -0700 Subject: [PATCH] --- yaml --- r: 42367 b: refs/heads/master c: 1fc581467e52546195c7ee8233a34d63c1cc1322 h: refs/heads/master i: 42365: 3c3dfdf5654a531b5bcc81fed252e72ec8526177 42363: 5d9884d03167051cff13a3a332aa70463015213c 42359: 60163834e54f8cce9c30d49b85eed239fd89a32f 42351: cf58c17c6a84872fb655017ec1363a9acb528be6 42335: 966223679b7c8d4e194feb65cf8ec2a66afb35b7 42303: 23e04b2d6fa1b663c4f36dd4ad8cdc59faed016b 42239: 7e3b0397eec3a76c5a7eed51167171d6384cfba0 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/alloc.c | 2 +- trunk/fs/ocfs2/file.c | 2 +- trunk/fs/ocfs2/journal.c | 9 +++------ trunk/fs/ocfs2/journal.h | 3 +-- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 83eb9279d47e..37a88ad6de4c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 01ddf1e186b3b12b38c9e44912e0fd6a1cbc882b +refs/heads/master: 1fc581467e52546195c7ee8233a34d63c1cc1322 diff --git a/trunk/fs/ocfs2/alloc.c b/trunk/fs/ocfs2/alloc.c index f43bc5f18a35..74b93f924296 100644 --- a/trunk/fs/ocfs2/alloc.c +++ b/trunk/fs/ocfs2/alloc.c @@ -1074,7 +1074,7 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb, /* TODO: Perhaps we can calculate the bulk of the * credits up front rather than extending like * this. */ - status = ocfs2_extend_trans(handle, + status = ocfs2_extend_trans(handle->k_handle, OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC); if (status < 0) { mlog_errno(status); diff --git a/trunk/fs/ocfs2/file.c b/trunk/fs/ocfs2/file.c index 1be74c4e7814..d8bd2c32f08a 100644 --- a/trunk/fs/ocfs2/file.c +++ b/trunk/fs/ocfs2/file.c @@ -566,7 +566,7 @@ static int ocfs2_extend_allocation(struct inode *inode, credits = ocfs2_calc_extend_credits(osb->sb, fe, clusters_to_add); - status = ocfs2_extend_trans(handle, credits); + status = ocfs2_extend_trans(handle->k_handle, credits); if (status < 0) { /* handle still has to be committed at * this point. */ diff --git a/trunk/fs/ocfs2/journal.c b/trunk/fs/ocfs2/journal.c index e26cd0ca5176..7c0c57ad517b 100644 --- a/trunk/fs/ocfs2/journal.c +++ b/trunk/fs/ocfs2/journal.c @@ -323,20 +323,18 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle) * good because transaction ids haven't yet been recorded on the * cluster locks associated with this handle. */ -int ocfs2_extend_trans(struct ocfs2_journal_handle *handle, - int nblocks) +int ocfs2_extend_trans(handle_t *handle, int nblocks) { int status; BUG_ON(!handle); - BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED)); BUG_ON(!nblocks); mlog_entry_void(); mlog(0, "Trying to extend transaction by %d blocks\n", nblocks); - status = journal_extend(handle->k_handle, nblocks); + status = journal_extend(handle, nblocks); if (status < 0) { mlog_errno(status); goto bail; @@ -344,9 +342,8 @@ int ocfs2_extend_trans(struct ocfs2_journal_handle *handle, if (status > 0) { mlog(0, "journal_extend failed, trying journal_restart\n"); - status = journal_restart(handle->k_handle, nblocks); + status = journal_restart(handle, nblocks); if (status < 0) { - handle->k_handle = NULL; mlog_errno(status); goto bail; } diff --git a/trunk/fs/ocfs2/journal.h b/trunk/fs/ocfs2/journal.h index 35ae835e9698..9f3d79dac33b 100644 --- a/trunk/fs/ocfs2/journal.h +++ b/trunk/fs/ocfs2/journal.h @@ -264,8 +264,7 @@ struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, struct ocfs2_journal_handle *handle, int max_buffs); void ocfs2_commit_trans(struct ocfs2_journal_handle *handle); -int ocfs2_extend_trans(struct ocfs2_journal_handle *handle, - int nblocks); +int ocfs2_extend_trans(handle_t *handle, int nblocks); /* * Create access is for when we get a newly created buffer and we're