Skip to content

Commit

Permalink
Squashfs: fix use of __le64 annotated variable
Browse files Browse the repository at this point in the history
This fixes a sparse with endian checking warning.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
  • Loading branch information
Phillip Lougher committed Oct 28, 2010
1 parent f6f94e2 commit 0772458
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fs/squashfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,18 @@ static int squashfs_xattr_get(struct inode *inode, int name_index,
strncmp(target, name, name_size) == 0) {
/* found xattr */
if (type & SQUASHFS_XATTR_VALUE_OOL) {
__le64 xattr;
__le64 xattr_val;
u64 xattr;
/* val is a reference to the real location */
err = squashfs_read_metadata(sb, &val, &start,
&offset, sizeof(val));
if (err < 0)
goto failed;
err = squashfs_read_metadata(sb, &xattr, &start,
&offset, sizeof(xattr));
err = squashfs_read_metadata(sb, &xattr_val,
&start, &offset, sizeof(xattr_val));
if (err < 0)
goto failed;
xattr = le64_to_cpu(xattr);
xattr = le64_to_cpu(xattr_val);
start = SQUASHFS_XATTR_BLK(xattr) +
msblk->xattr_table;
offset = SQUASHFS_XATTR_OFFSET(xattr);
Expand Down

0 comments on commit 0772458

Please sign in to comment.