]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-add-quota-call-to-ocfs2_remove_btree_range.patch
Updated xen patches taken from suse.
[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
1 From: Mark Fasheh <mfasheh@suse.com>
2 Date: Thu, 29 Jan 2009 15:06:21 -0800
3 Subject: [PATCH] ocfs2: add quota call to ocfs2_remove_btree_range()
4 Patch-mainline: 2.6.29
5
6 We weren't reclaiming the clusters which get free'd from this function,
7 so any user punching holes in a file would still have those bytes accounted
8 against him/her. Add the call to vfs_dq_free_space_nodirty() to fix this.
9 Interestingly enough, the journal credits calculation already took this into
10 account.
11
12 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
13 Acked-by: Jan Kara <jack@suse.cz>
14 ---
15 fs/ocfs2/alloc.c | 3 +++
16 1 files changed, 3 insertions(+), 0 deletions(-)
17
18 Index: 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) {