Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543281 > unrolled thread

[PATCH] ubifs: add CONFIG_BLOCK dependency for encryption

Started byArnd Bergmann <arnd@arndb.de>
First post2016-12-16 10:10 +0100
Last post2016-12-16 10:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ubifs: add CONFIG_BLOCK dependency for encryption Arnd Bergmann <arnd@arndb.de> - 2016-12-16 10:10 +0100
    Re: [PATCH] ubifs: add CONFIG_BLOCK dependency for encryption Richard Weinberger <richard@nod.at> - 2016-12-16 10:30 +0100
      Re: [PATCH] ubifs: add CONFIG_BLOCK dependency for encryption Christoph Hellwig <hch@infradead.org> - 2016-12-16 10:40 +0100

#1543281 — [PATCH] ubifs: add CONFIG_BLOCK dependency for encryption

FromArnd Bergmann <arnd@arndb.de>
Date2016-12-16 10:10 +0100
Subject[PATCH] ubifs: add CONFIG_BLOCK dependency for encryption
Message-ID<sOWGC-1t7-31@gated-at.bofh.it>
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/ubifs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ubifs/Kconfig b/fs/ubifs/Kconfig
index 0a908ae7af13..b0d0623c83ed 100644
--- a/fs/ubifs/Kconfig
+++ b/fs/ubifs/Kconfig
@@ -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
-- 
2.9.0

[toc] | [next] | [standalone]


#1543312

FromRichard Weinberger <richard@nod.at>
Date2016-12-16 10:30 +0100
Message-ID<sOWZY-1DO-47@gated-at.bofh.it>
In reply to#1543281
Arnd,

On 16.12.2016 09:42, Arnd Bergmann wrote:
> 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

[toc] | [prev] | [next] | [standalone]


#1543317

FromChristoph Hellwig <hch@infradead.org>
Date2016-12-16 10:40 +0100
Message-ID<sOX9E-1Ii-7@gated-at.bofh.it>
In reply to#1543312
On Fri, Dec 16, 2016 at 10:26:35AM +0100, Richard Weinberger wrote:
> > 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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web