]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.suse/ocfs2-xattr-Move-clusters-free-into-dealloc.patch
Revert "Move xen patchset to new version's subdir."
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / ocfs2-xattr-Move-clusters-free-into-dealloc.patch
CommitLineData
00e5a55c
BS
1From: Tao Ma <tao.ma@oracle.com>
2Date: Wed, 12 Nov 2008 08:26:59 +0800
3Subject: ocfs2/xattr: Move clusters free into dealloc.
4Patch-mainline: 2.6.29
5
6Move clusters free process into dealloc context so that
7they can be freed after the transaction.
8
9Signed-off-by: Tao Ma <tao.ma@oracle.com>
10Signed-off-by: Mark Fasheh <mfasheh@suse.com>
11---
12 fs/ocfs2/xattr.c | 14 +-------------
13 1 files changed, 1 insertions(+), 13 deletions(-)
14
15diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
16index 4501c63..f1da381 100644
17--- a/fs/ocfs2/xattr.c
18+++ b/fs/ocfs2/xattr.c
19@@ -457,7 +457,6 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
20 int ret;
21 u64 phys_blkno = ocfs2_clusters_to_blocks(inode->i_sb, phys_cpos);
22 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
23- struct inode *tl_inode = osb->osb_tl_inode;
24 handle_t *handle;
25 struct ocfs2_alloc_context *meta_ac = NULL;
26 struct ocfs2_extent_tree et;
27@@ -470,16 +469,6 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
28 return ret;
29 }
30
31- mutex_lock(&tl_inode->i_mutex);
32-
33- if (ocfs2_truncate_log_needs_flush(osb)) {
34- ret = __ocfs2_flush_truncate_log(osb);
35- if (ret < 0) {
36- mlog_errno(ret);
37- goto out;
38- }
39- }
40-
41 handle = ocfs2_start_trans(osb, OCFS2_REMOVE_EXTENT_CREDITS);
42 if (IS_ERR(handle)) {
43 ret = PTR_ERR(handle);
44@@ -509,14 +498,13 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
45 goto out_commit;
46 }
47
48- ret = ocfs2_truncate_log_append(osb, handle, phys_blkno, len);
49+ ret = ocfs2_cache_cluster_dealloc(dealloc, phys_blkno, len);
50 if (ret)
51 mlog_errno(ret);
52
53 out_commit:
54 ocfs2_commit_trans(osb, handle);
55 out:
56- mutex_unlock(&tl_inode->i_mutex);
57
58 if (meta_ac)
59 ocfs2_free_alloc_context(meta_ac);
60--
611.5.6
62