aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2007-10-18 18:30:42 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2008-01-25 17:46:01 -0500
commite63aecb651ba73dffc62f9608ee1b7ae2a0ffd4b (patch)
tree06a4b727230120fe73421dc3149c21aaed5fe91e /fs/ocfs2/journal.c
parentc934a92d05b549dd2f25db72c5fc3cb9dcf1b611 (diff)
ocfs2: Rename ocfs2_meta_[un]lock
Call this the "inode_lock" now, since it covers both data and meta data. This patch makes no functional changes. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index f2ebe2eb3c21..4f440a88bf53 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -336,7 +336,7 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
336 struct ocfs2_dinode *di = NULL; 336 struct ocfs2_dinode *di = NULL;
337 struct buffer_head *bh = NULL; 337 struct buffer_head *bh = NULL;
338 struct ocfs2_super *osb; 338 struct ocfs2_super *osb;
339 int meta_lock = 0; 339 int inode_lock = 0;
340 340
341 mlog_entry_void(); 341 mlog_entry_void();
342 342
@@ -366,14 +366,14 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
366 /* Skip recovery waits here - journal inode metadata never 366 /* Skip recovery waits here - journal inode metadata never
367 * changes in a live cluster so it can be considered an 367 * changes in a live cluster so it can be considered an
368 * exception to the rule. */ 368 * exception to the rule. */
369 status = ocfs2_meta_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY); 369 status = ocfs2_inode_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY);
370 if (status < 0) { 370 if (status < 0) {
371 if (status != -ERESTARTSYS) 371 if (status != -ERESTARTSYS)
372 mlog(ML_ERROR, "Could not get lock on journal!\n"); 372 mlog(ML_ERROR, "Could not get lock on journal!\n");
373 goto done; 373 goto done;
374 } 374 }
375 375
376 meta_lock = 1; 376 inode_lock = 1;
377 di = (struct ocfs2_dinode *)bh->b_data; 377 di = (struct ocfs2_dinode *)bh->b_data;
378 378
379 if (inode->i_size < OCFS2_MIN_JOURNAL_SIZE) { 379 if (inode->i_size < OCFS2_MIN_JOURNAL_SIZE) {
@@ -413,8 +413,8 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
413 status = 0; 413 status = 0;
414done: 414done:
415 if (status < 0) { 415 if (status < 0) {
416 if (meta_lock) 416 if (inode_lock)
417 ocfs2_meta_unlock(inode, 1); 417 ocfs2_inode_unlock(inode, 1);
418 if (bh != NULL) 418 if (bh != NULL)
419 brelse(bh); 419 brelse(bh);
420 if (inode) { 420 if (inode) {
@@ -543,7 +543,7 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb)
543 OCFS2_I(inode)->ip_open_count--; 543 OCFS2_I(inode)->ip_open_count--;
544 544
545 /* unlock our journal */ 545 /* unlock our journal */
546 ocfs2_meta_unlock(inode, 1); 546 ocfs2_inode_unlock(inode, 1);
547 547
548 brelse(journal->j_bh); 548 brelse(journal->j_bh);
549 journal->j_bh = NULL; 549 journal->j_bh = NULL;
@@ -972,9 +972,9 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
972 } 972 }
973 SET_INODE_JOURNAL(inode); 973 SET_INODE_JOURNAL(inode);
974 974
975 status = ocfs2_meta_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY); 975 status = ocfs2_inode_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY);
976 if (status < 0) { 976 if (status < 0) {
977 mlog(0, "status returned from ocfs2_meta_lock=%d\n", status); 977 mlog(0, "status returned from ocfs2_inode_lock=%d\n", status);
978 if (status != -ERESTARTSYS) 978 if (status != -ERESTARTSYS)
979 mlog(ML_ERROR, "Could not lock journal!\n"); 979 mlog(ML_ERROR, "Could not lock journal!\n");
980 goto done; 980 goto done;
@@ -1046,7 +1046,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
1046done: 1046done:
1047 /* drop the lock on this nodes journal */ 1047 /* drop the lock on this nodes journal */
1048 if (got_lock) 1048 if (got_lock)
1049 ocfs2_meta_unlock(inode, 1); 1049 ocfs2_inode_unlock(inode, 1);
1050 1050
1051 if (inode) 1051 if (inode)
1052 iput(inode); 1052 iput(inode);
@@ -1161,14 +1161,14 @@ static int ocfs2_trylock_journal(struct ocfs2_super *osb,
1161 SET_INODE_JOURNAL(inode); 1161 SET_INODE_JOURNAL(inode);
1162 1162
1163 flags = OCFS2_META_LOCK_RECOVERY | OCFS2_META_LOCK_NOQUEUE; 1163 flags = OCFS2_META_LOCK_RECOVERY | OCFS2_META_LOCK_NOQUEUE;
1164 status = ocfs2_meta_lock_full(inode, NULL, 1, flags); 1164 status = ocfs2_inode_lock_full(inode, NULL, 1, flags);
1165 if (status < 0) { 1165 if (status < 0) {
1166 if (status != -EAGAIN) 1166 if (status != -EAGAIN)
1167 mlog_errno(status); 1167 mlog_errno(status);
1168 goto bail; 1168 goto bail;
1169 } 1169 }
1170 1170
1171 ocfs2_meta_unlock(inode, 1); 1171 ocfs2_inode_unlock(inode, 1);
1172bail: 1172bail:
1173 if (inode) 1173 if (inode)
1174 iput(inode); 1174 iput(inode);
@@ -1276,7 +1276,7 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
1276 } 1276 }
1277 1277
1278 mutex_lock(&orphan_dir_inode->i_mutex); 1278 mutex_lock(&orphan_dir_inode->i_mutex);
1279 status = ocfs2_meta_lock(orphan_dir_inode, NULL, 0); 1279 status = ocfs2_inode_lock(orphan_dir_inode, NULL, 0);
1280 if (status < 0) { 1280 if (status < 0) {
1281 mlog_errno(status); 1281 mlog_errno(status);
1282 goto out; 1282 goto out;
@@ -1292,7 +1292,7 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
1292 *head = priv.head; 1292 *head = priv.head;
1293 1293
1294out_cluster: 1294out_cluster:
1295 ocfs2_meta_unlock(orphan_dir_inode, 0); 1295 ocfs2_inode_unlock(orphan_dir_inode, 0);
1296out: 1296out:
1297 mutex_unlock(&orphan_dir_inode->i_mutex); 1297 mutex_unlock(&orphan_dir_inode->i_mutex);
1298 iput(orphan_dir_inode); 1298 iput(orphan_dir_inode);