aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r--fs/ocfs2/inode.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 16e8e74dc966..e4d91493d7d7 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;
366bail: 365bail:
@@ -424,7 +423,8 @@ static int ocfs2_read_locked_inode(struct inode *inode,
424 * cluster lock before trusting anything anyway. 423 * cluster lock before trusting anything anyway.
425 */ 424 */
426 can_lock = !(args->fi_flags & OCFS2_FI_FLAG_SYSFILE) 425 can_lock = !(args->fi_flags & OCFS2_FI_FLAG_SYSFILE)
427 && !(args->fi_flags & OCFS2_FI_FLAG_NOLOCK); 426 && !(args->fi_flags & OCFS2_FI_FLAG_NOLOCK)
427 && !ocfs2_mount_local(osb);
428 428
429 /* 429 /*
430 * To maintain backwards compatibility with older versions of 430 * To maintain backwards compatibility with older versions of
@@ -441,7 +441,7 @@ static int ocfs2_read_locked_inode(struct inode *inode,
441 generation, inode); 441 generation, inode);
442 442
443 if (can_lock) { 443 if (can_lock) {
444 status = ocfs2_meta_lock(inode, NULL, NULL, 0); 444 status = ocfs2_meta_lock(inode, NULL, 0);
445 if (status) { 445 if (status) {
446 make_bad_inode(inode); 446 make_bad_inode(inode);
447 mlog_errno(status); 447 mlog_errno(status);
@@ -512,7 +512,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
512 struct buffer_head *fe_bh) 512 struct buffer_head *fe_bh)
513{ 513{
514 int status = 0; 514 int status = 0;
515 struct ocfs2_journal_handle *handle = NULL; 515 handle_t *handle = NULL;
516 struct ocfs2_truncate_context *tc = NULL; 516 struct ocfs2_truncate_context *tc = NULL;
517 struct ocfs2_dinode *fe; 517 struct ocfs2_dinode *fe;
518 518
@@ -524,7 +524,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
524 if (!fe->i_clusters) 524 if (!fe->i_clusters)
525 goto bail; 525 goto bail;
526 526
527 handle = ocfs2_start_trans(osb, handle, OCFS2_INODE_UPDATE_CREDITS); 527 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
528 if (IS_ERR(handle)) { 528 if (IS_ERR(handle)) {
529 status = PTR_ERR(handle); 529 status = PTR_ERR(handle);
530 handle = NULL; 530 handle = NULL;
@@ -538,7 +538,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
538 goto bail; 538 goto bail;
539 } 539 }
540 540
541 ocfs2_commit_trans(handle); 541 ocfs2_commit_trans(osb, handle);
542 handle = NULL; 542 handle = NULL;
543 543
544 status = ocfs2_prepare_truncate(osb, inode, fe_bh, &tc); 544 status = ocfs2_prepare_truncate(osb, inode, fe_bh, &tc);
@@ -554,7 +554,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
554 } 554 }
555bail: 555bail:
556 if (handle) 556 if (handle)
557 ocfs2_commit_trans(handle); 557 ocfs2_commit_trans(osb, handle);
558 558
559 mlog_exit(status); 559 mlog_exit(status);
560 return status; 560 return status;
@@ -568,7 +568,7 @@ static int ocfs2_remove_inode(struct inode *inode,
568 int status; 568 int status;
569 struct inode *inode_alloc_inode = NULL; 569 struct inode *inode_alloc_inode = NULL;
570 struct buffer_head *inode_alloc_bh = NULL; 570 struct buffer_head *inode_alloc_bh = NULL;
571 struct ocfs2_journal_handle *handle; 571 handle_t *handle;
572 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 572 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
573 struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; 573 struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data;
574 574
@@ -582,7 +582,7 @@ static int ocfs2_remove_inode(struct inode *inode,
582 } 582 }
583 583
584 mutex_lock(&inode_alloc_inode->i_mutex); 584 mutex_lock(&inode_alloc_inode->i_mutex);
585 status = ocfs2_meta_lock(inode_alloc_inode, NULL, &inode_alloc_bh, 1); 585 status = ocfs2_meta_lock(inode_alloc_inode, &inode_alloc_bh, 1);
586 if (status < 0) { 586 if (status < 0) {
587 mutex_unlock(&inode_alloc_inode->i_mutex); 587 mutex_unlock(&inode_alloc_inode->i_mutex);
588 588
@@ -590,7 +590,7 @@ static int ocfs2_remove_inode(struct inode *inode,
590 goto bail; 590 goto bail;
591 } 591 }
592 592
593 handle = ocfs2_start_trans(osb, NULL, OCFS2_DELETE_INODE_CREDITS); 593 handle = ocfs2_start_trans(osb, OCFS2_DELETE_INODE_CREDITS);
594 if (IS_ERR(handle)) { 594 if (IS_ERR(handle)) {
595 status = PTR_ERR(handle); 595 status = PTR_ERR(handle);
596 mlog_errno(status); 596 mlog_errno(status);
@@ -629,7 +629,7 @@ static int ocfs2_remove_inode(struct inode *inode,
629 mlog_errno(status); 629 mlog_errno(status);
630 630
631bail_commit: 631bail_commit:
632 ocfs2_commit_trans(handle); 632 ocfs2_commit_trans(osb, handle);
633bail_unlock: 633bail_unlock:
634 ocfs2_meta_unlock(inode_alloc_inode, 1); 634 ocfs2_meta_unlock(inode_alloc_inode, 1);
635 mutex_unlock(&inode_alloc_inode->i_mutex); 635 mutex_unlock(&inode_alloc_inode->i_mutex);
@@ -705,7 +705,7 @@ static int ocfs2_wipe_inode(struct inode *inode,
705 * delete_inode operation. We do this now to avoid races with 705 * delete_inode operation. We do this now to avoid races with
706 * recovery completion on other nodes. */ 706 * recovery completion on other nodes. */
707 mutex_lock(&orphan_dir_inode->i_mutex); 707 mutex_lock(&orphan_dir_inode->i_mutex);
708 status = ocfs2_meta_lock(orphan_dir_inode, NULL, &orphan_dir_bh, 1); 708 status = ocfs2_meta_lock(orphan_dir_inode, &orphan_dir_bh, 1);
709 if (status < 0) { 709 if (status < 0) {
710 mutex_unlock(&orphan_dir_inode->i_mutex); 710 mutex_unlock(&orphan_dir_inode->i_mutex);
711 711
@@ -933,7 +933,7 @@ void ocfs2_delete_inode(struct inode *inode)
933 * allocation lock here as it won't be needed - nobody will 933 * allocation lock here as it won't be needed - nobody will
934 * have the file open. 934 * have the file open.
935 */ 935 */
936 status = ocfs2_meta_lock(inode, NULL, &di_bh, 1); 936 status = ocfs2_meta_lock(inode, &di_bh, 1);
937 if (status < 0) { 937 if (status < 0) {
938 if (status != -ENOENT) 938 if (status != -ENOENT)
939 mlog_errno(status); 939 mlog_errno(status);
@@ -1067,12 +1067,6 @@ void ocfs2_clear_inode(struct inode *inode)
1067 mlog_bug_on_msg(oi->ip_open_count, 1067 mlog_bug_on_msg(oi->ip_open_count,
1068 "Clear inode of %llu has open count %d\n", 1068 "Clear inode of %llu has open count %d\n",
1069 (unsigned long long)oi->ip_blkno, oi->ip_open_count); 1069 (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 1070
1077 /* Clear all other flags. */ 1071 /* Clear all other flags. */
1078 oi->ip_flags = OCFS2_INODE_CACHE_INLINE; 1072 oi->ip_flags = OCFS2_INODE_CACHE_INLINE;
@@ -1186,7 +1180,7 @@ int ocfs2_inode_revalidate(struct dentry *dentry)
1186 1180
1187 /* Let ocfs2_meta_lock do the work of updating our struct 1181 /* Let ocfs2_meta_lock do the work of updating our struct
1188 * inode for us. */ 1182 * inode for us. */
1189 status = ocfs2_meta_lock(inode, NULL, NULL, 0); 1183 status = ocfs2_meta_lock(inode, NULL, 0);
1190 if (status < 0) { 1184 if (status < 0) {
1191 if (status != -ENOENT) 1185 if (status != -ENOENT)
1192 mlog_errno(status); 1186 mlog_errno(status);
@@ -1204,7 +1198,7 @@ bail:
1204 * struct inode. 1198 * struct inode.
1205 * Only takes ip_lock. 1199 * Only takes ip_lock.
1206 */ 1200 */
1207int ocfs2_mark_inode_dirty(struct ocfs2_journal_handle *handle, 1201int ocfs2_mark_inode_dirty(handle_t *handle,
1208 struct inode *inode, 1202 struct inode *inode,
1209 struct buffer_head *bh) 1203 struct buffer_head *bh)
1210{ 1204{