btrfs: struct-funcs, constify readers
authorJeff Mahoney <jeffm@suse.com>
Thu, 29 Jun 2017 03:56:53 +0000 (21:56 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Dec 2018 12:05:12 +0000 (13:05 +0100)
commit20b30415513621106d1a39202ed63cceb73ba18a
treeed210ad0ed2ca822d8705edc580f1328c60d1215
parent90eb4c02418bb479c1d154b57437fe4c2593ffb3
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