Commit 990461dd authored by Tahsin Erdogan's avatar Tahsin Erdogan Committed by Theodore Ts'o

ext4: add missing le32_to_cpu(e_value_inum) conversions

Two places in code missed converting xattr inode number using
le32_to_cpu().
Signed-off-by: default avatarTahsin Erdogan <tahsin@google.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 90966693
...@@ -1995,6 +1995,7 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode, ...@@ -1995,6 +1995,7 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode,
struct ext4_inode *raw_inode; struct ext4_inode *raw_inode;
struct ext4_iloc iloc; struct ext4_iloc iloc;
struct ext4_xattr_entry *entry; struct ext4_xattr_entry *entry;
unsigned int ea_ino;
int credits = 3, error = 0; int credits = 3, error = 0;
if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR))
...@@ -2009,8 +2010,8 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode, ...@@ -2009,8 +2010,8 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode,
entry = EXT4_XATTR_NEXT(entry)) { entry = EXT4_XATTR_NEXT(entry)) {
if (!entry->e_value_inum) if (!entry->e_value_inum)
continue; continue;
if (ext4_expand_ino_array(lea_ino_array, ea_ino = le32_to_cpu(entry->e_value_inum);
entry->e_value_inum) != 0) { if (ext4_expand_ino_array(lea_ino_array, ea_ino) != 0) {
brelse(iloc.bh); brelse(iloc.bh);
goto cleanup; goto cleanup;
} }
...@@ -2042,8 +2043,8 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode, ...@@ -2042,8 +2043,8 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode,
entry = EXT4_XATTR_NEXT(entry)) { entry = EXT4_XATTR_NEXT(entry)) {
if (!entry->e_value_inum) if (!entry->e_value_inum)
continue; continue;
if (ext4_expand_ino_array(lea_ino_array, ea_ino = le32_to_cpu(entry->e_value_inum);
entry->e_value_inum) != 0) if (ext4_expand_ino_array(lea_ino_array, ea_ino) != 0)
goto cleanup; goto cleanup;
entry->e_value_inum = 0; entry->e_value_inum = 0;
} }
......
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