summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/auth.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-07-15 12:59:36 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-07-17 16:15:35 -0400
commitae4b884fc6316b3190be19448cea24b020c1cad6 (patch)
tree8a90906fdc26381ae1283e53399492391c23b03d /fs/nfsd/auth.c
parentb0fc29d6fcd0310a8437123fe6f30b1ae60a62f9 (diff)
downloadop-kernel-dev-ae4b884fc6316b3190be19448cea24b020c1cad6.zip
op-kernel-dev-ae4b884fc6316b3190be19448cea24b020c1cad6.tar.gz
nfsd: silence sparse warning about accessing credentials
sparse says: fs/nfsd/auth.c:31:38: warning: incorrect type in argument 1 (different address spaces) fs/nfsd/auth.c:31:38: expected struct cred const *cred fs/nfsd/auth.c:31:38: got struct cred const [noderef] <asn:4>*real_cred Add a new accessor for the ->real_cred and use that to fetch the pointer. Accessing current->real_cred directly is actually quite safe since we know that they can't go away so this is mostly a cosmetic fixup to silence sparse. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/auth.c')
-rw-r--r--fs/nfsd/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c
index 72f4482..9d46a0b 100644
--- a/fs/nfsd/auth.c
+++ b/fs/nfsd/auth.c
@@ -28,7 +28,7 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
validate_process_creds();
/* discard any old override before preparing the new set */
- revert_creds(get_cred(current->real_cred));
+ revert_creds(get_cred(current_real_cred()));
new = prepare_creds();
if (!new)
return -ENOMEM;
OpenPOWER on IntegriCloud