NFS: Enabling v4.2 should not recompile nfsd and lockd
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- fs/nfs/nfs4_fs.h | 25 +++++++++++++++++++++++++ include/linux/nfs4.h | 10 ---------- include/linux/nfs_fs.h | 18 ------------------ 3 files changed, 25 insertions(+), 28 deletions(-)
fs/nfs/nfs4_fs.h +25 -0
@@ -15,6 +15,16 @@#include <linux/seqlock.h> +#if defined(CONFIG_NFS_V4_2 ) +#define NFS4_MAX_MINOR_VERSION 2 +#else +#if defined(CONFIG_NFS_V4_1 ) +#define NFS4_MAX_MINOR_VERSION 1 +#else +#define NFS4_MAX_MINOR_VERSION 0 +#endif /* CONFIG_NFS_V4_1 */ +#endif /* CONFIG_NFS_V4_2 */ +struct idmap ;enum nfs4_client_state {
@@ -365,6 +375,21 @@ nfs4_state_protect_write(struct nfs_client *clp, struct rpc_clnt **clntp, }#endif /* CONFIG_NFS_V4_1 */ +#ifdef CONFIG_NFS_V4_SECURITY_LABEL +extern struct nfs4_label *nfs4_label_alloc (struct nfs_server *server,gfp_t flags); +static inline void nfs4_label_free (struct nfs4_label *label) +{ +if (label) { +kfree (label->label); +kfree (label); + } +return ; +} +#else +static inline struct nfs4_label *nfs4_label_alloc (struct nfs_server *server,gfp_t flags) {return NULL ; } +static inline void nfs4_label_free (void *label) {} +#endif /* CONFIG_NFS_V4_SECURITY_LABEL */ +extern const struct nfs4_minor_version_ops *nfs_v4_minor_ops[];extern const u32 nfs4_fattr_bitmap[3 ];
include/linux/nfs4.h +0 -10
@@ -410,16 +410,6 @@ enum lock_type4 {#define NFS4_VERSION 4#define NFS4_MINOR_VERSION 0 -#if defined(CONFIG_NFS_V4_2 ) -#define NFS4_MAX_MINOR_VERSION 2 -#else -#if defined(CONFIG_NFS_V4_1 ) -#define NFS4_MAX_MINOR_VERSION 1 -#else -#define NFS4_MAX_MINOR_VERSION 0 -#endif /* CONFIG_NFS_V4_1 */ -#endif /* CONFIG_NFS_V4_2 */ -#define NFS4_DEBUG 1/* Index of predefined Linux client operations */
include/linux/nfs_fs.h +0 -18
@@ -507,24 +507,6 @@ extern int nfs_mountpoint_expiry_timeout;extern void nfs_release_automount_timer (void );/* -* linux/fs/nfs/nfs4proc.c -*/ -#ifdef CONFIG_NFS_V4_SECURITY_LABEL -extern struct nfs4_label *nfs4_label_alloc (struct nfs_server *server,gfp_t flags); -static inline void nfs4_label_free (struct nfs4_label *label) -{ -if (label) { -kfree (label->label); -kfree (label); - } -return ; -} -#else -static inline struct nfs4_label *nfs4_label_alloc (struct nfs_server *server,gfp_t flags) {return NULL ; } -static inline void nfs4_label_free (void *label) {} -#endif - -/* * linux/fs/nfs/unlink.c */ extern void nfs_complete_unlink (struct dentry *dentry,struct inode *);
Signature · 1 line
1.8.4.2