NFS: Fix a number of sparse warnings

Fix a number of "warning: symbol 'foo' was not declared. Should it be
static?" conditions.

Fix 2 cases of "warning: Using plain integer as NULL pointer"

fs/nfs/delegation.c:263:31: warning: restricted fmode_t degrades to integer
  - We want to allow upgrades to a WRITE delegation, but should otherwise
    consider servers that hand out duplicate delegations to be borken.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust 2012-03-11 13:11:00 -04:00
parent 5ffaf85541
commit 17280175c5
13 changed files with 38 additions and 33 deletions

View file

@ -54,8 +54,8 @@
/* Default cache timeout is 10 minutes */
unsigned int nfs_idmap_cache_timeout = 600;
const struct cred *id_resolver_cache;
struct key_type key_type_id_resolver_legacy;
static const struct cred *id_resolver_cache;
static struct key_type key_type_id_resolver_legacy;
/**
@ -160,7 +160,7 @@ static int nfs_map_numeric_to_string(__u32 id, char *buf, size_t buflen)
return snprintf(buf, buflen, "%u", id);
}
struct key_type key_type_id_resolver = {
static struct key_type key_type_id_resolver = {
.name = "id_resolver",
.instantiate = user_instantiate,
.match = user_match,
@ -381,7 +381,7 @@ static const struct rpc_pipe_ops idmap_upcall_ops = {
.destroy_msg = idmap_pipe_destroy_msg,
};
struct key_type key_type_id_resolver_legacy = {
static struct key_type key_type_id_resolver_legacy = {
.name = "id_resolver",
.instantiate = user_instantiate,
.match = user_match,