diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-10-18 18:30:42 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2008-01-25 17:46:01 -0500 |
commit | e63aecb651ba73dffc62f9608ee1b7ae2a0ffd4b (patch) | |
tree | 06a4b727230120fe73421dc3149c21aaed5fe91e /fs/ocfs2/inode.c | |
parent | c934a92d05b549dd2f25db72c5fc3cb9dcf1b611 (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/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 8ff201d3705e..00cd5b7f3e52 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -321,7 +321,7 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
321 | */ | 321 | */ |
322 | BUG_ON(le32_to_cpu(fe->i_flags) & OCFS2_SYSTEM_FL); | 322 | BUG_ON(le32_to_cpu(fe->i_flags) & OCFS2_SYSTEM_FL); |
323 | 323 | ||
324 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_meta_lockres, | 324 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres, |
325 | OCFS2_LOCK_TYPE_META, 0, inode); | 325 | OCFS2_LOCK_TYPE_META, 0, inode); |
326 | 326 | ||
327 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres, | 327 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres, |
@@ -409,7 +409,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
409 | if (args->fi_flags & OCFS2_FI_FLAG_SYSFILE) | 409 | if (args->fi_flags & OCFS2_FI_FLAG_SYSFILE) |
410 | generation = osb->fs_generation; | 410 | generation = osb->fs_generation; |
411 | 411 | ||
412 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_meta_lockres, | 412 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres, |
413 | OCFS2_LOCK_TYPE_META, | 413 | OCFS2_LOCK_TYPE_META, |
414 | generation, inode); | 414 | generation, inode); |
415 | 415 | ||
@@ -424,7 +424,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
424 | mlog_errno(status); | 424 | mlog_errno(status); |
425 | return status; | 425 | return status; |
426 | } | 426 | } |
427 | status = ocfs2_meta_lock(inode, NULL, 0); | 427 | status = ocfs2_inode_lock(inode, NULL, 0); |
428 | if (status) { | 428 | if (status) { |
429 | make_bad_inode(inode); | 429 | make_bad_inode(inode); |
430 | mlog_errno(status); | 430 | mlog_errno(status); |
@@ -479,7 +479,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
479 | 479 | ||
480 | bail: | 480 | bail: |
481 | if (can_lock) | 481 | if (can_lock) |
482 | ocfs2_meta_unlock(inode, 0); | 482 | ocfs2_inode_unlock(inode, 0); |
483 | 483 | ||
484 | if (status < 0) | 484 | if (status < 0) |
485 | make_bad_inode(inode); | 485 | make_bad_inode(inode); |
@@ -581,7 +581,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
581 | } | 581 | } |
582 | 582 | ||
583 | mutex_lock(&inode_alloc_inode->i_mutex); | 583 | mutex_lock(&inode_alloc_inode->i_mutex); |
584 | status = ocfs2_meta_lock(inode_alloc_inode, &inode_alloc_bh, 1); | 584 | status = ocfs2_inode_lock(inode_alloc_inode, &inode_alloc_bh, 1); |
585 | if (status < 0) { | 585 | if (status < 0) { |
586 | mutex_unlock(&inode_alloc_inode->i_mutex); | 586 | mutex_unlock(&inode_alloc_inode->i_mutex); |
587 | 587 | ||
@@ -630,7 +630,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
630 | bail_commit: | 630 | bail_commit: |
631 | ocfs2_commit_trans(osb, handle); | 631 | ocfs2_commit_trans(osb, handle); |
632 | bail_unlock: | 632 | bail_unlock: |
633 | ocfs2_meta_unlock(inode_alloc_inode, 1); | 633 | ocfs2_inode_unlock(inode_alloc_inode, 1); |
634 | mutex_unlock(&inode_alloc_inode->i_mutex); | 634 | mutex_unlock(&inode_alloc_inode->i_mutex); |
635 | brelse(inode_alloc_bh); | 635 | brelse(inode_alloc_bh); |
636 | bail: | 636 | bail: |
@@ -704,7 +704,7 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
704 | * delete_inode operation. We do this now to avoid races with | 704 | * delete_inode operation. We do this now to avoid races with |
705 | * recovery completion on other nodes. */ | 705 | * recovery completion on other nodes. */ |
706 | mutex_lock(&orphan_dir_inode->i_mutex); | 706 | mutex_lock(&orphan_dir_inode->i_mutex); |
707 | status = ocfs2_meta_lock(orphan_dir_inode, &orphan_dir_bh, 1); | 707 | status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); |
708 | if (status < 0) { | 708 | if (status < 0) { |
709 | mutex_unlock(&orphan_dir_inode->i_mutex); | 709 | mutex_unlock(&orphan_dir_inode->i_mutex); |
710 | 710 | ||
@@ -728,7 +728,7 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
728 | mlog_errno(status); | 728 | mlog_errno(status); |
729 | 729 | ||
730 | bail_unlock_dir: | 730 | bail_unlock_dir: |
731 | ocfs2_meta_unlock(orphan_dir_inode, 1); | 731 | ocfs2_inode_unlock(orphan_dir_inode, 1); |
732 | mutex_unlock(&orphan_dir_inode->i_mutex); | 732 | mutex_unlock(&orphan_dir_inode->i_mutex); |
733 | brelse(orphan_dir_bh); | 733 | brelse(orphan_dir_bh); |
734 | bail: | 734 | bail: |
@@ -929,7 +929,7 @@ void ocfs2_delete_inode(struct inode *inode) | |||
929 | * allocation lock here as it won't be needed - nobody will | 929 | * allocation lock here as it won't be needed - nobody will |
930 | * have the file open. | 930 | * have the file open. |
931 | */ | 931 | */ |
932 | status = ocfs2_meta_lock(inode, &di_bh, 1); | 932 | status = ocfs2_inode_lock(inode, &di_bh, 1); |
933 | if (status < 0) { | 933 | if (status < 0) { |
934 | if (status != -ENOENT) | 934 | if (status != -ENOENT) |
935 | mlog_errno(status); | 935 | mlog_errno(status); |
@@ -975,7 +975,7 @@ void ocfs2_delete_inode(struct inode *inode) | |||
975 | OCFS2_I(inode)->ip_flags |= OCFS2_INODE_DELETED; | 975 | OCFS2_I(inode)->ip_flags |= OCFS2_INODE_DELETED; |
976 | 976 | ||
977 | bail_unlock_inode: | 977 | bail_unlock_inode: |
978 | ocfs2_meta_unlock(inode, 1); | 978 | ocfs2_inode_unlock(inode, 1); |
979 | brelse(di_bh); | 979 | brelse(di_bh); |
980 | bail_unblock: | 980 | bail_unblock: |
981 | status = sigprocmask(SIG_SETMASK, &oldset, NULL); | 981 | status = sigprocmask(SIG_SETMASK, &oldset, NULL); |
@@ -1009,7 +1009,7 @@ void ocfs2_clear_inode(struct inode *inode) | |||
1009 | /* Do these before all the other work so that we don't bounce | 1009 | /* Do these before all the other work so that we don't bounce |
1010 | * the downconvert thread while waiting to destroy the locks. */ | 1010 | * the downconvert thread while waiting to destroy the locks. */ |
1011 | ocfs2_mark_lockres_freeing(&oi->ip_rw_lockres); | 1011 | ocfs2_mark_lockres_freeing(&oi->ip_rw_lockres); |
1012 | ocfs2_mark_lockres_freeing(&oi->ip_meta_lockres); | 1012 | ocfs2_mark_lockres_freeing(&oi->ip_inode_lockres); |
1013 | ocfs2_mark_lockres_freeing(&oi->ip_open_lockres); | 1013 | ocfs2_mark_lockres_freeing(&oi->ip_open_lockres); |
1014 | 1014 | ||
1015 | /* We very well may get a clear_inode before all an inodes | 1015 | /* We very well may get a clear_inode before all an inodes |
@@ -1032,7 +1032,7 @@ void ocfs2_clear_inode(struct inode *inode) | |||
1032 | mlog_errno(status); | 1032 | mlog_errno(status); |
1033 | 1033 | ||
1034 | ocfs2_lock_res_free(&oi->ip_rw_lockres); | 1034 | ocfs2_lock_res_free(&oi->ip_rw_lockres); |
1035 | ocfs2_lock_res_free(&oi->ip_meta_lockres); | 1035 | ocfs2_lock_res_free(&oi->ip_inode_lockres); |
1036 | ocfs2_lock_res_free(&oi->ip_open_lockres); | 1036 | ocfs2_lock_res_free(&oi->ip_open_lockres); |
1037 | 1037 | ||
1038 | ocfs2_metadata_cache_purge(inode); | 1038 | ocfs2_metadata_cache_purge(inode); |
@@ -1176,15 +1176,15 @@ int ocfs2_inode_revalidate(struct dentry *dentry) | |||
1176 | } | 1176 | } |
1177 | spin_unlock(&OCFS2_I(inode)->ip_lock); | 1177 | spin_unlock(&OCFS2_I(inode)->ip_lock); |
1178 | 1178 | ||
1179 | /* Let ocfs2_meta_lock do the work of updating our struct | 1179 | /* Let ocfs2_inode_lock do the work of updating our struct |
1180 | * inode for us. */ | 1180 | * inode for us. */ |
1181 | status = ocfs2_meta_lock(inode, NULL, 0); | 1181 | status = ocfs2_inode_lock(inode, NULL, 0); |
1182 | if (status < 0) { | 1182 | if (status < 0) { |
1183 | if (status != -ENOENT) | 1183 | if (status != -ENOENT) |
1184 | mlog_errno(status); | 1184 | mlog_errno(status); |
1185 | goto bail; | 1185 | goto bail; |
1186 | } | 1186 | } |
1187 | ocfs2_meta_unlock(inode, 0); | 1187 | ocfs2_inode_unlock(inode, 0); |
1188 | bail: | 1188 | bail: |
1189 | mlog_exit(status); | 1189 | mlog_exit(status); |
1190 | 1190 | ||