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