From: Mark Fasheh Date: Thu, 29 Jan 2009 23:06:21 +0000 (-0800) Subject: ocfs2: add quota call to ocfs2_remove_btree_range() X-Git-Tag: v2.6.29-rc4~62^2 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=fd4ef231962ab44fd1004e87f9d7c6809f00cd64;p=cascardo%2Flinux.git ocfs2: add quota call to ocfs2_remove_btree_range() 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 Acked-by: Jan Kara --- diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index d861096c9d81..60fe74035db5 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -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) {