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>
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index f72c1fc..f9f89fc 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -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 @@
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 @@
.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,