aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2011-09-02 17:39:12 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-10-18 12:08:15 -0400
commit45402c38eec740f52422aafc92937c6a4a8c8c0e (patch)
treec5ca2061deba7b2a1cc8b923ef781d8c3cdee011 /fs/nfs
parent7542274519b3ba87555410c66e8356ac1e3bc9b3 (diff)
nfs/super.c: local functions should be static
commit ae50c0b5 "pnfs: client stats" added additional information to the output of /proc/self/mountstats. The new functions introduced are only used in this file and should be marked static. If CONFIG_NFS_V4_1 is not defined, empty stub functions are used. If CONFIG_NFS_V4 is not defined these stub functions are not used at all. Adding static for the functions results in compile warnings: fs/nfs/super.c:743: warning: 'show_sessions' defined but not used fs/nfs/super.c:756: warning: 'show_pnfs' defined but not used Fix this by adding a #ifdef CONFIG_NFS_V4 guard around the two show_ functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 5b19b6aabe18..480b3b6bf71e 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -733,18 +733,22 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt)
733 733
734 return 0; 734 return 0;
735} 735}
736
737#ifdef CONFIG_NFS_V4
736#ifdef CONFIG_NFS_V4_1 738#ifdef CONFIG_NFS_V4_1
737void show_sessions(struct seq_file *m, struct nfs_server *server) 739static void show_sessions(struct seq_file *m, struct nfs_server *server)
738{ 740{
739 if (nfs4_has_session(server->nfs_client)) 741 if (nfs4_has_session(server->nfs_client))
740 seq_printf(m, ",sessions"); 742 seq_printf(m, ",sessions");
741} 743}
742#else 744#else
743void show_sessions(struct seq_file *m, struct nfs_server *server) {} 745static void show_sessions(struct seq_file *m, struct nfs_server *server) {}
746#endif
744#endif 747#endif
745 748
749#ifdef CONFIG_NFS_V4
746#ifdef CONFIG_NFS_V4_1 750#ifdef CONFIG_NFS_V4_1
747void show_pnfs(struct seq_file *m, struct nfs_server *server) 751static void show_pnfs(struct seq_file *m, struct nfs_server *server)
748{ 752{
749 seq_printf(m, ",pnfs="); 753 seq_printf(m, ",pnfs=");
750 if (server->pnfs_curr_ld) 754 if (server->pnfs_curr_ld)
@@ -752,9 +756,10 @@ void show_pnfs(struct seq_file *m, struct nfs_server *server)
752 else 756 else
753 seq_printf(m, "not configured"); 757 seq_printf(m, "not configured");
754} 758}
755#else /* CONFIG_NFS_V4_1 */ 759#else
756void show_pnfs(struct seq_file *m, struct nfs_server *server) {} 760static void show_pnfs(struct seq_file *m, struct nfs_server *server) {}
757#endif /* CONFIG_NFS_V4_1 */ 761#endif
762#endif
758 763
759static int nfs_show_devname(struct seq_file *m, struct vfsmount *mnt) 764static int nfs_show_devname(struct seq_file *m, struct vfsmount *mnt)
760{ 765{