diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nilfs2/bmap.c | 4 | ||||
-rw-r--r-- | fs/nilfs2/inode.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c index afc060abd5ab..f4a14ea2ed9c 100644 --- a/fs/nilfs2/bmap.c +++ b/fs/nilfs2/bmap.c | |||
@@ -402,15 +402,11 @@ int nilfs_bmap_test_and_clear_dirty(struct nilfs_bmap *bmap) | |||
402 | void nilfs_bmap_add_blocks(const struct nilfs_bmap *bmap, int n) | 402 | void nilfs_bmap_add_blocks(const struct nilfs_bmap *bmap, int n) |
403 | { | 403 | { |
404 | inode_add_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n); | 404 | inode_add_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n); |
405 | if (!NILFS_MDT(bmap->b_inode)) | ||
406 | mark_inode_dirty(bmap->b_inode); | ||
407 | } | 405 | } |
408 | 406 | ||
409 | void nilfs_bmap_sub_blocks(const struct nilfs_bmap *bmap, int n) | 407 | void nilfs_bmap_sub_blocks(const struct nilfs_bmap *bmap, int n) |
410 | { | 408 | { |
411 | inode_sub_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n); | 409 | inode_sub_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n); |
412 | if (!NILFS_MDT(bmap->b_inode)) | ||
413 | mark_inode_dirty(bmap->b_inode); | ||
414 | } | 410 | } |
415 | 411 | ||
416 | __u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap, | 412 | __u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap, |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 412b25a7d345..a16c179f2b9a 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 | 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); |
@@ -598,6 +599,7 @@ void nilfs_truncate(struct inode *inode) | |||
598 | if (IS_SYNC(inode)) | 599 | if (IS_SYNC(inode)) |
599 | nilfs_set_transaction_flag(NILFS_TI_SYNC); | 600 | nilfs_set_transaction_flag(NILFS_TI_SYNC); |
600 | 601 | ||
602 | mark_inode_dirty(inode); | ||
601 | nilfs_set_file_dirty(NILFS_SB(sb), inode, 0); | 603 | nilfs_set_file_dirty(NILFS_SB(sb), inode, 0); |
602 | nilfs_transaction_commit(sb); | 604 | nilfs_transaction_commit(sb); |
603 | /* May construct a logical segment and may fail in sync mode. | 605 | /* May construct a logical segment and may fail in sync mode. |
@@ -622,6 +624,7 @@ void nilfs_delete_inode(struct inode *inode) | |||
622 | truncate_inode_pages(&inode->i_data, 0); | 624 | truncate_inode_pages(&inode->i_data, 0); |
623 | 625 | ||
624 | nilfs_truncate_bmap(ii, 0); | 626 | nilfs_truncate_bmap(ii, 0); |
627 | mark_inode_dirty(inode); | ||
625 | nilfs_free_inode(inode); | 628 | nilfs_free_inode(inode); |
626 | /* nilfs_free_inode() marks inode buffer dirty */ | 629 | /* nilfs_free_inode() marks inode buffer dirty */ |
627 | if (IS_SYNC(inode)) | 630 | if (IS_SYNC(inode)) |