Commit 4d023b2c authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: Add missing byte-swapping macros in xattr.c

The missing byte-swaps wreaked havok on big-endian hardware.
parent ecf2c214
...@@ -303,7 +303,7 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size, ...@@ -303,7 +303,7 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size,
} }
ea->flag = DXD_EXTENT; ea->flag = DXD_EXTENT;
DXDsize(ea, ealist->size); DXDsize(ea, le32_to_cpu(ealist->size));
DXDlength(ea, nblocks); DXDlength(ea, nblocks);
DXDaddress(ea, blkno); DXDaddress(ea, blkno);
...@@ -342,7 +342,8 @@ static int ea_read_inline(struct inode *ip, struct jfs_ea_list *ealist) ...@@ -342,7 +342,8 @@ static int ea_read_inline(struct inode *ip, struct jfs_ea_list *ealist)
/* Sanity Check */ /* Sanity Check */
if ((sizeDXD(&ji->ea) > sizeof (ji->i_inline_ea))) if ((sizeDXD(&ji->ea) > sizeof (ji->i_inline_ea)))
return -EIO; return -EIO;
if (((struct jfs_ea_list *) &ji->i_inline_ea)->size != ea_size) if (le32_to_cpu(((struct jfs_ea_list *) &ji->i_inline_ea)->size)
!= ea_size)
return -EIO; return -EIO;
memcpy(ealist, ji->i_inline_ea, ea_size); memcpy(ealist, ji->i_inline_ea, ea_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment