Clean up: I cannot find CONFIG_SUNRPC_GSS_MODULE anywhere.
Signed-off-by: Chuck Lever <[email protected]>
---
fs/nfsd/nfsctl.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 164c822ae3ae..601850f59a89 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -48,6 +48,7 @@ enum {
NFSD_MaxConnections,
NFSD_Filecache,
NFSD_SupportedEnctypes,
+
/*
* The below MUST come last. Otherwise we leave a hole in nfsd_files[]
* with !CONFIG_NFSD_V4 and simple_fill_super() goes oops
@@ -197,7 +198,7 @@ static const struct file_operations export_features_operations = {
.release = single_release,
};
-#if defined(CONFIG_SUNRPC_GSS) || defined(CONFIG_SUNRPC_GSS_MODULE)
+#if defined(CONFIG_SUNRPC_GSS)
static int supported_enctypes_show(struct seq_file *m, void *v)
{
seq_printf(m, KRB5_SUPPORTED_ENCTYPES);
@@ -215,7 +216,7 @@ static const struct file_operations supported_enctypes_ops = {
.llseek = seq_lseek,
.release = single_release,
};
-#endif /* CONFIG_SUNRPC_GSS or CONFIG_SUNRPC_GSS_MODULE */
+#endif /* CONFIG_SUNRPC_GSS */
static const struct file_operations pool_stats_operations = {
.open = nfsd_pool_stats_open,
@@ -1380,9 +1381,9 @@ static int nfsd_fill_super(struct super_block *sb, struct fs_context *fc)
[NFSD_MaxBlkSize] = {"max_block_size", &transaction_ops, S_IWUSR|S_IRUGO},
[NFSD_MaxConnections] = {"max_connections", &transaction_ops, S_IWUSR|S_IRUGO},
[NFSD_Filecache] = {"filecache", &filecache_ops, S_IRUGO},
-#if defined(CONFIG_SUNRPC_GSS) || defined(CONFIG_SUNRPC_GSS_MODULE)
+#if defined(CONFIG_SUNRPC_GSS)
[NFSD_SupportedEnctypes] = {"supported_krb5_enctypes", &supported_enctypes_ops, S_IRUGO},
-#endif /* CONFIG_SUNRPC_GSS or CONFIG_SUNRPC_GSS_MODULE */
+#endif
#ifdef CONFIG_NFSD_V4
[NFSD_Leasetime] = {"nfsv4leasetime", &transaction_ops, S_IWUSR|S_IRUSR},
[NFSD_Gracetime] = {"nfsv4gracetime", &transaction_ops, S_IWUSR|S_IRUSR},
On Mon, Jul 18, 2022 at 10:00:12AM -0400, Chuck Lever wrote:
> Clean up: I cannot find CONFIG_SUNRPC_GSS_MODULE anywhere.
CONFIG_SUNRPC_GSS_MODULE is set if SUNRPC_GSS is built as a module.
CONFIG_*_MODULE is Kconfig-generated magic.
> On Jul 18, 2022, at 11:51 PM, Christoph Hellwig <[email protected]> wrote:
>
> On Mon, Jul 18, 2022 at 10:00:12AM -0400, Chuck Lever wrote:
>> Clean up: I cannot find CONFIG_SUNRPC_GSS_MODULE anywhere.
>
> CONFIG_SUNRPC_GSS_MODULE is set if SUNRPC_GSS is built as a module.
> CONFIG_*_MODULE is Kconfig-generated magic.
I can drop this patch, but I still have questions (and I know you are
just the messenger, you might not know the answers).
Where is this convention documented?
When would CONFIG_SUNRPC_GSS_MODULE be defined but CONFIG_SUNRPC_GSS isn't?
--
Chuck Lever
On Tue, Jul 19, 2022 at 10:10 AM Chuck Lever III <[email protected]> wrote:
>
>
>
> > On Jul 18, 2022, at 11:51 PM, Christoph Hellwig <[email protected]> wrote:
> >
> > On Mon, Jul 18, 2022 at 10:00:12AM -0400, Chuck Lever wrote:
> >> Clean up: I cannot find CONFIG_SUNRPC_GSS_MODULE anywhere.
> >
> > CONFIG_SUNRPC_GSS_MODULE is set if SUNRPC_GSS is built as a module.
> > CONFIG_*_MODULE is Kconfig-generated magic.
>
> I can drop this patch, but I still have questions (and I know you are
> just the messenger, you might not know the answers).
>
> Where is this convention documented?
>
> When would CONFIG_SUNRPC_GSS_MODULE be defined but CONFIG_SUNRPC_GSS isn't?
There is a macro "IS_ENABLED()" that evaluates as true if something is
either compiled in or compiled as a module. That's probably what you
want to change the "#if defined()" options to.
Anna
>
>
> --
> Chuck Lever
>
>
>
On Tue, Jul 19, 2022 at 01:27:51PM +0000, Chuck Lever III wrote:
> > CONFIG_SUNRPC_GSS_MODULE is set if SUNRPC_GSS is built as a module.
> > CONFIG_*_MODULE is Kconfig-generated magic.
>
> I can drop this patch, but I still have questions (and I know you are
> just the messenger, you might not know the answers).
>
> Where is this convention documented?
>
> When would CONFIG_SUNRPC_GSS_MODULE be defined but CONFIG_SUNRPC_GSS isn't?
If .config has CONFIG_SUNRPC_GSS=y, CONFIG_SUNRPC_GSS is set, but
CONFIG_SUNRPC_GSS_MODULE is not.
If .config has CONFIG_SUNRPC_GSS=m, CONFIG_SUNRPC_GSS_MODULE is set,
but CONFIG_SUNRPC_GSS is not.
As Anna said these days we have the IS_ENABLED helper to mostly hide
this.
I have no idea if this is documented anywhere.
> On Jul 19, 2022, at 10:39 AM, Christoph Hellwig <[email protected]> wrote:
>
> On Tue, Jul 19, 2022 at 01:27:51PM +0000, Chuck Lever III wrote:
>>> CONFIG_SUNRPC_GSS_MODULE is set if SUNRPC_GSS is built as a module.
>>> CONFIG_*_MODULE is Kconfig-generated magic.
>>
>> I can drop this patch, but I still have questions (and I know you are
>> just the messenger, you might not know the answers).
>>
>> Where is this convention documented?
>>
>> When would CONFIG_SUNRPC_GSS_MODULE be defined but CONFIG_SUNRPC_GSS isn't?
>
> If .config has CONFIG_SUNRPC_GSS=y, CONFIG_SUNRPC_GSS is set, but
> CONFIG_SUNRPC_GSS_MODULE is not.
>
> If .config has CONFIG_SUNRPC_GSS=m, CONFIG_SUNRPC_GSS_MODULE is set,
> but CONFIG_SUNRPC_GSS is not.
>
> As Anna said these days we have the IS_ENABLED helper to mostly hide
> this.
IS_ENABLED was added by 2a11c8ea20bf ("kconfig: Introduce IS_ENABLED(),
IS_BUILTIN() and IS_MODULE()"), in July of 2011.
The commit that added the explicit check for CONFIG_SUNRPC_GSS_MODULE
is b084f598df36 ("nfsd: fix dependency of nfsd on auth_rpcgss"),
written in May of 2011.
So it's likely this is indeed just an open-coded IS_ENABLED().
--
Chuck Lever