Commit 2e96d286 authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 34e8f928
...@@ -19,7 +19,7 @@ struct nfs_iostats { ...@@ -19,7 +19,7 @@ struct nfs_iostats {
unsigned long events[__NFSIOS_COUNTSMAX]; unsigned long events[__NFSIOS_COUNTSMAX];
} ____cacheline_aligned; } ____cacheline_aligned;
static inline void nfs_inc_server_stats(struct nfs_server *server, static inline void nfs_inc_server_stats(const struct nfs_server *server,
enum nfs_stat_eventcounters stat) enum nfs_stat_eventcounters stat)
{ {
struct nfs_iostats *iostats; struct nfs_iostats *iostats;
...@@ -31,13 +31,13 @@ static inline void nfs_inc_server_stats(struct nfs_server *server, ...@@ -31,13 +31,13 @@ static inline void nfs_inc_server_stats(struct nfs_server *server,
put_cpu_no_resched(); put_cpu_no_resched();
} }
static inline void nfs_inc_stats(struct inode *inode, static inline void nfs_inc_stats(const struct inode *inode,
enum nfs_stat_eventcounters stat) enum nfs_stat_eventcounters stat)
{ {
nfs_inc_server_stats(NFS_SERVER(inode), stat); nfs_inc_server_stats(NFS_SERVER(inode), stat);
} }
static inline void nfs_add_server_stats(struct nfs_server *server, static inline void nfs_add_server_stats(const struct nfs_server *server,
enum nfs_stat_bytecounters stat, enum nfs_stat_bytecounters stat,
unsigned long addend) unsigned long addend)
{ {
...@@ -50,7 +50,7 @@ static inline void nfs_add_server_stats(struct nfs_server *server, ...@@ -50,7 +50,7 @@ static inline void nfs_add_server_stats(struct nfs_server *server,
put_cpu_no_resched(); put_cpu_no_resched();
} }
static inline void nfs_add_stats(struct inode *inode, static inline void nfs_add_stats(const struct inode *inode,
enum nfs_stat_bytecounters stat, enum nfs_stat_bytecounters stat,
unsigned long addend) unsigned long addend)
{ {
......
...@@ -2756,8 +2756,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) ...@@ -2756,8 +2756,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server)
task->tk_status = 0; task->tk_status = 0;
return -EAGAIN; return -EAGAIN;
case -NFS4ERR_DELAY: case -NFS4ERR_DELAY:
nfs_inc_server_stats((struct nfs_server *) server, nfs_inc_server_stats(server, NFSIOS_DELAY);
NFSIOS_DELAY);
case -NFS4ERR_GRACE: case -NFS4ERR_GRACE:
rpc_delay(task, NFS4_POLL_RETRY_MAX); rpc_delay(task, NFS4_POLL_RETRY_MAX);
task->tk_status = 0; task->tk_status = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment