Skip to content

Commit

Permalink
ocfs2: add quota call to ocfs2_remove_btree_range()
Browse files Browse the repository at this point in the history
We weren't reclaiming the clusters which get free'd from this function,
so any user punching holes in a file would still have those bytes accounted
against him/her. Add the call to vfs_dq_free_space_nodirty() to fix this.
Interestingly enough, the journal credits calculation already took this into
account.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Acked-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Mark Fasheh committed Feb 2, 2009
1 parent a4b9196 commit fd4ef23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5390,6 +5390,9 @@ int ocfs2_remove_btree_range(struct inode *inode,
goto out;
}

vfs_dq_free_space_nodirty(inode,
ocfs2_clusters_to_bytes(inode->i_sb, len));

ret = ocfs2_remove_extent(inode, et, cpos, len, handle, meta_ac,
dealloc);
if (ret) {
Expand Down

0 comments on commit fd4ef23

Please sign in to comment.