Commit 070969f1 authored by David Sterba's avatar David Sterba
Browse files

btrfs: rework BTRFS_I as macro to preserve parameter const



Currently BTRFS_I is a static inline function that takes a const inode
and returns btrfs inode, dropping the 'const' qualifier. This can break
assumptions of compiler though it seems there's no real case.

To make the parameter and return type consistent regardint const we can
use the container_of_const() that preserves it. However this would not
check the parameter type. To fix that use the same _Generic construct
but implement only the two expected types.

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1b6e068a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment