[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220419084937.3199-1-lhenriques@suse.de>
Date: Tue, 19 Apr 2022 09:49:37 +0100
From: Luís Henriques <lhenriques@...e.de>
To: Jeff Layton <jlayton@...nel.org>, Xiubo Li <xiubli@...hat.com>,
Ilya Dryomov <idryomov@...il.com>
Cc: ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
Luís Henriques <lhenriques@...e.de>,
kernel test robot <lkp@...el.com>
Subject: [PATCH] ceph: fix compilation error when building kernel without FS_ENCRYPT
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@...el.com>
Signed-off-by: Luís Henriques <lhenriques@...e.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;
Powered by blists - more mailing lists