aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-20 14:12:46 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-21 09:31:44 -0400
commit6f00866ddd15724eb20eac4ddf6e2c6c1a6cfcdc (patch)
tree14c33fa0d8dfe765175c3972d1fd746ef766c150
parentffa94db6042e6fd014ae0bed8832ac707ef2afe9 (diff)
NFS: Fix more NFS debug related build warnings
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/blocklayout/blocklayout.c5
-rw-r--r--fs/nfs/fscache.c2
-rw-r--r--fs/nfs/pnfs.h8
-rw-r--r--fs/nfs/pnfs_dev.c2
-rw-r--r--include/linux/nfs_fs.h2
5 files changed, 14 insertions, 5 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 61501346324e..9c94297bb70e 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -233,12 +233,11 @@ bl_read_pagelist(struct nfs_read_data *rdata)
233 sector_t isect, extent_length = 0; 233 sector_t isect, extent_length = 0;
234 struct parallel_io *par; 234 struct parallel_io *par;
235 loff_t f_offset = rdata->args.offset; 235 loff_t f_offset = rdata->args.offset;
236 size_t count = rdata->args.count;
237 struct page **pages = rdata->args.pages; 236 struct page **pages = rdata->args.pages;
238 int pg_index = rdata->args.pgbase >> PAGE_CACHE_SHIFT; 237 int pg_index = rdata->args.pgbase >> PAGE_CACHE_SHIFT;
239 238
240 dprintk("%s enter nr_pages %u offset %lld count %Zd\n", __func__, 239 dprintk("%s enter nr_pages %u offset %lld count %u\n", __func__,
241 rdata->npages, f_offset, count); 240 rdata->npages, f_offset, (unsigned int)rdata->args.count);
242 241
243 par = alloc_parallel(rdata); 242 par = alloc_parallel(rdata);
244 if (!par) 243 if (!par)
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index 419119c371bf..ae65c16b3670 100644
--- a/fs/nfs/fscache.c
+++ b/fs/nfs/fscache.c
@@ -327,7 +327,7 @@ void nfs_fscache_reset_inode_cookie(struct inode *inode)
327{ 327{
328 struct nfs_inode *nfsi = NFS_I(inode); 328 struct nfs_inode *nfsi = NFS_I(inode);
329 struct nfs_server *nfss = NFS_SERVER(inode); 329 struct nfs_server *nfss = NFS_SERVER(inode);
330 struct fscache_cookie *old = nfsi->fscache; 330 NFS_IFDEBUG(struct fscache_cookie *old = nfsi->fscache);
331 331
332 nfs_fscache_inode_lock(inode); 332 nfs_fscache_inode_lock(inode);
333 if (nfsi->fscache) { 333 if (nfsi->fscache) {
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 07802652f5a3..442ebf68eeec 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -228,7 +228,6 @@ struct nfs4_deviceid_node {
228 atomic_t ref; 228 atomic_t ref;
229}; 229};
230 230
231void nfs4_print_deviceid(const struct nfs4_deviceid *dev_id);
232struct nfs4_deviceid_node *nfs4_find_get_deviceid(const struct pnfs_layoutdriver_type *, const struct nfs_client *, const struct nfs4_deviceid *); 231struct nfs4_deviceid_node *nfs4_find_get_deviceid(const struct pnfs_layoutdriver_type *, const struct nfs_client *, const struct nfs4_deviceid *);
233void nfs4_delete_deviceid(const struct pnfs_layoutdriver_type *, const struct nfs_client *, const struct nfs4_deviceid *); 232void nfs4_delete_deviceid(const struct pnfs_layoutdriver_type *, const struct nfs_client *, const struct nfs4_deviceid *);
234void nfs4_init_deviceid_node(struct nfs4_deviceid_node *, 233void nfs4_init_deviceid_node(struct nfs4_deviceid_node *,
@@ -328,6 +327,13 @@ static inline int pnfs_return_layout(struct inode *ino)
328 return 0; 327 return 0;
329} 328}
330 329
330#ifdef NFS_DEBUG
331void nfs4_print_deviceid(const struct nfs4_deviceid *dev_id);
332#else
333static inline void nfs4_print_deviceid(const struct nfs4_deviceid *dev_id)
334{
335}
336#endif /* NFS_DEBUG */
331#else /* CONFIG_NFS_V4_1 */ 337#else /* CONFIG_NFS_V4_1 */
332 338
333static inline void pnfs_destroy_all_layouts(struct nfs_client *clp) 339static inline void pnfs_destroy_all_layouts(struct nfs_client *clp)
diff --git a/fs/nfs/pnfs_dev.c b/fs/nfs/pnfs_dev.c
index 6b4cd3849306..73f701f1f4d3 100644
--- a/fs/nfs/pnfs_dev.c
+++ b/fs/nfs/pnfs_dev.c
@@ -43,6 +43,7 @@
43static struct hlist_head nfs4_deviceid_cache[NFS4_DEVICE_ID_HASH_SIZE]; 43static struct hlist_head nfs4_deviceid_cache[NFS4_DEVICE_ID_HASH_SIZE];
44static DEFINE_SPINLOCK(nfs4_deviceid_lock); 44static DEFINE_SPINLOCK(nfs4_deviceid_lock);
45 45
46#ifdef NFS_DEBUG
46void 47void
47nfs4_print_deviceid(const struct nfs4_deviceid *id) 48nfs4_print_deviceid(const struct nfs4_deviceid *id)
48{ 49{
@@ -52,6 +53,7 @@ nfs4_print_deviceid(const struct nfs4_deviceid *id)
52 p[0], p[1], p[2], p[3]); 53 p[0], p[1], p[2], p[3]);
53} 54}
54EXPORT_SYMBOL_GPL(nfs4_print_deviceid); 55EXPORT_SYMBOL_GPL(nfs4_print_deviceid);
56#endif
55 57
56static inline u32 58static inline u32
57nfs4_deviceid_hash(const struct nfs4_deviceid *id) 59nfs4_deviceid_hash(const struct nfs4_deviceid *id)
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 69ec9cb3a867..52a1bdb4ee2b 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -661,8 +661,10 @@ nfs_fileid_to_ino_t(u64 fileid)
661# undef ifdebug 661# undef ifdebug
662# ifdef NFS_DEBUG 662# ifdef NFS_DEBUG
663# define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) 663# define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac))
664# define NFS_IFDEBUG(x) x
664# else 665# else
665# define ifdebug(fac) if (0) 666# define ifdebug(fac) if (0)
667# define NFS_IFDEBUG(x)
666# endif 668# endif
667#endif /* __KERNEL */ 669#endif /* __KERNEL */
668 670