diff options
Diffstat (limited to 'fs/ocfs2/inode.c')
| -rw-r--r-- | fs/ocfs2/inode.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 16e8e74dc966..42e361f3054f 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
| @@ -360,7 +360,6 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
| 360 | inode); | 360 | inode); |
| 361 | 361 | ||
| 362 | ocfs2_set_inode_flags(inode); | 362 | ocfs2_set_inode_flags(inode); |
| 363 | inode->i_flags |= S_NOATIME; | ||
| 364 | 363 | ||
| 365 | status = 0; | 364 | status = 0; |
| 366 | bail: | 365 | bail: |
| @@ -441,7 +440,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
| 441 | generation, inode); | 440 | generation, inode); |
| 442 | 441 | ||
| 443 | if (can_lock) { | 442 | if (can_lock) { |
| 444 | status = ocfs2_meta_lock(inode, NULL, NULL, 0); | 443 | status = ocfs2_meta_lock(inode, NULL, 0); |
| 445 | if (status) { | 444 | if (status) { |
| 446 | make_bad_inode(inode); | 445 | make_bad_inode(inode); |
| 447 | mlog_errno(status); | 446 | mlog_errno(status); |
| @@ -512,7 +511,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
| 512 | struct buffer_head *fe_bh) | 511 | struct buffer_head *fe_bh) |
| 513 | { | 512 | { |
| 514 | int status = 0; | 513 | int status = 0; |
| 515 | struct ocfs2_journal_handle *handle = NULL; | 514 | handle_t *handle = NULL; |
| 516 | struct ocfs2_truncate_context *tc = NULL; | 515 | struct ocfs2_truncate_context *tc = NULL; |
| 517 | struct ocfs2_dinode *fe; | 516 | struct ocfs2_dinode *fe; |
| 518 | 517 | ||
| @@ -524,7 +523,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
| 524 | if (!fe->i_clusters) | 523 | if (!fe->i_clusters) |
| 525 | goto bail; | 524 | goto bail; |
| 526 | 525 | ||
| 527 | handle = ocfs2_start_trans(osb, handle, OCFS2_INODE_UPDATE_CREDITS); | 526 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); |
| 528 | if (IS_ERR(handle)) { | 527 | if (IS_ERR(handle)) { |
| 529 | status = PTR_ERR(handle); | 528 | status = PTR_ERR(handle); |
| 530 | handle = NULL; | 529 | handle = NULL; |
| @@ -538,7 +537,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
| 538 | goto bail; | 537 | goto bail; |
| 539 | } | 538 | } |
| 540 | 539 | ||
| 541 | ocfs2_commit_trans(handle); | 540 | ocfs2_commit_trans(osb, handle); |
| 542 | handle = NULL; | 541 | handle = NULL; |
| 543 | 542 | ||
| 544 | status = ocfs2_prepare_truncate(osb, inode, fe_bh, &tc); | 543 | status = ocfs2_prepare_truncate(osb, inode, fe_bh, &tc); |
| @@ -554,7 +553,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
| 554 | } | 553 | } |
| 555 | bail: | 554 | bail: |
| 556 | if (handle) | 555 | if (handle) |
| 557 | ocfs2_commit_trans(handle); | 556 | ocfs2_commit_trans(osb, handle); |
| 558 | 557 | ||
| 559 | mlog_exit(status); | 558 | mlog_exit(status); |
| 560 | return status; | 559 | return status; |
| @@ -568,7 +567,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
| 568 | int status; | 567 | int status; |
| 569 | struct inode *inode_alloc_inode = NULL; | 568 | struct inode *inode_alloc_inode = NULL; |
| 570 | struct buffer_head *inode_alloc_bh = NULL; | 569 | struct buffer_head *inode_alloc_bh = NULL; |
| 571 | struct ocfs2_journal_handle *handle; | 570 | handle_t *handle; |
| 572 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 571 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
| 573 | struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; | 572 | struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; |
| 574 | 573 | ||
| @@ -582,7 +581,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
| 582 | } | 581 | } |
| 583 | 582 | ||
| 584 | mutex_lock(&inode_alloc_inode->i_mutex); | 583 | mutex_lock(&inode_alloc_inode->i_mutex); |
| 585 | status = ocfs2_meta_lock(inode_alloc_inode, NULL, &inode_alloc_bh, 1); | 584 | status = ocfs2_meta_lock(inode_alloc_inode, &inode_alloc_bh, 1); |
| 586 | if (status < 0) { | 585 | if (status < 0) { |
| 587 | mutex_unlock(&inode_alloc_inode->i_mutex); | 586 | mutex_unlock(&inode_alloc_inode->i_mutex); |
| 588 | 587 | ||
| @@ -590,7 +589,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
| 590 | goto bail; | 589 | goto bail; |
| 591 | } | 590 | } |
| 592 | 591 | ||
| 593 | handle = ocfs2_start_trans(osb, NULL, OCFS2_DELETE_INODE_CREDITS); | 592 | handle = ocfs2_start_trans(osb, OCFS2_DELETE_INODE_CREDITS); |
| 594 | if (IS_ERR(handle)) { | 593 | if (IS_ERR(handle)) { |
| 595 | status = PTR_ERR(handle); | 594 | status = PTR_ERR(handle); |
| 596 | mlog_errno(status); | 595 | mlog_errno(status); |
| @@ -629,7 +628,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
| 629 | mlog_errno(status); | 628 | mlog_errno(status); |
| 630 | 629 | ||
| 631 | bail_commit: | 630 | bail_commit: |
| 632 | ocfs2_commit_trans(handle); | 631 | ocfs2_commit_trans(osb, handle); |
| 633 | bail_unlock: | 632 | bail_unlock: |
| 634 | ocfs2_meta_unlock(inode_alloc_inode, 1); | 633 | ocfs2_meta_unlock(inode_alloc_inode, 1); |
| 635 | mutex_unlock(&inode_alloc_inode->i_mutex); | 634 | mutex_unlock(&inode_alloc_inode->i_mutex); |
| @@ -705,7 +704,7 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
| 705 | * delete_inode operation. We do this now to avoid races with | 704 | * delete_inode operation. We do this now to avoid races with |
| 706 | * recovery completion on other nodes. */ | 705 | * recovery completion on other nodes. */ |
| 707 | mutex_lock(&orphan_dir_inode->i_mutex); | 706 | mutex_lock(&orphan_dir_inode->i_mutex); |
| 708 | status = ocfs2_meta_lock(orphan_dir_inode, NULL, &orphan_dir_bh, 1); | 707 | status = ocfs2_meta_lock(orphan_dir_inode, &orphan_dir_bh, 1); |
| 709 | if (status < 0) { | 708 | if (status < 0) { |
| 710 | mutex_unlock(&orphan_dir_inode->i_mutex); | 709 | mutex_unlock(&orphan_dir_inode->i_mutex); |
| 711 | 710 | ||
| @@ -933,7 +932,7 @@ void ocfs2_delete_inode(struct inode *inode) | |||
| 933 | * allocation lock here as it won't be needed - nobody will | 932 | * allocation lock here as it won't be needed - nobody will |
| 934 | * have the file open. | 933 | * have the file open. |
| 935 | */ | 934 | */ |
| 936 | status = ocfs2_meta_lock(inode, NULL, &di_bh, 1); | 935 | status = ocfs2_meta_lock(inode, &di_bh, 1); |
| 937 | if (status < 0) { | 936 | if (status < 0) { |
| 938 | if (status != -ENOENT) | 937 | if (status != -ENOENT) |
| 939 | mlog_errno(status); | 938 | mlog_errno(status); |
| @@ -1067,12 +1066,6 @@ void ocfs2_clear_inode(struct inode *inode) | |||
| 1067 | mlog_bug_on_msg(oi->ip_open_count, | 1066 | mlog_bug_on_msg(oi->ip_open_count, |
| 1068 | "Clear inode of %llu has open count %d\n", | 1067 | "Clear inode of %llu has open count %d\n", |
| 1069 | (unsigned long long)oi->ip_blkno, oi->ip_open_count); | 1068 | (unsigned long long)oi->ip_blkno, oi->ip_open_count); |
| 1070 | mlog_bug_on_msg(!list_empty(&oi->ip_handle_list), | ||
| 1071 | "Clear inode of %llu has non empty handle list\n", | ||
| 1072 | (unsigned long long)oi->ip_blkno); | ||
| 1073 | mlog_bug_on_msg(oi->ip_handle, | ||
| 1074 | "Clear inode of %llu has non empty handle pointer\n", | ||
| 1075 | (unsigned long long)oi->ip_blkno); | ||
| 1076 | 1069 | ||
| 1077 | /* Clear all other flags. */ | 1070 | /* Clear all other flags. */ |
| 1078 | oi->ip_flags = OCFS2_INODE_CACHE_INLINE; | 1071 | oi->ip_flags = OCFS2_INODE_CACHE_INLINE; |
| @@ -1186,7 +1179,7 @@ int ocfs2_inode_revalidate(struct dentry *dentry) | |||
| 1186 | 1179 | ||
| 1187 | /* Let ocfs2_meta_lock do the work of updating our struct | 1180 | /* Let ocfs2_meta_lock do the work of updating our struct |
| 1188 | * inode for us. */ | 1181 | * inode for us. */ |
| 1189 | status = ocfs2_meta_lock(inode, NULL, NULL, 0); | 1182 | status = ocfs2_meta_lock(inode, NULL, 0); |
| 1190 | if (status < 0) { | 1183 | if (status < 0) { |
| 1191 | if (status != -ENOENT) | 1184 | if (status != -ENOENT) |
| 1192 | mlog_errno(status); | 1185 | mlog_errno(status); |
| @@ -1204,7 +1197,7 @@ bail: | |||
| 1204 | * struct inode. | 1197 | * struct inode. |
| 1205 | * Only takes ip_lock. | 1198 | * Only takes ip_lock. |
| 1206 | */ | 1199 | */ |
| 1207 | int ocfs2_mark_inode_dirty(struct ocfs2_journal_handle *handle, | 1200 | int ocfs2_mark_inode_dirty(handle_t *handle, |
| 1208 | struct inode *inode, | 1201 | struct inode *inode, |
| 1209 | struct buffer_head *bh) | 1202 | struct buffer_head *bh) |
| 1210 | { | 1203 | { |
