diff options
author | Tahsin Erdogan <tahsin@google.com> | 2017-06-21 21:59:30 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-06-21 21:59:30 -0400 |
commit | 990461dd85d57875accc798919e6fe42ab7e294d (patch) | |
tree | 503be2bd61178cedebd7574bc215ad7fb93fd09c | |
parent | 909666933210eb145bc93426ce07f66bf3d1f798 (diff) |
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: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | fs/ext4/xattr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 61c67a04a7e1..3983bc455d02 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -1995,6 +1995,7 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode, | |||
1995 | struct ext4_inode *raw_inode; | 1995 | struct ext4_inode *raw_inode; |
1996 | struct ext4_iloc iloc; | 1996 | struct ext4_iloc iloc; |
1997 | struct ext4_xattr_entry *entry; | 1997 | struct ext4_xattr_entry *entry; |
1998 | unsigned int ea_ino; | ||
1998 | int credits = 3, error = 0; | 1999 | int credits = 3, error = 0; |
1999 | 2000 | ||
2000 | if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) | 2001 | if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) |
@@ -2009,8 +2010,8 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode, | |||
2009 | entry = EXT4_XATTR_NEXT(entry)) { | 2010 | entry = EXT4_XATTR_NEXT(entry)) { |
2010 | if (!entry->e_value_inum) | 2011 | if (!entry->e_value_inum) |
2011 | continue; | 2012 | continue; |
2012 | if (ext4_expand_ino_array(lea_ino_array, | 2013 | ea_ino = le32_to_cpu(entry->e_value_inum); |
2013 | entry->e_value_inum) != 0) { | 2014 | if (ext4_expand_ino_array(lea_ino_array, ea_ino) != 0) { |
2014 | brelse(iloc.bh); | 2015 | brelse(iloc.bh); |
2015 | goto cleanup; | 2016 | goto cleanup; |
2016 | } | 2017 | } |
@@ -2042,8 +2043,8 @@ delete_external_ea: | |||
2042 | entry = EXT4_XATTR_NEXT(entry)) { | 2043 | entry = EXT4_XATTR_NEXT(entry)) { |
2043 | if (!entry->e_value_inum) | 2044 | if (!entry->e_value_inum) |
2044 | continue; | 2045 | continue; |
2045 | if (ext4_expand_ino_array(lea_ino_array, | 2046 | ea_ino = le32_to_cpu(entry->e_value_inum); |
2046 | entry->e_value_inum) != 0) | 2047 | if (ext4_expand_ino_array(lea_ino_array, ea_ino) != 0) |
2047 | goto cleanup; | 2048 | goto cleanup; |
2048 | entry->e_value_inum = 0; | 2049 | entry->e_value_inum = 0; |
2049 | } | 2050 | } |