All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ceph: fix compilation error when building kernel without FS_ENCRYPT
@ 2022-04-19  8:49 Luís Henriques
  2022-04-19 10:24 ` Jeff Layton
  0 siblings, 1 reply; 2+ messages in thread
From: Luís Henriques @ 2022-04-19  8:49 UTC (permalink / raw)
  To: Jeff Layton, Xiubo Li, Ilya Dryomov
  Cc: ceph-devel, linux-kernel, Luís Henriques, kernel test robot

When compiling without FS_ENCRYPTION config, the kernel will fail to build
with:

fs/ceph/inode.c:196:7: error: no member named 'fscrypt_auth' in 'struct ceph_inode_info'

Enclose the code within an #ifdef CONFIG_FS_ENCRYPTION to fix it.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Luís Henriques <lhenriques@suse.de>
---
 fs/ceph/inode.c | 2 ++
 1 file changed, 2 insertions(+)

Jeff, feel free to squash this patch into one of the previous patches from
the snapshot names encryption series.

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 636e4e0a9dc6..5de7bb9048b7 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -189,6 +189,7 @@ struct inode *ceph_get_snapdir(struct inode *parent)
 	ci->i_rbytes = 0;
 	ci->i_btime = ceph_inode(parent)->i_btime;
 
+#ifdef CONFIG_FS_ENCRYPTION
 	/* if encrypted, just borrow fscrypt_auth from parent */
 	if (IS_ENCRYPTED(parent)) {
 		struct ceph_inode_info *pci = ceph_inode(parent);
@@ -205,6 +206,7 @@ struct inode *ceph_get_snapdir(struct inode *parent)
 			goto err;
 		}
 	}
+#endif
 	if (inode->i_state & I_NEW) {
 		inode->i_op = &ceph_snapdir_iops;
 		inode->i_fop = &ceph_snapdir_fops;

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

* Re: [PATCH] ceph: fix compilation error when building kernel without FS_ENCRYPT
  2022-04-19  8:49 [PATCH] ceph: fix compilation error when building kernel without FS_ENCRYPT Luís Henriques
@ 2022-04-19 10:24 ` Jeff Layton
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2022-04-19 10:24 UTC (permalink / raw)
  To: Luís Henriques, Xiubo Li, Ilya Dryomov
  Cc: ceph-devel, linux-kernel, kernel test robot

On Tue, 2022-04-19 at 09:49 +0100, Luís Henriques wrote:
> When compiling without FS_ENCRYPTION config, the kernel will fail to build
> with:
> 
> fs/ceph/inode.c:196:7: error: no member named 'fscrypt_auth' in 'struct ceph_inode_info'
> 
> Enclose the code within an #ifdef CONFIG_FS_ENCRYPTION to fix it.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Luís Henriques <lhenriques@suse.de>
> ---
>  fs/ceph/inode.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> Jeff, feel free to squash this patch into one of the previous patches from
> the snapshot names encryption series.
> 
> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> index 636e4e0a9dc6..5de7bb9048b7 100644
> --- a/fs/ceph/inode.c
> +++ b/fs/ceph/inode.c
> @@ -189,6 +189,7 @@ struct inode *ceph_get_snapdir(struct inode *parent)
>  	ci->i_rbytes = 0;
>  	ci->i_btime = ceph_inode(parent)->i_btime;
>  
> +#ifdef CONFIG_FS_ENCRYPTION
>  	/* if encrypted, just borrow fscrypt_auth from parent */
>  	if (IS_ENCRYPTED(parent)) {
>  		struct ceph_inode_info *pci = ceph_inode(parent);
> @@ -205,6 +206,7 @@ struct inode *ceph_get_snapdir(struct inode *parent)
>  			goto err;
>  		}
>  	}
> +#endif
>  	if (inode->i_state & I_NEW) {
>  		inode->i_op = &ceph_snapdir_iops;
>  		inode->i_fop = &ceph_snapdir_fops;

Thanks, I folded this one into this patch:

    ceph: add support for encrypted snapshot names

Cheers,
-- 
Jeff Layton <jlayton@kernel.org>

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

end of thread, other threads:[~2022-04-19 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19  8:49 [PATCH] ceph: fix compilation error when building kernel without FS_ENCRYPT Luís Henriques
2022-04-19 10:24 ` Jeff Layton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.