diff options
author | Mark Fasheh <mfasheh@suse.com> | 2009-01-29 18:06:21 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-02-02 17:20:20 -0500 |
commit | fd4ef231962ab44fd1004e87f9d7c6809f00cd64 (patch) | |
tree | 7a79939e1a5c84a41e1a7063fbe2eb68848c9a25 /fs/ocfs2 | |
parent | a4b91965d39d5d53b470d6aa62cba155a6f3ffe1 (diff) |
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 <mfasheh@suse.com>
Acked-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, | |||
5390 | goto out; | 5390 | goto out; |
5391 | } | 5391 | } |
5392 | 5392 | ||
5393 | vfs_dq_free_space_nodirty(inode, | ||
5394 | ocfs2_clusters_to_bytes(inode->i_sb, len)); | ||
5395 | |||
5393 | ret = ocfs2_remove_extent(inode, et, cpos, len, handle, meta_ac, | 5396 | ret = ocfs2_remove_extent(inode, et, cpos, len, handle, meta_ac, |
5394 | dealloc); | 5397 | dealloc); |
5395 | if (ret) { | 5398 | if (ret) { |