diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-11 13:11:00 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-11 15:14:16 -0400 |
commit | 17280175c587469b34757263c7cfc608f0ea2334 (patch) | |
tree | 34a3008bfd1055e9fdb0557ea563484b67433797 | |
parent | 5ffaf8554163d9f3873988ce2f9977f6c6f408d2 (diff) |
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>
-rw-r--r-- | fs/nfs/callback.c | 4 | ||||
-rw-r--r-- | fs/nfs/client.c | 5 | ||||
-rw-r--r-- | fs/nfs/delegation.c | 5 | ||||
-rw-r--r-- | fs/nfs/dns_resolve.c | 1 | ||||
-rw-r--r-- | fs/nfs/idmap.c | 8 | ||||
-rw-r--r-- | fs/nfs/nfs3acl.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 10 | ||||
-rw-r--r-- | fs/nfs/nfs4filelayoutdev.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 23 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 3 | ||||
-rw-r--r-- | fs/nfs/objlayout/objlayout.c | 2 | ||||
-rw-r--r-- | fs/nfs/pnfs_dev.c | 2 | ||||
-rw-r--r-- | fs/nfs/unlink.c | 2 |
13 files changed, 38 insertions, 33 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 2afe23349c7b..eb95f5091c1a 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -101,7 +101,7 @@ nfs4_callback_svc(void *vrqstp) | |||
101 | /* | 101 | /* |
102 | * Prepare to bring up the NFSv4 callback service | 102 | * Prepare to bring up the NFSv4 callback service |
103 | */ | 103 | */ |
104 | struct svc_rqst * | 104 | static struct svc_rqst * |
105 | nfs4_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) | 105 | nfs4_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) |
106 | { | 106 | { |
107 | int ret; | 107 | int ret; |
@@ -172,7 +172,7 @@ nfs41_callback_svc(void *vrqstp) | |||
172 | /* | 172 | /* |
173 | * Bring up the NFSv4.1 callback service | 173 | * Bring up the NFSv4.1 callback service |
174 | */ | 174 | */ |
175 | struct svc_rqst * | 175 | static struct svc_rqst * |
176 | nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) | 176 | nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) |
177 | { | 177 | { |
178 | struct svc_rqst *rqstp; | 178 | struct svc_rqst *rqstp; |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index d30dcbfb6b20..f1f047c376d9 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -443,9 +443,8 @@ static int nfs_sockaddr_cmp(const struct sockaddr *sa1, | |||
443 | } | 443 | } |
444 | 444 | ||
445 | /* Common match routine for v4.0 and v4.1 callback services */ | 445 | /* Common match routine for v4.0 and v4.1 callback services */ |
446 | bool | 446 | static bool nfs4_cb_match_client(const struct sockaddr *addr, |
447 | nfs4_cb_match_client(const struct sockaddr *addr, struct nfs_client *clp, | 447 | struct nfs_client *clp, u32 minorversion) |
448 | u32 minorversion) | ||
449 | { | 448 | { |
450 | struct sockaddr *clap = (struct sockaddr *)&clp->cl_addr; | 449 | struct sockaddr *clap = (struct sockaddr *)&clp->cl_addr; |
451 | 450 | ||
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 12de88353eeb..89af1d269274 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -256,11 +256,14 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
256 | /* | 256 | /* |
257 | * Deal with broken servers that hand out two | 257 | * Deal with broken servers that hand out two |
258 | * delegations for the same file. | 258 | * delegations for the same file. |
259 | * Allow for upgrades to a WRITE delegation, but | ||
260 | * nothing else. | ||
259 | */ | 261 | */ |
260 | dfprintk(FILE, "%s: server %s handed out " | 262 | dfprintk(FILE, "%s: server %s handed out " |
261 | "a duplicate delegation!\n", | 263 | "a duplicate delegation!\n", |
262 | __func__, clp->cl_hostname); | 264 | __func__, clp->cl_hostname); |
263 | if (delegation->type <= old_delegation->type) { | 265 | if (delegation->type == old_delegation->type || |
266 | !(delegation->type & FMODE_WRITE)) { | ||
264 | freeme = delegation; | 267 | freeme = delegation; |
265 | delegation = NULL; | 268 | delegation = NULL; |
266 | goto out; | 269 | goto out; |
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index fcd8f1d7430f..b3924b8a6000 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/sunrpc/clnt.h> | 11 | #include <linux/sunrpc/clnt.h> |
12 | #include <linux/dns_resolver.h> | 12 | #include <linux/dns_resolver.h> |
13 | #include "dns_resolve.h" | ||
13 | 14 | ||
14 | ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen, | 15 | ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen, |
15 | struct sockaddr *sa, size_t salen) | 16 | struct sockaddr *sa, size_t salen) |
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index f72c1fc074e1..f9f89fc83ee0 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -54,8 +54,8 @@ | |||
54 | 54 | ||
55 | /* Default cache timeout is 10 minutes */ | 55 | /* Default cache timeout is 10 minutes */ |
56 | unsigned int nfs_idmap_cache_timeout = 600; | 56 | unsigned int nfs_idmap_cache_timeout = 600; |
57 | const struct cred *id_resolver_cache; | 57 | static const struct cred *id_resolver_cache; |
58 | struct key_type key_type_id_resolver_legacy; | 58 | static struct key_type key_type_id_resolver_legacy; |
59 | 59 | ||
60 | 60 | ||
61 | /** | 61 | /** |
@@ -160,7 +160,7 @@ static int nfs_map_numeric_to_string(__u32 id, char *buf, size_t buflen) | |||
160 | return snprintf(buf, buflen, "%u", id); | 160 | return snprintf(buf, buflen, "%u", id); |
161 | } | 161 | } |
162 | 162 | ||
163 | struct key_type key_type_id_resolver = { | 163 | static struct key_type key_type_id_resolver = { |
164 | .name = "id_resolver", | 164 | .name = "id_resolver", |
165 | .instantiate = user_instantiate, | 165 | .instantiate = user_instantiate, |
166 | .match = user_match, | 166 | .match = user_match, |
@@ -381,7 +381,7 @@ static const struct rpc_pipe_ops idmap_upcall_ops = { | |||
381 | .destroy_msg = idmap_pipe_destroy_msg, | 381 | .destroy_msg = idmap_pipe_destroy_msg, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | struct key_type key_type_id_resolver_legacy = { | 384 | static struct key_type key_type_id_resolver_legacy = { |
385 | .name = "id_resolver", | 385 | .name = "id_resolver", |
386 | .instantiate = user_instantiate, | 386 | .instantiate = user_instantiate, |
387 | .match = user_match, | 387 | .match = user_match, |
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index 7ef23979896d..e4498dc351a8 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c | |||
@@ -192,7 +192,7 @@ struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type) | |||
192 | .pages = pages, | 192 | .pages = pages, |
193 | }; | 193 | }; |
194 | struct nfs3_getaclres res = { | 194 | struct nfs3_getaclres res = { |
195 | 0 | 195 | NULL, |
196 | }; | 196 | }; |
197 | struct rpc_message msg = { | 197 | struct rpc_message msg = { |
198 | .rpc_argp = &args, | 198 | .rpc_argp = &args, |
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 716fac6bc082..379a085f8f25 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -323,21 +323,21 @@ static void filelayout_commit_release(void *data) | |||
323 | nfs_commitdata_release(wdata); | 323 | nfs_commitdata_release(wdata); |
324 | } | 324 | } |
325 | 325 | ||
326 | struct rpc_call_ops filelayout_read_call_ops = { | 326 | static const struct rpc_call_ops filelayout_read_call_ops = { |
327 | .rpc_call_prepare = filelayout_read_prepare, | 327 | .rpc_call_prepare = filelayout_read_prepare, |
328 | .rpc_call_done = filelayout_read_call_done, | 328 | .rpc_call_done = filelayout_read_call_done, |
329 | .rpc_count_stats = filelayout_read_count_stats, | 329 | .rpc_count_stats = filelayout_read_count_stats, |
330 | .rpc_release = filelayout_read_release, | 330 | .rpc_release = filelayout_read_release, |
331 | }; | 331 | }; |
332 | 332 | ||
333 | struct rpc_call_ops filelayout_write_call_ops = { | 333 | static const struct rpc_call_ops filelayout_write_call_ops = { |
334 | .rpc_call_prepare = filelayout_write_prepare, | 334 | .rpc_call_prepare = filelayout_write_prepare, |
335 | .rpc_call_done = filelayout_write_call_done, | 335 | .rpc_call_done = filelayout_write_call_done, |
336 | .rpc_count_stats = filelayout_write_count_stats, | 336 | .rpc_count_stats = filelayout_write_count_stats, |
337 | .rpc_release = filelayout_write_release, | 337 | .rpc_release = filelayout_write_release, |
338 | }; | 338 | }; |
339 | 339 | ||
340 | struct rpc_call_ops filelayout_commit_call_ops = { | 340 | static const struct rpc_call_ops filelayout_commit_call_ops = { |
341 | .rpc_call_prepare = filelayout_write_prepare, | 341 | .rpc_call_prepare = filelayout_write_prepare, |
342 | .rpc_call_done = filelayout_write_call_done, | 342 | .rpc_call_done = filelayout_write_call_done, |
343 | .rpc_count_stats = filelayout_write_count_stats, | 343 | .rpc_count_stats = filelayout_write_count_stats, |
@@ -723,7 +723,7 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev, | |||
723 | return (p_stripe == r_stripe); | 723 | return (p_stripe == r_stripe); |
724 | } | 724 | } |
725 | 725 | ||
726 | void | 726 | static void |
727 | filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, | 727 | filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, |
728 | struct nfs_page *req) | 728 | struct nfs_page *req) |
729 | { | 729 | { |
@@ -740,7 +740,7 @@ filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, | |||
740 | nfs_pageio_reset_read_mds(pgio); | 740 | nfs_pageio_reset_read_mds(pgio); |
741 | } | 741 | } |
742 | 742 | ||
743 | void | 743 | static void |
744 | filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio, | 744 | filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio, |
745 | struct nfs_page *req) | 745 | struct nfs_page *req) |
746 | { | 746 | { |
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index 41677f0bf792..a866bbd2890a 100644 --- a/fs/nfs/nfs4filelayoutdev.c +++ b/fs/nfs/nfs4filelayoutdev.c | |||
@@ -45,7 +45,7 @@ | |||
45 | * - incremented when a device id maps a data server already in the cache. | 45 | * - incremented when a device id maps a data server already in the cache. |
46 | * - decremented when deviceid is removed from the cache. | 46 | * - decremented when deviceid is removed from the cache. |
47 | */ | 47 | */ |
48 | DEFINE_SPINLOCK(nfs4_ds_cache_lock); | 48 | static DEFINE_SPINLOCK(nfs4_ds_cache_lock); |
49 | static LIST_HEAD(nfs4_data_server_cache); | 49 | static LIST_HEAD(nfs4_data_server_cache); |
50 | 50 | ||
51 | /* Debug routines */ | 51 | /* Debug routines */ |
@@ -108,7 +108,7 @@ same_sockaddr(struct sockaddr *addr1, struct sockaddr *addr2) | |||
108 | return false; | 108 | return false; |
109 | } | 109 | } |
110 | 110 | ||
111 | bool | 111 | static bool |
112 | _same_data_server_addrs_locked(const struct list_head *dsaddrs1, | 112 | _same_data_server_addrs_locked(const struct list_head *dsaddrs1, |
113 | const struct list_head *dsaddrs2) | 113 | const struct list_head *dsaddrs2) |
114 | { | 114 | { |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 3bf5593741ee..36a7cda03445 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -677,12 +677,12 @@ static void nfs41_call_sync_done(struct rpc_task *task, void *calldata) | |||
677 | nfs41_sequence_done(task, data->seq_res); | 677 | nfs41_sequence_done(task, data->seq_res); |
678 | } | 678 | } |
679 | 679 | ||
680 | struct rpc_call_ops nfs41_call_sync_ops = { | 680 | static const struct rpc_call_ops nfs41_call_sync_ops = { |
681 | .rpc_call_prepare = nfs41_call_sync_prepare, | 681 | .rpc_call_prepare = nfs41_call_sync_prepare, |
682 | .rpc_call_done = nfs41_call_sync_done, | 682 | .rpc_call_done = nfs41_call_sync_done, |
683 | }; | 683 | }; |
684 | 684 | ||
685 | struct rpc_call_ops nfs41_call_priv_sync_ops = { | 685 | static const struct rpc_call_ops nfs41_call_priv_sync_ops = { |
686 | .rpc_call_prepare = nfs41_call_priv_sync_prepare, | 686 | .rpc_call_prepare = nfs41_call_priv_sync_prepare, |
687 | .rpc_call_done = nfs41_call_sync_done, | 687 | .rpc_call_done = nfs41_call_sync_done, |
688 | }; | 688 | }; |
@@ -4770,7 +4770,7 @@ static void nfs4_release_lockowner_release(void *calldata) | |||
4770 | kfree(calldata); | 4770 | kfree(calldata); |
4771 | } | 4771 | } |
4772 | 4772 | ||
4773 | const struct rpc_call_ops nfs4_release_lockowner_ops = { | 4773 | static const struct rpc_call_ops nfs4_release_lockowner_ops = { |
4774 | .rpc_release = nfs4_release_lockowner_release, | 4774 | .rpc_release = nfs4_release_lockowner_release, |
4775 | }; | 4775 | }; |
4776 | 4776 | ||
@@ -4910,7 +4910,8 @@ static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct | |||
4910 | return status; | 4910 | return status; |
4911 | } | 4911 | } |
4912 | 4912 | ||
4913 | int nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors) | 4913 | static int nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, |
4914 | struct nfs4_secinfo_flavors *flavors) | ||
4914 | { | 4915 | { |
4915 | struct nfs4_exception exception = { }; | 4916 | struct nfs4_exception exception = { }; |
4916 | int err; | 4917 | int err; |
@@ -5096,7 +5097,7 @@ static void nfs4_get_lease_time_done(struct rpc_task *task, void *calldata) | |||
5096 | dprintk("<-- %s\n", __func__); | 5097 | dprintk("<-- %s\n", __func__); |
5097 | } | 5098 | } |
5098 | 5099 | ||
5099 | struct rpc_call_ops nfs4_get_lease_time_ops = { | 5100 | static const struct rpc_call_ops nfs4_get_lease_time_ops = { |
5100 | .rpc_call_prepare = nfs4_get_lease_time_prepare, | 5101 | .rpc_call_prepare = nfs4_get_lease_time_prepare, |
5101 | .rpc_call_done = nfs4_get_lease_time_done, | 5102 | .rpc_call_done = nfs4_get_lease_time_done, |
5102 | }; | 5103 | }; |
@@ -6319,7 +6320,7 @@ static bool nfs4_match_stateid(const nfs4_stateid *s1, | |||
6319 | } | 6320 | } |
6320 | 6321 | ||
6321 | 6322 | ||
6322 | struct nfs4_state_recovery_ops nfs40_reboot_recovery_ops = { | 6323 | static const struct nfs4_state_recovery_ops nfs40_reboot_recovery_ops = { |
6323 | .owner_flag_bit = NFS_OWNER_RECLAIM_REBOOT, | 6324 | .owner_flag_bit = NFS_OWNER_RECLAIM_REBOOT, |
6324 | .state_flag_bit = NFS_STATE_RECLAIM_REBOOT, | 6325 | .state_flag_bit = NFS_STATE_RECLAIM_REBOOT, |
6325 | .recover_open = nfs4_open_reclaim, | 6326 | .recover_open = nfs4_open_reclaim, |
@@ -6329,7 +6330,7 @@ struct nfs4_state_recovery_ops nfs40_reboot_recovery_ops = { | |||
6329 | }; | 6330 | }; |
6330 | 6331 | ||
6331 | #if defined(CONFIG_NFS_V4_1) | 6332 | #if defined(CONFIG_NFS_V4_1) |
6332 | struct nfs4_state_recovery_ops nfs41_reboot_recovery_ops = { | 6333 | static const struct nfs4_state_recovery_ops nfs41_reboot_recovery_ops = { |
6333 | .owner_flag_bit = NFS_OWNER_RECLAIM_REBOOT, | 6334 | .owner_flag_bit = NFS_OWNER_RECLAIM_REBOOT, |
6334 | .state_flag_bit = NFS_STATE_RECLAIM_REBOOT, | 6335 | .state_flag_bit = NFS_STATE_RECLAIM_REBOOT, |
6335 | .recover_open = nfs4_open_reclaim, | 6336 | .recover_open = nfs4_open_reclaim, |
@@ -6340,7 +6341,7 @@ struct nfs4_state_recovery_ops nfs41_reboot_recovery_ops = { | |||
6340 | }; | 6341 | }; |
6341 | #endif /* CONFIG_NFS_V4_1 */ | 6342 | #endif /* CONFIG_NFS_V4_1 */ |
6342 | 6343 | ||
6343 | struct nfs4_state_recovery_ops nfs40_nograce_recovery_ops = { | 6344 | static const struct nfs4_state_recovery_ops nfs40_nograce_recovery_ops = { |
6344 | .owner_flag_bit = NFS_OWNER_RECLAIM_NOGRACE, | 6345 | .owner_flag_bit = NFS_OWNER_RECLAIM_NOGRACE, |
6345 | .state_flag_bit = NFS_STATE_RECLAIM_NOGRACE, | 6346 | .state_flag_bit = NFS_STATE_RECLAIM_NOGRACE, |
6346 | .recover_open = nfs4_open_expired, | 6347 | .recover_open = nfs4_open_expired, |
@@ -6350,7 +6351,7 @@ struct nfs4_state_recovery_ops nfs40_nograce_recovery_ops = { | |||
6350 | }; | 6351 | }; |
6351 | 6352 | ||
6352 | #if defined(CONFIG_NFS_V4_1) | 6353 | #if defined(CONFIG_NFS_V4_1) |
6353 | struct nfs4_state_recovery_ops nfs41_nograce_recovery_ops = { | 6354 | static const struct nfs4_state_recovery_ops nfs41_nograce_recovery_ops = { |
6354 | .owner_flag_bit = NFS_OWNER_RECLAIM_NOGRACE, | 6355 | .owner_flag_bit = NFS_OWNER_RECLAIM_NOGRACE, |
6355 | .state_flag_bit = NFS_STATE_RECLAIM_NOGRACE, | 6356 | .state_flag_bit = NFS_STATE_RECLAIM_NOGRACE, |
6356 | .recover_open = nfs41_open_expired, | 6357 | .recover_open = nfs41_open_expired, |
@@ -6360,14 +6361,14 @@ struct nfs4_state_recovery_ops nfs41_nograce_recovery_ops = { | |||
6360 | }; | 6361 | }; |
6361 | #endif /* CONFIG_NFS_V4_1 */ | 6362 | #endif /* CONFIG_NFS_V4_1 */ |
6362 | 6363 | ||
6363 | struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = { | 6364 | static const struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = { |
6364 | .sched_state_renewal = nfs4_proc_async_renew, | 6365 | .sched_state_renewal = nfs4_proc_async_renew, |
6365 | .get_state_renewal_cred_locked = nfs4_get_renew_cred_locked, | 6366 | .get_state_renewal_cred_locked = nfs4_get_renew_cred_locked, |
6366 | .renew_lease = nfs4_proc_renew, | 6367 | .renew_lease = nfs4_proc_renew, |
6367 | }; | 6368 | }; |
6368 | 6369 | ||
6369 | #if defined(CONFIG_NFS_V4_1) | 6370 | #if defined(CONFIG_NFS_V4_1) |
6370 | struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = { | 6371 | static const struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = { |
6371 | .sched_state_renewal = nfs41_proc_async_sequence, | 6372 | .sched_state_renewal = nfs41_proc_async_sequence, |
6372 | .get_state_renewal_cred_locked = nfs4_get_machine_cred_locked, | 6373 | .get_state_renewal_cred_locked = nfs4_get_machine_cred_locked, |
6373 | .renew_lease = nfs4_proc_sequence, | 6374 | .renew_lease = nfs4_proc_sequence, |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 5fa43cd9bfc5..7c586070d028 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -876,7 +876,8 @@ int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl) | |||
876 | if (fl->fl_flags & FL_POSIX) | 876 | if (fl->fl_flags & FL_POSIX) |
877 | lsp = nfs4_get_lock_state(state, fl->fl_owner, 0, NFS4_POSIX_LOCK_TYPE); | 877 | lsp = nfs4_get_lock_state(state, fl->fl_owner, 0, NFS4_POSIX_LOCK_TYPE); |
878 | else if (fl->fl_flags & FL_FLOCK) | 878 | else if (fl->fl_flags & FL_FLOCK) |
879 | lsp = nfs4_get_lock_state(state, 0, fl->fl_pid, NFS4_FLOCK_LOCK_TYPE); | 879 | lsp = nfs4_get_lock_state(state, NULL, fl->fl_pid, |
880 | NFS4_FLOCK_LOCK_TYPE); | ||
880 | else | 881 | else |
881 | return -EINVAL; | 882 | return -EINVAL; |
882 | if (lsp == NULL) | 883 | if (lsp == NULL) |
diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c index 2bd185277adb..157c47e277e0 100644 --- a/fs/nfs/objlayout/objlayout.c +++ b/fs/nfs/objlayout/objlayout.c | |||
@@ -156,7 +156,7 @@ last_byte_offset(u64 start, u64 len) | |||
156 | return end > start ? end - 1 : NFS4_MAX_UINT64; | 156 | return end > start ? end - 1 : NFS4_MAX_UINT64; |
157 | } | 157 | } |
158 | 158 | ||
159 | void _fix_verify_io_params(struct pnfs_layout_segment *lseg, | 159 | static void _fix_verify_io_params(struct pnfs_layout_segment *lseg, |
160 | struct page ***p_pages, unsigned *p_pgbase, | 160 | struct page ***p_pages, unsigned *p_pgbase, |
161 | u64 offset, unsigned long count) | 161 | u64 offset, unsigned long count) |
162 | { | 162 | { |
diff --git a/fs/nfs/pnfs_dev.c b/fs/nfs/pnfs_dev.c index 4f359d2a26eb..6b4cd3849306 100644 --- a/fs/nfs/pnfs_dev.c +++ b/fs/nfs/pnfs_dev.c | |||
@@ -92,7 +92,7 @@ _lookup_deviceid(const struct pnfs_layoutdriver_type *ld, | |||
92 | * @clp nfs_client associated with deviceid | 92 | * @clp nfs_client associated with deviceid |
93 | * @id deviceid to look up | 93 | * @id deviceid to look up |
94 | */ | 94 | */ |
95 | struct nfs4_deviceid_node * | 95 | static struct nfs4_deviceid_node * |
96 | _find_get_deviceid(const struct pnfs_layoutdriver_type *ld, | 96 | _find_get_deviceid(const struct pnfs_layoutdriver_type *ld, |
97 | const struct nfs_client *clp, const struct nfs4_deviceid *id, | 97 | const struct nfs_client *clp, const struct nfs4_deviceid *id, |
98 | long hash) | 98 | long hash) |
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index 490613b709b6..fae71c9f5050 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c | |||
@@ -108,7 +108,7 @@ static void nfs_async_unlink_release(void *calldata) | |||
108 | } | 108 | } |
109 | 109 | ||
110 | #if defined(CONFIG_NFS_V4_1) | 110 | #if defined(CONFIG_NFS_V4_1) |
111 | void nfs_unlink_prepare(struct rpc_task *task, void *calldata) | 111 | static void nfs_unlink_prepare(struct rpc_task *task, void *calldata) |
112 | { | 112 | { |
113 | struct nfs_unlinkdata *data = calldata; | 113 | struct nfs_unlinkdata *data = calldata; |
114 | struct nfs_server *server = NFS_SERVER(data->dir); | 114 | struct nfs_server *server = NFS_SERVER(data->dir); |