Commit 2e96d2867245668dbdb973729288cf69b9fafa66
1 parent
34e8f92831
Exists in
master
and in
7 other branches
NFS: Fix a warning in nfs4_async_handle_error
We're not modifying the nfs_server when we call nfs_inc_server_stats and friends, so allow the compiler to pass 'const' pointers too. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Showing 2 changed files with 5 additions and 6 deletions Side-by-side Diff
fs/nfs/iostat.h
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | unsigned long events[__NFSIOS_COUNTSMAX]; |
20 | 20 | } ____cacheline_aligned; |
21 | 21 | |
22 | -static inline void nfs_inc_server_stats(struct nfs_server *server, | |
22 | +static inline void nfs_inc_server_stats(const struct nfs_server *server, | |
23 | 23 | enum nfs_stat_eventcounters stat) |
24 | 24 | { |
25 | 25 | struct nfs_iostats *iostats; |
26 | 26 | |
... | ... | @@ -31,13 +31,13 @@ |
31 | 31 | put_cpu_no_resched(); |
32 | 32 | } |
33 | 33 | |
34 | -static inline void nfs_inc_stats(struct inode *inode, | |
34 | +static inline void nfs_inc_stats(const struct inode *inode, | |
35 | 35 | enum nfs_stat_eventcounters stat) |
36 | 36 | { |
37 | 37 | nfs_inc_server_stats(NFS_SERVER(inode), stat); |
38 | 38 | } |
39 | 39 | |
40 | -static inline void nfs_add_server_stats(struct nfs_server *server, | |
40 | +static inline void nfs_add_server_stats(const struct nfs_server *server, | |
41 | 41 | enum nfs_stat_bytecounters stat, |
42 | 42 | unsigned long addend) |
43 | 43 | { |
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | put_cpu_no_resched(); |
51 | 51 | } |
52 | 52 | |
53 | -static inline void nfs_add_stats(struct inode *inode, | |
53 | +static inline void nfs_add_stats(const struct inode *inode, | |
54 | 54 | enum nfs_stat_bytecounters stat, |
55 | 55 | unsigned long addend) |
56 | 56 | { |
fs/nfs/nfs4proc.c
... | ... | @@ -2756,8 +2756,7 @@ |
2756 | 2756 | task->tk_status = 0; |
2757 | 2757 | return -EAGAIN; |
2758 | 2758 | case -NFS4ERR_DELAY: |
2759 | - nfs_inc_server_stats((struct nfs_server *) server, | |
2760 | - NFSIOS_DELAY); | |
2759 | + nfs_inc_server_stats(server, NFSIOS_DELAY); | |
2761 | 2760 | case -NFS4ERR_GRACE: |
2762 | 2761 | rpc_delay(task, NFS4_POLL_RETRY_MAX); |
2763 | 2762 | task->tk_status = 0; |