]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-add-quota-call-to-ocfs2_remove_btree_range.patch
Revert "Move xen patchset to new version's subdir."
[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
diff --git a/src/patches/suse-2.6.27.25/patches.fixes/ocfs2-add-quota-call-to-ocfs2_remove_btree_range.patch b/src/patches/suse-2.6.27.25/patches.fixes/ocfs2-add-quota-call-to-ocfs2_remove_btree_range.patch
new file mode 100644 (file)
index 0000000..6c163db
--- /dev/null
@@ -0,0 +1,31 @@
+From: Mark Fasheh <mfasheh@suse.com>
+Date: Thu, 29 Jan 2009 15:06:21 -0800
+Subject: [PATCH] ocfs2: add quota call to ocfs2_remove_btree_range()
+Patch-mainline: 2.6.29
+
+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>
+---
+ fs/ocfs2/alloc.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+Index: linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/alloc.c
+===================================================================
+--- linux-2.6.27-sle11_ocfs2_update2.orig/fs/ocfs2/alloc.c
++++ linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/alloc.c
+@@ -5307,6 +5307,9 @@ int ocfs2_remove_btree_range(struct inod
+               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) {