diff options
| author | Jeff Layton <jlayton@redhat.com> | 2014-01-27 14:53:27 -0500 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-01-27 15:36:05 -0500 |
| commit | 0ea9de0ea6a4e4a1d343130b2a159b4f986e288e (patch) | |
| tree | ff8858837c0e376d513c29a78fa338ba1fbea8f0 | |
| parent | d529ef83c355f97027ff85298a9709fe06216a66 (diff) | |
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>
| -rw-r--r-- | fs/nfs/nfs4client.c | 5 | ||||
| -rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 8 |
2 files changed, 2 insertions, 11 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 73d4ecda1e36..dbb3e1f30c68 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c | |||
| @@ -372,10 +372,7 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp, | |||
| 372 | __set_bit(NFS_CS_DISCRTRY, &clp->cl_flags); | 372 | __set_bit(NFS_CS_DISCRTRY, &clp->cl_flags); |
| 373 | __set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags); | 373 | __set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags); |
| 374 | 374 | ||
| 375 | error = -EINVAL; | 375 | error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_GSS_KRB5I); |
| 376 | if (gssd_running(clp->cl_net)) | ||
| 377 | error = nfs_create_rpc_client(clp, timeparms, | ||
| 378 | RPC_AUTH_GSS_KRB5I); | ||
| 379 | if (error == -EINVAL) | 376 | if (error == -EINVAL) |
| 380 | error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX); | 377 | error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX); |
| 381 | if (error < 0) | 378 | if (error < 0) |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 0a2aee060f9f..6c0513a7f992 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
| @@ -532,13 +532,7 @@ gss_setup_upcall(struct gss_auth *gss_auth, struct rpc_cred *cred) | |||
| 532 | 532 | ||
| 533 | static void warn_gssd(void) | 533 | static void warn_gssd(void) |
| 534 | { | 534 | { |
| 535 | static unsigned long ratelimit; | 535 | dprintk("AUTH_GSS upcall failed. Please check user daemon is running.\n"); |
| 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 | } | ||
| 542 | } | 536 | } |
| 543 | 537 | ||
| 544 | static inline int | 538 | static inline int |
