]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.suse/ocfs2-Use-buckets-in-ocfs2_xattr_set_entry_in_bucke.patch
Move xen patchset to new version's subdir.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / ocfs2-Use-buckets-in-ocfs2_xattr_set_entry_in_bucke.patch
CommitLineData
00e5a55c
BS
1From: Joel Becker <joel.becker@oracle.com>
2Date: Mon, 27 Oct 2008 18:07:45 -0700
3Subject: ocfs2: Use buckets in ocfs2_xattr_set_entry_in_bucket().
4Patch-mainline: 2.6.29
5
6The ocfs2_xattr_set_entry_in_bucket() function is already working on an
7ocfs2_xattr_bucket structure, so let's use the bucket API.
8
9Signed-off-by: Joel Becker <joel.becker@oracle.com>
10Signed-off-by: Mark Fasheh <mfasheh@suse.com>
11---
12 fs/ocfs2/xattr.c | 11 +++++------
13 1 files changed, 5 insertions(+), 6 deletions(-)
14
15diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
16index 127a628..029a9f4 100644
17--- a/fs/ocfs2/xattr.c
18+++ b/fs/ocfs2/xattr.c
19@@ -4083,25 +4083,24 @@ static int ocfs2_xattr_set_entry_in_bucket(struct inode *inode,
20 {
21 int ret;
22 handle_t *handle = NULL;
23- u16 blk_per_bucket = ocfs2_blocks_per_xattr_bucket(inode->i_sb);
24 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
25+ u64 blkno;
26
27 mlog(0, "Set xattr entry len = %lu index = %d in bucket %llu\n",
28 (unsigned long)xi->value_len, xi->name_index,
29 (unsigned long long)bucket_blkno(xs->bucket));
30
31 if (!xs->bucket->bu_bhs[1]) {
32- ret = ocfs2_read_blocks(inode,
33- bucket_blkno(xs->bucket) + 1,
34- blk_per_bucket - 1, &xs->bucket->bu_bhs[1],
35- 0);
36+ blkno = bucket_blkno(xs->bucket);
37+ ocfs2_xattr_bucket_relse(xs->bucket);
38+ ret = ocfs2_read_xattr_bucket(xs->bucket, blkno);
39 if (ret) {
40 mlog_errno(ret);
41 goto out;
42 }
43 }
44
45- handle = ocfs2_start_trans(osb, blk_per_bucket);
46+ handle = ocfs2_start_trans(osb, xs->bucket->bu_blocks);
47 if (IS_ERR(handle)) {
48 ret = PTR_ERR(handle);
49 handle = NULL;
50--
511.5.6
52