Whamcloud - gitweb
- list_for_each_entry_safe(), list_move() and list_move_tail() have been added
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext3-xattr-ptr-arith-fix.patch
1 Index: linux-2.4.20/fs/ext3/xattr.c
2 ===================================================================
3 --- linux-2.4.20.orig/fs/ext3/xattr.c   2003-11-13 17:14:52.000000000 +0300
4 +++ linux-2.4.20/fs/ext3/xattr.c        2003-11-21 16:43:48.000000000 +0300
5 @@ -1293,9 +1293,10 @@
6                                 goto cleanup;
7                         memcpy(header, HDR(bh), bh->b_size);
8                         header->h_refcount = cpu_to_le32(1);
9 -                       offset = (char *)header - bh->b_data;
10 -                       here = ENTRY((char *)here + offset);
11 -                       last = ENTRY((char *)last + offset);
12 +                       offset = (char *)here - bh->b_data;
13 +                       here = ENTRY((char *)header + offset);
14 +                       offset = (char *)last - bh->b_data;
15 +                       last = ENTRY((char *)header + offset);
16                 }
17         } else {
18                 /* Allocate a buffer where we construct the new block. */