diff options
| -rw-r--r-- | fs/squashfs/xattr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c index 652b8541f9c6..3876c36699a1 100644 --- a/fs/squashfs/xattr.c +++ b/fs/squashfs/xattr.c | |||
| @@ -158,17 +158,18 @@ static int squashfs_xattr_get(struct inode *inode, int name_index, | |||
| 158 | strncmp(target, name, name_size) == 0) { | 158 | strncmp(target, name, name_size) == 0) { |
| 159 | /* found xattr */ | 159 | /* found xattr */ |
| 160 | if (type & SQUASHFS_XATTR_VALUE_OOL) { | 160 | if (type & SQUASHFS_XATTR_VALUE_OOL) { |
| 161 | __le64 xattr; | 161 | __le64 xattr_val; |
| 162 | u64 xattr; | ||
| 162 | /* val is a reference to the real location */ | 163 | /* val is a reference to the real location */ |
| 163 | err = squashfs_read_metadata(sb, &val, &start, | 164 | err = squashfs_read_metadata(sb, &val, &start, |
| 164 | &offset, sizeof(val)); | 165 | &offset, sizeof(val)); |
| 165 | if (err < 0) | 166 | if (err < 0) |
| 166 | goto failed; | 167 | goto failed; |
| 167 | err = squashfs_read_metadata(sb, &xattr, &start, | 168 | err = squashfs_read_metadata(sb, &xattr_val, |
| 168 | &offset, sizeof(xattr)); | 169 | &start, &offset, sizeof(xattr_val)); |
| 169 | if (err < 0) | 170 | if (err < 0) |
| 170 | goto failed; | 171 | goto failed; |
| 171 | xattr = le64_to_cpu(xattr); | 172 | xattr = le64_to_cpu(xattr_val); |
| 172 | start = SQUASHFS_XATTR_BLK(xattr) + | 173 | start = SQUASHFS_XATTR_BLK(xattr) + |
| 173 | msblk->xattr_table; | 174 | msblk->xattr_table; |
| 174 | offset = SQUASHFS_XATTR_OFFSET(xattr); | 175 | offset = SQUASHFS_XATTR_OFFSET(xattr); |
