diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-06-11 16:42:05 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 12:09:18 -0400 |
commit | 2e96d2867245668dbdb973729288cf69b9fafa66 (patch) | |
tree | 8f8b0642beaf0f7d53e31963328dfbc992c5ac88 /fs | |
parent | 34e8f92831cb5c40b3137e47a3daf4c09016ef02 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/iostat.h | 8 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/fs/nfs/iostat.h b/fs/nfs/iostat.h index 2ec65e12bfed..a36952810032 100644 --- a/fs/nfs/iostat.h +++ b/fs/nfs/iostat.h | |||
@@ -19,7 +19,7 @@ struct nfs_iostats { | |||
19 | unsigned long events[__NFSIOS_COUNTSMAX]; | 19 | unsigned long events[__NFSIOS_COUNTSMAX]; |
20 | } ____cacheline_aligned; | 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 | enum nfs_stat_eventcounters stat) | 23 | enum nfs_stat_eventcounters stat) |
24 | { | 24 | { |
25 | struct nfs_iostats *iostats; | 25 | struct nfs_iostats *iostats; |
@@ -31,13 +31,13 @@ static inline void nfs_inc_server_stats(struct nfs_server *server, | |||
31 | put_cpu_no_resched(); | 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 | enum nfs_stat_eventcounters stat) | 35 | enum nfs_stat_eventcounters stat) |
36 | { | 36 | { |
37 | nfs_inc_server_stats(NFS_SERVER(inode), stat); | 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 | enum nfs_stat_bytecounters stat, | 41 | enum nfs_stat_bytecounters stat, |
42 | unsigned long addend) | 42 | unsigned long addend) |
43 | { | 43 | { |
@@ -50,7 +50,7 @@ static inline void nfs_add_server_stats(struct nfs_server *server, | |||
50 | put_cpu_no_resched(); | 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 | enum nfs_stat_bytecounters stat, | 54 | enum nfs_stat_bytecounters stat, |
55 | unsigned long addend) | 55 | unsigned long addend) |
56 | { | 56 | { |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index dfdd19a6d17e..058723d9122d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2756,8 +2756,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) | |||
2756 | task->tk_status = 0; | 2756 | task->tk_status = 0; |
2757 | return -EAGAIN; | 2757 | return -EAGAIN; |
2758 | case -NFS4ERR_DELAY: | 2758 | case -NFS4ERR_DELAY: |
2759 | nfs_inc_server_stats((struct nfs_server *) server, | 2759 | nfs_inc_server_stats(server, NFSIOS_DELAY); |
2760 | NFSIOS_DELAY); | ||
2761 | case -NFS4ERR_GRACE: | 2760 | case -NFS4ERR_GRACE: |
2762 | rpc_delay(task, NFS4_POLL_RETRY_MAX); | 2761 | rpc_delay(task, NFS4_POLL_RETRY_MAX); |
2763 | task->tk_status = 0; | 2762 | task->tk_status = 0; |