Index: linux-2.4.20/fs/ext3/xattr.c =================================================================== --- linux-2.4.20.orig/fs/ext3/xattr.c 2003-11-13 10:59:33.000000000 +0800 +++ linux-2.4.20/fs/ext3/xattr.c 2003-11-25 21:16:51.000000000 +0800 @@ -1293,9 +1293,10 @@ goto cleanup; memcpy(header, HDR(bh), bh->b_size); header->h_refcount = cpu_to_le32(1); - offset = (char *)header - bh->b_data; - here = ENTRY((char *)here + offset); - last = ENTRY((char *)last + offset); + offset = (char *)here - bh->b_data; + here = ENTRY((char *)header + offset); + offset = (char *)last - bh->b_data; + last = ENTRY((char *)header + offset); } } else { /* Allocate a buffer where we construct the new block. */