mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luís Henriques" <lhenriques@suse.de>
To: Jeff Layton <jlayton@kernel.org>, Xiubo Li <xiubli@redhat.com>,
	Ilya Dryomov <idryomov@gmail.com>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Luís Henriques" <lhenriques@suse.de>,
	"kernel test robot" <lkp@intel.com>
Subject: [PATCH] ceph: fix compilation error when building kernel without FS_ENCRYPT
Date: Tue, 19 Apr 2022 09:49:37 +0100	[thread overview]
Message-ID: <20220419084937.3199-1-lhenriques@suse.de> (raw)

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;

             reply	other threads:[~2022-04-19  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  8:49 Luís Henriques [this message]
2022-04-19 10:24 ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220419084937.3199-1-lhenriques@suse.de \
    --to=lhenriques@suse.de \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=xiubli@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®