]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.suse/ocfs2-xattr.c-Fix-a-bug-when-inserting-xattr.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.suse / ocfs2-xattr.c-Fix-a-bug-when-inserting-xattr.patch
CommitLineData
2cb7cef9
BS
1From: Tao Ma <tao.ma@oracle.com>
2Subject: ocfs2/xattr.c: Fix a bug when inserting xattr.
3Patch-mainline: 2.6.28
4
5During the process of xatt insertion, we use binary search
6to find the right place and "low" is set to it. But when
7there is one xattr which has the same name hash as the inserted
8one, low is the wrong value. So set it to the right position.
9
10Signed-off-by: Tao Ma <tao.ma@oracle.com>
11Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12---
13 fs/ocfs2/xattr.c | 4 +++-
14 1 files changed, 3 insertions(+), 1 deletions(-)
15
16Index: linux-2.6.27/fs/ocfs2/xattr.c
17===================================================================
18--- linux-2.6.27.orig/fs/ocfs2/xattr.c
19+++ linux-2.6.27/fs/ocfs2/xattr.c
20@@ -4019,8 +4019,10 @@ static void ocfs2_xattr_set_entry_normal
21 else if (name_hash <
22 le32_to_cpu(tmp_xe->xe_name_hash))
23 high = tmp - 1;
24- else
25+ else {
26+ low = tmp;
27 break;
28+ }
29 }
30
31 xe = &xh->xh_entries[low];