linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dax: hide block device code in #ifdef
@ 2017-05-15 13:44 Arnd Bergmann
  2017-05-15 13:44 ` [PATCH 2/2] fs: xfs: add DAX dependency Arnd Bergmann
  2017-05-15 14:11 ` [PATCH 1/2] dax: hide block device code in #ifdef Dan Williams
  0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-05-15 13:44 UTC (permalink / raw)
  To: Dan Williams
  Cc: Jan Kara, Geert Uytterhoeven, linux-xfs, Darrick J . Wong,
	Arnd Bergmann, linux-kernel

We allow configurations with CONFIG_BLOCK=n and CONFIG_DAX=y, which now
results in a link error:

drivers/dax/super.c: In function 'bdev_dax_pgoff':
drivers/dax/super.c:50:26: error: implicit declaration of function 'get_start_sect'; did you mean 'get_task_cred'? [-Werror=implicit-function-declaration]

The two obvious ways to avoid the link error are to either add an #ifdef
around the code that was moved from fs/block_dev.c, or to disallow the
configuration. I could not see if there is or is not a reason to support
this combination of options, but in case there is, the #ifdef is the
safer choice.

Fixes: ef51042472f5 ("block, dax: move "select DAX" from BLOCK to FS_DAX")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/dax/super.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index ebf43f531ada..6ed32aac8bbe 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -44,6 +44,7 @@ void dax_read_unlock(int id)
 }
 EXPORT_SYMBOL_GPL(dax_read_unlock);
 
+#ifdef CONFIG_BLOCK
 int bdev_dax_pgoff(struct block_device *bdev, sector_t sector, size_t size,
 		pgoff_t *pgoff)
 {
@@ -112,6 +113,7 @@ int __bdev_dax_supported(struct super_block *sb, int blocksize)
 	return 0;
 }
 EXPORT_SYMBOL_GPL(__bdev_dax_supported);
+#endif
 
 /**
  * struct dax_device - anchor object for dax services
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-16 11:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 13:44 [PATCH 1/2] dax: hide block device code in #ifdef Arnd Bergmann
2017-05-15 13:44 ` [PATCH 2/2] fs: xfs: add DAX dependency Arnd Bergmann
2017-05-15 14:11 ` [PATCH 1/2] dax: hide block device code in #ifdef Dan Williams
2017-05-15 14:20   ` Arnd Bergmann
2017-05-15 15:50     ` Darrick J. Wong
2017-05-16 11:16       ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).