aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/inode.c16
-rw-r--r--fs/nfs/internal.h9
-rw-r--r--fs/nfs/nfs2xdr.c2
-rw-r--r--include/linux/nfs_fs.h2
4 files changed, 19 insertions, 10 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 24a7139d3449..51bc88b662fe 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1089,13 +1089,15 @@ void nfs_destroy_inode(struct inode *inode)
1089 kmem_cache_free(nfs_inode_cachep, NFS_I(inode)); 1089 kmem_cache_free(nfs_inode_cachep, NFS_I(inode));
1090} 1090}
1091 1091
1092#define nfs4_init_once(nfsi) \ 1092static inline void nfs4_init_once(struct nfs_inode *nfsi)
1093 do { \ 1093{
1094 INIT_LIST_HEAD(&(nfsi)->open_states); \ 1094#ifdef CONFIG_NFS_V4
1095 nfsi->delegation = NULL; \ 1095 INIT_LIST_HEAD(&nfsi->open_states);
1096 nfsi->delegation_state = 0; \ 1096 nfsi->delegation = NULL;
1097 init_rwsem(&nfsi->rwsem); \ 1097 nfsi->delegation_state = 0;
1098 } while(0) 1098 init_rwsem(&nfsi->rwsem);
1099#endif
1100}
1099 1101
1100static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) 1102static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
1101{ 1103{
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 5e51c4535b6f..bd2815e2dec1 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -58,11 +58,13 @@ extern int nfs_stat_to_errno(int);
58extern u32 *nfs4_decode_dirent(u32 *p, struct nfs_entry *entry, int plus); 58extern u32 *nfs4_decode_dirent(u32 *p, struct nfs_entry *entry, int plus);
59 59
60/* nfs4proc.c */ 60/* nfs4proc.c */
61#ifdef CONFIG_NFS_V4
61extern struct rpc_procinfo nfs4_procedures[]; 62extern struct rpc_procinfo nfs4_procedures[];
62 63
63extern int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry, 64extern int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry,
64 struct nfs4_fs_locations *fs_locations, 65 struct nfs4_fs_locations *fs_locations,
65 struct page *page); 66 struct page *page);
67#endif
66 68
67/* inode.c */ 69/* inode.c */
68extern struct inode *nfs_alloc_inode(struct super_block *sb); 70extern struct inode *nfs_alloc_inode(struct super_block *sb);
@@ -92,9 +94,14 @@ extern char *nfs_path(const char *base, const struct dentry *dentry,
92/* 94/*
93 * Determine the mount path as a string 95 * Determine the mount path as a string
94 */ 96 */
95static inline char *nfs4_path(const struct dentry *dentry, char *buffer, ssize_t buflen) 97static inline char *
98nfs4_path(const struct dentry *dentry, char *buffer, ssize_t buflen)
96{ 99{
100#ifdef CONFIG_NFS_V4
97 return nfs_path(NFS_SB(dentry->d_sb)->mnt_path, dentry, buffer, buflen); 101 return nfs_path(NFS_SB(dentry->d_sb)->mnt_path, dentry, buffer, buflen);
102#else
103 return NULL;
104#endif
98} 105}
99 106
100/* 107/*
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index 67391eef6b93..3b939e055a08 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -25,6 +25,8 @@
25#include <linux/nfs_fs.h> 25#include <linux/nfs_fs.h>
26#include "internal.h" 26#include "internal.h"
27 27
28#include "internal.h"
29
28#define NFSDBG_FACILITY NFSDBG_XDR 30#define NFSDBG_FACILITY NFSDBG_XDR
29/* #define NFS_PARANOIA 1 */ 31/* #define NFS_PARANOIA 1 */
30 32
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 152798949113..0a1740b2532e 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -317,8 +317,6 @@ extern struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent,
317 const struct dentry *dentry, 317 const struct dentry *dentry,
318 struct nfs_fh *fh, 318 struct nfs_fh *fh,
319 struct nfs_fattr *fattr); 319 struct nfs_fattr *fattr);
320extern struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent,
321 struct dentry *dentry);
322 320
323/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ 321/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */
324extern u32 root_nfs_parse_addr(char *name); /*__init*/ 322extern u32 root_nfs_parse_addr(char *name); /*__init*/