Skip to contentSkip to conversation

ubifs: add CONFIG_BLOCK dependency for encryption

PATCH In review Arnd Bergmann 3 participants 3 messages Dec 16, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubifs: add CONFIG_BLOCK dependency for encryption

This came up during the v4.10 merge window:

warning: (UBIFS_FS_ENCRYPTION) selects FS_ENCRYPTION which has unmet direct dependencies (BLOCK)
fs/crypto/crypto.c: In function 'fscrypt_zeroout_range':
fs/crypto/crypto.c:355:9: error: implicit declaration of function 'bio_alloc';did you mean 'd_alloc'? [-Werror=implicit-function-declaration]
bio = bio_alloc(GFP_NOWAIT, 1);

The easiest way out is to limit UBIFS_FS_ENCRYPTION to configurations that also enable BLOCK.

Fixes d475a507457b ("ubifs: Add skeleton for fscrypto")
---
 fs/ubifs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ubifs/Kconfig +1 -1
index 0a908ae7af13..b0d0623c83ed 100644
@@ -53,7 +53,7 @@ config UBIFS_ATIME_SUPPORT
 
 config UBIFS_FS_ENCRYPTION
 	bool "UBIFS Encryption"
-	depends on UBIFS_FS
+	depends on UBIFS_FS && BLOCK
 	select FS_ENCRYPTION
 	default n
 	help
Signature · 1 line
2.9.0
#1 lore raw

Arnd,

Quoted 9 lines · Arnd Bergmann

This came up during the v4.10 merge window:

warning: (UBIFS_FS_ENCRYPTION) selects FS_ENCRYPTION which has unmet direct dependencies (BLOCK)
fs/crypto/crypto.c: In function 'fscrypt_zeroout_range':
fs/crypto/crypto.c:355:9: error: implicit declaration of function 'bio_alloc';did you mean 'd_alloc'? [-Werror=implicit-function-declaration]
bio = bio_alloc(GFP_NOWAIT, 1);

The easiest way out is to limit UBIFS_FS_ENCRYPTION to configurations that also enable BLOCK.

Thanks for the fix!
I'll queue this for -rc2.

In the long-run I'd like to remove the CONFIG_BLOCK dependency from fs/crypto/crypto.c since UBIFS does not use the block related functions at all.

Thanks,
//richard

#2 lore raw
Quoted 8 lines · Richard Weinberger
Quoted 2 lines

The easiest way out is to limit UBIFS_FS_ENCRYPTION to configurations that also enable BLOCK.

Thanks for the fix!
I'll queue this for -rc2.

In the long-run I'd like to remove the CONFIG_BLOCK dependency from fs/crypto/crypto.c since UBIFS does not use the block related functions at all.

I would much prefer if you did that fixup now. Either by moving all the block code into a new fs/crypto/bio.c or if that's too hard by just sprinkling ifdefs.