[pnfs] [PATCH 04/14] pnfs: fix compile problems if CONFIG_PNFS turned off
Fred Isaman
iisaman at citi.umich.edu
Tue Mar 25 16:24:16 EDT 2008
Mostly, #include of header files should not encosed in #ifdef,
since *.h files themselves have the appropriate #ifdefs, and they may want
to define no-op versions of some functions.
Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
---
fs/nfs/callback_proc.c | 2 +-
fs/nfs/client.c | 2 --
fs/nfs/file.c | 2 --
fs/nfs/inode.c | 2 --
fs/nfs/nfs4proc.c | 4 ----
fs/nfs/nfs4state.c | 2 --
fs/nfs/pagelist.c | 2 --
fs/nfs/read.c | 2 --
fs/nfs/super.c | 2 --
fs/nfs/write.c | 4 +---
include/linux/exportfs.h | 4 ++--
11 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 294fc81..bbc6793 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -16,9 +16,9 @@
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/writeback.h>
+#endif
#include "pnfs.h"
-#endif
#define NFSDBG_FACILITY NFSDBG_CALLBACK
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index c012919..c9d55de 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -47,10 +47,8 @@
#include "delegation.h"
#include "iostat.h"
#include "internal.h"
-#ifdef CONFIG_PNFS
#include <linux/pnfs_xdr.h>
#include "pnfs.h"
-#endif
#define NFSDBG_FACILITY NFSDBG_CLIENT
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 6f16772..92687b2 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -35,10 +35,8 @@
#include "delegation.h"
#include "internal.h"
#include "iostat.h"
-#ifdef CONFIG_PNFS
#include <linux/pnfs_xdr.h>
#include "pnfs.h"
-#endif /* CONFIG_PNFS */
#define NFSDBG_FACILITY NFSDBG_FILE
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 38c9359..ee8de15 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -46,10 +46,8 @@
#include "delegation.h"
#include "iostat.h"
#include "internal.h"
-#ifdef CONFIG_PNFS
#include <linux/pnfs_xdr.h>
#include "pnfs.h"
-#endif
#define NFSDBG_FACILITY NFSDBG_VFS
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 32240c4..fb6dabd 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -49,10 +49,8 @@
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/module.h>
-#ifdef CONFIG_PNFS
#include <linux/pnfs_xdr.h>
#include <linux/nfs4_pnfs.h>
-#endif /* CONFIG_PNFS */
#include "nfs4_fs.h"
#include "delegation.h"
@@ -61,9 +59,7 @@
#include "callback.h"
#include <linux/nfs41_session_recovery.h>
#endif /* CONFIG_NFS_V4_1 */
-#ifdef CONFIG_PNFS
#include "pnfs.h"
-#endif /* CONFIG_PNFS */
#define NFSDBG_FACILITY NFSDBG_PROC
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 3a4e16e..ab7aeb4 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -53,11 +53,9 @@
#include "callback.h"
#include "delegation.h"
#include "internal.h"
-#ifdef CONFIG_PNFS
#include <linux/pnfs_xdr.h>
#include <linux/nfs4_pnfs.h>
#include "pnfs.h"
-#endif /* CONFIG_PNFS */
#define NFSDBG_FACILITY NFSDBG_PROC
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 15a66ab..c35de5d 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -20,9 +20,7 @@
#include <linux/nfs_mount.h>
#include "internal.h"
-#ifdef CONFIG_PNFS
#include "pnfs.h"
-#endif /* CONFIG_PNFS */
static struct kmem_cache *nfs_page_cachep;
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 1548531..22f6bd8 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -22,10 +22,8 @@
#include <asm/system.h>
#include <linux/module.h>
-#ifdef CONFIG_PNFS
#include <linux/pnfs_xdr.h>
#include "pnfs.h"
-#endif /* CONFIG_PNFS */
#include "nfs4_fs.h"
#include "internal.h"
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index fa582d5..15c1e10 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -58,10 +58,8 @@
#include "delegation.h"
#include "iostat.h"
#include "internal.h"
-#ifdef CONFIG_PNFS
#include <linux/pnfs_xdr.h>
#include "pnfs.h"
-#endif /* CONFIG_PNFS */
#define NFSDBG_FACILITY NFSDBG_VFS
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index bbca2f9..d5baacd 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -22,9 +22,7 @@
#include <asm/uaccess.h>
#include <linux/module.h>
-#if defined(CONFIG_PNFS)
#include "pnfs.h"
-#endif
#include "delegation.h"
#include "internal.h"
@@ -1287,7 +1285,7 @@ int nfs_commit_rpcsetup(struct list_head *head,
return ret;
#endif /* CONFIG_PNFS */
nfs_initiate_commit(data, NFS_CLIENT(inode), how);
- return ret;
+ return 0;
}
/*
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index e9a664b..2e7e921 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -35,7 +35,7 @@ enum fid_type {
FILEID_INO32_GEN_PARENT = 2,
};
-#if defined(CONFIG_PNFS)
+#if defined(CONFIG_PNFSD)
typedef struct {
uint64_t pnfs_fsid; /* fsid */
@@ -116,7 +116,7 @@ struct pnfs_layoutget_arg {
u32 return_on_close;/* response */
};
-#endif
+#endif /* CONFIG_PNFSD */
struct fid {
union {
--
1.5.3.3
More information about the pNFS
mailing list