diff options
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/balloc.c | 1 | ||||
-rw-r--r-- | fs/ext2/inode.c | 6 | ||||
-rw-r--r-- | fs/ext2/xattr.c | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index db69c1206f13..c6c684b44ea1 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
@@ -572,7 +572,6 @@ error_return: | |||
572 | brelse(bitmap_bh); | 572 | brelse(bitmap_bh); |
573 | release_blocks(sb, freed); | 573 | release_blocks(sb, freed); |
574 | dquot_free_block_nodirty(inode, freed); | 574 | dquot_free_block_nodirty(inode, freed); |
575 | mark_inode_dirty(inode); | ||
576 | } | 575 | } |
577 | 576 | ||
578 | /** | 577 | /** |
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 069620b30d4d..e8af26dd6715 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -423,6 +423,8 @@ static int ext2_alloc_blocks(struct inode *inode, | |||
423 | failed_out: | 423 | failed_out: |
424 | for (i = 0; i <index; i++) | 424 | for (i = 0; i <index; i++) |
425 | ext2_free_blocks(inode, new_blocks[i], 1); | 425 | ext2_free_blocks(inode, new_blocks[i], 1); |
426 | if (index) | ||
427 | mark_inode_dirty(inode); | ||
426 | return ret; | 428 | return ret; |
427 | } | 429 | } |
428 | 430 | ||
@@ -993,8 +995,8 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q) | |||
993 | else if (block_to_free == nr - count) | 995 | else if (block_to_free == nr - count) |
994 | count++; | 996 | count++; |
995 | else { | 997 | else { |
996 | mark_inode_dirty(inode); | ||
997 | ext2_free_blocks (inode, block_to_free, count); | 998 | ext2_free_blocks (inode, block_to_free, count); |
999 | mark_inode_dirty(inode); | ||
998 | free_this: | 1000 | free_this: |
999 | block_to_free = nr; | 1001 | block_to_free = nr; |
1000 | count = 1; | 1002 | count = 1; |
@@ -1002,8 +1004,8 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q) | |||
1002 | } | 1004 | } |
1003 | } | 1005 | } |
1004 | if (count > 0) { | 1006 | if (count > 0) { |
1005 | mark_inode_dirty(inode); | ||
1006 | ext2_free_blocks (inode, block_to_free, count); | 1007 | ext2_free_blocks (inode, block_to_free, count); |
1008 | mark_inode_dirty(inode); | ||
1007 | } | 1009 | } |
1008 | } | 1010 | } |
1009 | 1011 | ||
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 0fa24e814d8a..25ff041058a7 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c | |||
@@ -674,6 +674,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
674 | new_bh = sb_getblk(sb, block); | 674 | new_bh = sb_getblk(sb, block); |
675 | if (!new_bh) { | 675 | if (!new_bh) { |
676 | ext2_free_blocks(inode, block, 1); | 676 | ext2_free_blocks(inode, block, 1); |
677 | mark_inode_dirty(inode); | ||
677 | error = -EIO; | 678 | error = -EIO; |
678 | goto cleanup; | 679 | goto cleanup; |
679 | } | 680 | } |
@@ -729,6 +730,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
729 | mb_cache_entry_free(ce); | 730 | mb_cache_entry_free(ce); |
730 | ea_bdebug(old_bh, "freeing"); | 731 | ea_bdebug(old_bh, "freeing"); |
731 | ext2_free_blocks(inode, old_bh->b_blocknr, 1); | 732 | ext2_free_blocks(inode, old_bh->b_blocknr, 1); |
733 | mark_inode_dirty(inode); | ||
732 | /* We let our caller release old_bh, so we | 734 | /* We let our caller release old_bh, so we |
733 | * need to duplicate the buffer before. */ | 735 | * need to duplicate the buffer before. */ |
734 | get_bh(old_bh); | 736 | get_bh(old_bh); |
@@ -789,6 +791,7 @@ ext2_xattr_delete_inode(struct inode *inode) | |||
789 | if (ce) | 791 | if (ce) |
790 | mb_cache_entry_free(ce); | 792 | mb_cache_entry_free(ce); |
791 | ext2_free_blocks(inode, EXT2_I(inode)->i_file_acl, 1); | 793 | ext2_free_blocks(inode, EXT2_I(inode)->i_file_acl, 1); |
794 | mark_inode_dirty(inode); | ||
792 | get_bh(bh); | 795 | get_bh(bh); |
793 | bforget(bh); | 796 | bforget(bh); |
794 | unlock_buffer(bh); | 797 | unlock_buffer(bh); |