[PATCH] dax: Kconfig: add depends on !FS_DAX_LIMITED for ARCH_HAS_PMEM_API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The implementation of dax_flush() is non-NULL if
CONFIG_ARCH_HAS_PMEM_API is selected. Then if we select
CONFIG_FS_DAX_LIMITED with CONFIG_ARCH_HAS_PMEM_API in
the future, the dax_flush() in the dax_writeback_one()
will cause a panic since it accepts the struct page by
default:

dax_flush(dax_dev, page_address(pfn_to_page(pfn)), count * PAGE_SIZE);

Instead of fixing this, it is better to declare in Kconfig
that pmem does not support CONFIG_FS_DAX_LIMITED now.

Signed-off-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
---
BTW, it seems that CONFIG_FS_DAX_LIMITED currently only has
DCSSBLK as a user, but this makes filesystems dax must support
the case that the struct page is not required, which makes the
code complicated. Is it possible to remove DCSSBLK or change it
to also require struct page?

 lib/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Kconfig b/lib/Kconfig
index a7cd6605cc6c..6989ad3fea99 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -672,6 +672,7 @@ config ARCH_NO_SG_CHAIN
 
 config ARCH_HAS_PMEM_API
 	bool
+	depends on !FS_DAX_LIMITED
 
 config MEMREGION
 	bool
-- 
2.20.1




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux