• David Sterba's avatar
    btrfs: use unaligned helpers for stack and header set/get helpers · e97659ce
    David Sterba authored
    In the definitions generated by BTRFS_SETGET_HEADER_FUNCS there's direct
    pointer assignment but we should use the helpers for unaligned access
    for clarity. It hasn't been a problem so far because of the natural
    alignment.
    
    Similarly for BTRFS_SETGET_STACK_FUNCS, that usually get a structure
    from stack that has an aligned start but some members may not be aligned
    due to packing. This as well hasn't caused problems so far.
    
    Move the put/get_unaligned_le8 stubs to ctree.h so we can use them.
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    e97659ce
struct-funcs.c 6.03 KB