Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359025
b: refs/heads/master
c: 8e3dffc
h: refs/heads/master
i:
  359023: 0955745
v: v3
  • Loading branch information
Wang Shilong authored and Jan Kara committed Feb 7, 2013
1 parent c9b23c0 commit e1116b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98783e453c1084527388ec1a7f6367cd6aabbe63
refs/heads/master: 8e3dffc651cb668e1ff4d8b89cc1c3dde7540d3b
15 changes: 10 additions & 5 deletions trunk/fs/ext2/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,11 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
}
error_return:
brelse(bitmap_bh);
release_blocks(sb, freed);
dquot_free_block_nodirty(inode, freed);
if (freed) {
release_blocks(sb, freed);
dquot_free_block_nodirty(inode, freed);
mark_inode_dirty(inode);
}
}

/**
Expand Down Expand Up @@ -1412,9 +1415,11 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal,

*errp = 0;
brelse(bitmap_bh);
dquot_free_block_nodirty(inode, *count-num);
mark_inode_dirty(inode);
*count = num;
if (num < *count) {
dquot_free_block_nodirty(inode, *count-num);
mark_inode_dirty(inode);
*count = num;
}
return ret_block;

io_error:
Expand Down

0 comments on commit e1116b4

Please sign in to comment.