btrfs: struct-funcs, constify readers
commit31c986aa7e6907f28c19cd09e0b17de68f45d1c2
authorJeff Mahoney <jeffm@suse.com>
Thu, 29 Jun 2017 03:56:53 +0000 (28 21:56 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:16:07 +0000 (16 22:16 +0100)
treecc4480cba98f2bcaff60259a322f4417faaa573f
parent89643604a879a9d0400f817168737cf261a997e4
btrfs: struct-funcs, constify readers

commit 1cbb1f454e5321e47fc1e6b233066c7ccc979d15 upstream.

We have reader helpers for most of the on-disk structures that use
an extent_buffer and pointer as offset into the buffer that are
read-only.  We should mark them as const and, in turn, allow consumers
of these interfaces to mark the buffers const as well.

No impact on code, but serves as documentation that a buffer is intended
not to be modified.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/ctree.h
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/struct-funcs.c