diff options
Diffstat (limited to 'fs/nilfs2/inode.c')
-rw-r--r-- | fs/nilfs2/inode.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 2a0a5a3ac134..7868cc122ac7 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -97,6 +97,7 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff, | |||
97 | nilfs_transaction_abort(inode->i_sb); | 97 | nilfs_transaction_abort(inode->i_sb); |
98 | goto out; | 98 | goto out; |
99 | } | 99 | } |
100 | nilfs_mark_inode_dirty(inode); | ||
100 | nilfs_transaction_commit(inode->i_sb); /* never fails */ | 101 | nilfs_transaction_commit(inode->i_sb); /* never fails */ |
101 | /* Error handling should be detailed */ | 102 | /* Error handling should be detailed */ |
102 | set_buffer_new(bh_result); | 103 | set_buffer_new(bh_result); |
@@ -322,7 +323,6 @@ struct inode *nilfs_new_inode(struct inode *dir, int mode) | |||
322 | nilfs_init_acl(), proper cancellation of | 323 | nilfs_init_acl(), proper cancellation of |
323 | above jobs should be considered */ | 324 | above jobs should be considered */ |
324 | 325 | ||
325 | mark_inode_dirty(inode); | ||
326 | return inode; | 326 | return inode; |
327 | 327 | ||
328 | failed_acl: | 328 | failed_acl: |
@@ -525,7 +525,6 @@ void nilfs_update_inode(struct inode *inode, struct buffer_head *ibh) | |||
525 | 525 | ||
526 | raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, ibh); | 526 | raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, ibh); |
527 | 527 | ||
528 | /* The buffer is guarded with lock_buffer() by the caller */ | ||
529 | if (test_and_clear_bit(NILFS_I_NEW, &ii->i_state)) | 528 | if (test_and_clear_bit(NILFS_I_NEW, &ii->i_state)) |
530 | memset(raw_inode, 0, NILFS_MDT(sbi->s_ifile)->mi_entry_size); | 529 | memset(raw_inode, 0, NILFS_MDT(sbi->s_ifile)->mi_entry_size); |
531 | set_bit(NILFS_I_INODE_DIRTY, &ii->i_state); | 530 | set_bit(NILFS_I_INODE_DIRTY, &ii->i_state); |
@@ -599,6 +598,7 @@ void nilfs_truncate(struct inode *inode) | |||
599 | if (IS_SYNC(inode)) | 598 | if (IS_SYNC(inode)) |
600 | nilfs_set_transaction_flag(NILFS_TI_SYNC); | 599 | nilfs_set_transaction_flag(NILFS_TI_SYNC); |
601 | 600 | ||
601 | nilfs_mark_inode_dirty(inode); | ||
602 | nilfs_set_file_dirty(NILFS_SB(sb), inode, 0); | 602 | nilfs_set_file_dirty(NILFS_SB(sb), inode, 0); |
603 | nilfs_transaction_commit(sb); | 603 | nilfs_transaction_commit(sb); |
604 | /* May construct a logical segment and may fail in sync mode. | 604 | /* May construct a logical segment and may fail in sync mode. |
@@ -623,6 +623,7 @@ void nilfs_delete_inode(struct inode *inode) | |||
623 | truncate_inode_pages(&inode->i_data, 0); | 623 | truncate_inode_pages(&inode->i_data, 0); |
624 | 624 | ||
625 | nilfs_truncate_bmap(ii, 0); | 625 | nilfs_truncate_bmap(ii, 0); |
626 | nilfs_mark_inode_dirty(inode); | ||
626 | nilfs_free_inode(inode); | 627 | nilfs_free_inode(inode); |
627 | /* nilfs_free_inode() marks inode buffer dirty */ | 628 | /* nilfs_free_inode() marks inode buffer dirty */ |
628 | if (IS_SYNC(inode)) | 629 | if (IS_SYNC(inode)) |
@@ -745,9 +746,7 @@ int nilfs_mark_inode_dirty(struct inode *inode) | |||
745 | "failed to reget inode block.\n"); | 746 | "failed to reget inode block.\n"); |
746 | return err; | 747 | return err; |
747 | } | 748 | } |
748 | lock_buffer(ibh); | ||
749 | nilfs_update_inode(inode, ibh); | 749 | nilfs_update_inode(inode, ibh); |
750 | unlock_buffer(ibh); | ||
751 | nilfs_mdt_mark_buffer_dirty(ibh); | 750 | nilfs_mdt_mark_buffer_dirty(ibh); |
752 | nilfs_mdt_mark_dirty(sbi->s_ifile); | 751 | nilfs_mdt_mark_dirty(sbi->s_ifile); |
753 | brelse(ibh); | 752 | brelse(ibh); |