]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce EXPORT_FOR_TESTS macro
authorJohannes Thumshirn <jthumshirn@suse.de>
Mon, 19 Nov 2018 09:38:16 +0000 (10:38 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:37 +0000 (14:51 +0100)
commitc50d9150e0f64ab3875046ccaca31f81f31f30d8
tree94066b9812170c6c315af29cfea1830199fea6ad
parent4f4d364d06be2f4c036d419f150e82d4294d5bea
btrfs: introduce EXPORT_FOR_TESTS macro

Depending on whether CONFIG_BTRFS_FS_RUN_SANITY_TESTS is set, some BTRFS
functions are either local to the file they are implemented in and thus
should be declared static or are called from within the test
implementation defined in a different file.

Introduce an EXPORT_FOR_TESTS macro which depending on
CONFIG_BTRFS_FS_RUN_SANITY_TESTS either adds the 'static' keyword to a
function or not.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h