]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
NFS: Fix a warning in nfs4_async_handle_error
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Jun 2008 20:42:05 +0000 (16:42 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 9 Jul 2008 16:09:18 +0000 (12:09 -0400)
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>
fs/nfs/iostat.h
fs/nfs/nfs4proc.c

index 2ec65e12bfed6523266af56113a12fa2e55f1625..a36952810032f8c492acb4e1f4f96c7494250b3f 100644 (file)
@@ -19,7 +19,7 @@ struct nfs_iostats {
        unsigned long           events[__NFSIOS_COUNTSMAX];
 } ____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)
 {
        struct nfs_iostats *iostats;
@@ -31,13 +31,13 @@ static inline void nfs_inc_server_stats(struct nfs_server *server,
        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)
 {
        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,
                                        unsigned long addend)
 {
@@ -50,7 +50,7 @@ static inline void nfs_add_server_stats(struct nfs_server *server,
        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,
                                 unsigned long addend)
 {
index dfdd19a6d17ec939d141fbd30d44622dc16a2514..058723d9122d28695ca844907b572a86656f982c 100644 (file)
@@ -2756,8 +2756,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server)
                        task->tk_status = 0;
                        return -EAGAIN;
                case -NFS4ERR_DELAY:
-                       nfs_inc_server_stats((struct nfs_server *) server,
-                                               NFSIOS_DELAY);
+                       nfs_inc_server_stats(server, NFSIOS_DELAY);
                case -NFS4ERR_GRACE:
                        rpc_delay(task, NFS4_POLL_RETRY_MAX);
                        task->tk_status = 0;