Skip to content

Commit 0ea9de0

Browse files
jtlaytontrondmypd
authored andcommitted
sunrpc: turn warn_gssd() log message into a dprintk()
The original printk() made sense when the GSSAPI codepaths were called only when sec=krb5* was explicitly requested. Now however, in many cases the nfs client will try to acquire GSSAPI credentials by default, even when it's not requested. Since we don't have a great mechanism to distinguish between the two cases, just turn the pr_warn into a dprintk instead. With this change we can also get rid of the ratelimiting. We do need to keep the EXPORT_SYMBOL(gssd_running) in place since auth_gss.ko needs it and sunrpc.ko provides it. We can however, eliminate the gssd_running call in the nfs code since that's a bit of a layering violation. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent d529ef8 commit 0ea9de0

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

fs/nfs/nfs4client.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,7 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp,
372372
__set_bit(NFS_CS_DISCRTRY, &clp->cl_flags);
373373
__set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags);
374374

375-
error = -EINVAL;
376-
if (gssd_running(clp->cl_net))
377-
error = nfs_create_rpc_client(clp, timeparms,
378-
RPC_AUTH_GSS_KRB5I);
375+
error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_GSS_KRB5I);
379376
if (error == -EINVAL)
380377
error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX);
381378
if (error < 0)

net/sunrpc/auth_gss/auth_gss.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,7 @@ gss_setup_upcall(struct gss_auth *gss_auth, struct rpc_cred *cred)
532532

533533
static void warn_gssd(void)
534534
{
535-
static unsigned long ratelimit;
536-
unsigned long now = jiffies;
537-
538-
if (time_after(now, ratelimit)) {
539-
pr_warn("RPC: AUTH_GSS upcall failed. Please check user daemon is running.\n");
540-
ratelimit = now + 15*HZ;
541-
}
535+
dprintk("AUTH_GSS upcall failed. Please check user daemon is running.\n");
542536
}
543537

544538
static inline int

0 commit comments

Comments
 (0)