diff options
author | Anna Schumaker <bjschuma@netapp.com> | 2013-11-13 12:29:08 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-11-19 16:20:40 -0500 |
commit | 694e096fd7c2a7d40760fc9c9dfc826bdd495ea4 (patch) | |
tree | 718e6db209f6db22e70555a8c6b97ad3b5422889 /fs | |
parent | 8c2fabc6542d9d0f8b16bd1045c2eda59bdcde13 (diff) |
NFS: Enabling v4.2 should not recompile nfsd and lockd
When CONFIG_NFS_V4_2 is toggled nfsd and lockd will be recompiled,
instead of only the nfs client. This patch moves a small amount of code
into the client directory to avoid unnecessary recompiles.
Signed-off-by: Anna Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.h | 1 | ||||
-rw-r--r-- | fs/nfs/dns_resolve.c | 2 | ||||
-rw-r--r-- | fs/nfs/internal.h | 15 | ||||
-rw-r--r-- | fs/nfs/nfs4_fs.h | 8 |
4 files changed, 26 insertions, 0 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h index 8485978993e8..9838fb020473 100644 --- a/fs/nfs/blocklayout/blocklayout.h +++ b/fs/nfs/blocklayout/blocklayout.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/nfs_fs.h> | 36 | #include <linux/nfs_fs.h> |
37 | #include <linux/sunrpc/rpc_pipe_fs.h> | 37 | #include <linux/sunrpc/rpc_pipe_fs.h> |
38 | 38 | ||
39 | #include "../nfs4_fs.h" | ||
39 | #include "../pnfs.h" | 40 | #include "../pnfs.h" |
40 | #include "../netns.h" | 41 | #include "../netns.h" |
41 | 42 | ||
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index fc0f95ec7358..d25f10fb4926 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c | |||
@@ -46,7 +46,9 @@ ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen, | |||
46 | #include <linux/sunrpc/cache.h> | 46 | #include <linux/sunrpc/cache.h> |
47 | #include <linux/sunrpc/svcauth.h> | 47 | #include <linux/sunrpc/svcauth.h> |
48 | #include <linux/sunrpc/rpc_pipe_fs.h> | 48 | #include <linux/sunrpc/rpc_pipe_fs.h> |
49 | #include <linux/nfs_fs.h> | ||
49 | 50 | ||
51 | #include "nfs4_fs.h" | ||
50 | #include "dns_resolve.h" | 52 | #include "dns_resolve.h" |
51 | #include "cache_lib.h" | 53 | #include "cache_lib.h" |
52 | #include "netns.h" | 54 | #include "netns.h" |
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index bca6a3e3c49c..8b5cc04a8611 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -269,6 +269,21 @@ extern const u32 nfs41_maxgetdevinfo_overhead; | |||
269 | extern struct rpc_procinfo nfs4_procedures[]; | 269 | extern struct rpc_procinfo nfs4_procedures[]; |
270 | #endif | 270 | #endif |
271 | 271 | ||
272 | #ifdef CONFIG_NFS_V4_SECURITY_LABEL | ||
273 | extern struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags); | ||
274 | static inline void nfs4_label_free(struct nfs4_label *label) | ||
275 | { | ||
276 | if (label) { | ||
277 | kfree(label->label); | ||
278 | kfree(label); | ||
279 | } | ||
280 | return; | ||
281 | } | ||
282 | #else | ||
283 | static inline struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags) { return NULL; } | ||
284 | static inline void nfs4_label_free(void *label) {} | ||
285 | #endif /* CONFIG_NFS_V4_SECURITY_LABEL */ | ||
286 | |||
272 | /* proc.c */ | 287 | /* proc.c */ |
273 | void nfs_close_context(struct nfs_open_context *ctx, int is_sync); | 288 | void nfs_close_context(struct nfs_open_context *ctx, int is_sync); |
274 | extern struct nfs_client *nfs_init_client(struct nfs_client *clp, | 289 | extern struct nfs_client *nfs_init_client(struct nfs_client *clp, |
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 3ce79b04522e..5609edc742a0 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -9,6 +9,14 @@ | |||
9 | #ifndef __LINUX_FS_NFS_NFS4_FS_H | 9 | #ifndef __LINUX_FS_NFS_NFS4_FS_H |
10 | #define __LINUX_FS_NFS_NFS4_FS_H | 10 | #define __LINUX_FS_NFS_NFS4_FS_H |
11 | 11 | ||
12 | #if defined(CONFIG_NFS_V4_2) | ||
13 | #define NFS4_MAX_MINOR_VERSION 2 | ||
14 | #elif defined(CONFIG_NFS_V4_1) | ||
15 | #define NFS4_MAX_MINOR_VERSION 1 | ||
16 | #else | ||
17 | #define NFS4_MAX_MINOR_VERSION 0 | ||
18 | #endif | ||
19 | |||
12 | #if IS_ENABLED(CONFIG_NFS_V4) | 20 | #if IS_ENABLED(CONFIG_NFS_V4) |
13 | 21 | ||
14 | #define NFS4_MAX_LOOP_ON_RECOVER (10) | 22 | #define NFS4_MAX_LOOP_ON_RECOVER (10) |