Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=06b240... Commit: 06b240d8af21ddee4cfec3b0f02b81d9f168a98a Parent: b0f73cfc36ed62decdd3f78e943bbfd00ee80e49 Author: Tao Ma <tao.ma@oracle.com> AuthorDate: Fri Sep 19 22:16:34 2008 +0800 Committer: Mark Fasheh <mfasheh@suse.com> CommitDate: Mon Oct 13 17:02:43 2008 -0700 ocfs2/xattr.c: Fix a bug when inserting xattr. During the process of xatt insertion, we use binary search to find the right place and "low" is set to it. But when there is one xattr which has the same name hash as the inserted one, low is the wrong value. So set it to the right position. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com> --- fs/ocfs2/xattr.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index b2e25a8..b1f2a16 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -4003,8 +4003,10 @@ static void ocfs2_xattr_set_entry_normal(struct inode *inode, else if (name_hash < le32_to_cpu(tmp_xe->xe_name_hash)) high = tmp - 1; - else + else { + low = tmp; break; + } } xe = &xh->xh_entries[low]; -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
