aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-07-21 17:19:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:47:55 -0400
commitaddacc7d6f0f0bcce12adf9fe9e6455e1dfd74da (patch)
tree8743c3586ebc9691fe45b2783e13500ad33b584d /fs/ext2/inode.c
parent3889717d2851bf38015c0b291026c07c02264623 (diff)
Take dirtying the inode to callers of ext2_free_blocks()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r--fs/ext2/inode.c6
1 files changed, 4 insertions, 2 deletions
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,
423failed_out: 423failed_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