]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-add-quota-call-to-ocfs2_remove_btree_range.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ocfs2-add-quota-call-to-ocfs2_remove_btree_range.patch
CommitLineData
00e5a55c
BS
1From: Mark Fasheh <mfasheh@suse.com>
2Date: Thu, 29 Jan 2009 15:06:21 -0800
3Subject: [PATCH] ocfs2: add quota call to ocfs2_remove_btree_range()
4Patch-mainline: 2.6.29
5
6We weren't reclaiming the clusters which get free'd from this function,
7so any user punching holes in a file would still have those bytes accounted
8against him/her. Add the call to vfs_dq_free_space_nodirty() to fix this.
9Interestingly enough, the journal credits calculation already took this into
10account.
11
12Signed-off-by: Mark Fasheh <mfasheh@suse.com>
13Acked-by: Jan Kara <jack@suse.cz>
14---
15 fs/ocfs2/alloc.c | 3 +++
16 1 files changed, 3 insertions(+), 0 deletions(-)
17
18Index: linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/alloc.c
19===================================================================
20--- linux-2.6.27-sle11_ocfs2_update2.orig/fs/ocfs2/alloc.c
21+++ linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/alloc.c
22@@ -5307,6 +5307,9 @@ int ocfs2_remove_btree_range(struct inod
23 goto out;
24 }
25
26+ vfs_dq_free_space_nodirty(inode,
27+ ocfs2_clusters_to_bytes(inode->i_sb, len));
28+
29 ret = ocfs2_remove_extent(inode, et, cpos, len, handle, meta_ac,
30 dealloc);
31 if (ret) {