Skip to content

Commit

Permalink
ext4/inline: Use unintptr_t to ensure correct pointer arithmetic
Browse files Browse the repository at this point in the history
Signed-off-by: Santhosh <santhosh.user.why.red@gmail.com>
  • Loading branch information
user-why-red committed Jun 11, 2024
1 parent b851dd1 commit c51aac7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ext4/inline.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ static int get_max_inline_xattr_value_size(struct inode *inode,
}
entry = next;
}
free = min_offs -
((void *)entry - (void *)IFIRST(header)) - sizeof(__u32);
free = min_offs - ((uintptr_t)entry - (uintptr_t)IFIRST(header)) - sizeof(__u32);

if (EXT4_I(inode)->i_inline_off) {
entry = (struct ext4_xattr_entry *)
Expand Down

0 comments on commit c51aac7

Please sign in to comment.