Arnd Bergmann f021bd071f xfs: remove dax code from object file when disabled
We check IS_DAX(inode) before calling either xfs_file_dax_read or
xfs_file_dax_write, and this will lead the call being optimized out at
compile time when CONFIG_FS_DAX is disabled.

However, the two functions are marked STATIC, so they become global
symbols when CONFIG_XFS_DEBUG is set, leaving us with two unused global
functions that call into an undefined function and a broken "allmodconfig"
build:

fs/built-in.o: In function `xfs_file_dax_read':
fs/xfs/xfs_file.c:348: undefined reference to `dax_do_io'
fs/built-in.o: In function `xfs_file_dax_write':
fs/xfs/xfs_file.c:758: undefined reference to `dax_do_io'

Marking the two functions 'static noinline' instead of 'STATIC' will let
the compiler drop the symbols when there are no callers but avoid the
implicit inlining.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 16d4d43595b4 ("xfs: split direct I/O and DAX path")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2016-07-22 09:50:55 +10:00
..
2016-05-26 10:13:40 -07:00
2014-07-30 09:12:05 +10:00
2016-04-06 09:47:01 +10:00
2016-04-06 09:47:01 +10:00
2016-03-18 11:42:53 -04:00
2013-05-07 18:45:36 -05:00
2011-08-12 16:21:35 -05:00
2012-11-19 20:11:24 -06:00
2016-03-31 00:30:15 -04:00
2016-05-26 19:34:26 -07:00
2011-08-12 16:21:35 -05:00
2015-06-22 09:44:02 +10:00
2011-08-12 16:21:35 -05:00
2016-07-20 11:31:42 +10:00
2016-02-09 16:54:58 +11:00
2016-04-06 09:20:36 +10:00
2016-04-06 09:20:36 +10:00
2016-04-06 09:20:36 +10:00
2013-05-07 18:45:36 -05:00
2016-05-26 10:13:40 -07:00
2016-05-26 10:13:40 -07:00
2016-05-26 10:13:40 -07:00
2016-03-18 11:42:53 -04:00
2016-04-06 09:19:55 +10:00
2016-05-26 19:34:26 -07:00
2016-07-20 11:38:55 +10:00
2016-04-06 09:20:36 +10:00
2013-05-07 18:45:36 -05:00