nfsd: silence sparse warning about accessing credentials
authorJeff Layton <jlayton@primarydata.com>
Tue, 15 Jul 2014 16:59:36 +0000 (12:59 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 17 Jul 2014 20:15:35 +0000 (16:15 -0400)
commitae4b884fc6316b3190be19448cea24b020c1cad6
tree8a90906fdc26381ae1283e53399492391c23b03d
parentb0fc29d6fcd0310a8437123fe6f30b1ae60a62f9
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>
fs/nfsd/auth.c
include/linux/cred.h