diff options
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r-- | fs/ext4/inline.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 3543fe80a3c4..7b4736022761 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c | |||
@@ -1753,6 +1753,7 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data) | |||
1753 | { | 1753 | { |
1754 | int err, inline_size; | 1754 | int err, inline_size; |
1755 | struct ext4_iloc iloc; | 1755 | struct ext4_iloc iloc; |
1756 | size_t inline_len; | ||
1756 | void *inline_pos; | 1757 | void *inline_pos; |
1757 | unsigned int offset; | 1758 | unsigned int offset; |
1758 | struct ext4_dir_entry_2 *de; | 1759 | struct ext4_dir_entry_2 *de; |
@@ -1780,8 +1781,9 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data) | |||
1780 | goto out; | 1781 | goto out; |
1781 | } | 1782 | } |
1782 | 1783 | ||
1784 | inline_len = ext4_get_inline_size(dir); | ||
1783 | offset = EXT4_INLINE_DOTDOT_SIZE; | 1785 | offset = EXT4_INLINE_DOTDOT_SIZE; |
1784 | while (offset < dir->i_size) { | 1786 | while (offset < inline_len) { |
1785 | de = ext4_get_inline_entry(dir, &iloc, offset, | 1787 | de = ext4_get_inline_entry(dir, &iloc, offset, |
1786 | &inline_pos, &inline_size); | 1788 | &inline_pos, &inline_size); |
1787 | if (ext4_check_dir_entry(dir, NULL, de, | 1789 | if (ext4_check_dir_entry(dir, NULL, de, |