Skip to content

Commit

Permalink
NFSD: Fix sparse warning in nfssvc.c
Browse files Browse the repository at this point in the history
fs/nfsd/nfssvc.c:36:6: warning: symbol 'inter_copy_offload_enable' was not declared. Should it be static?

The parameter was added by commit ce0887a ("NFSD add nfs4 inter
ssc to nfsd4_copy"). Relocate it into the source file that uses it,
and make it static. This approach is similar to the
nfs4_disable_idmapping, cltrack_prog, and cltrack_legacy_disable
module parameters.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Chuck Lever committed Dec 18, 2020
1 parent b68f0cb commit d6c9e43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
#include "pnfs.h"
#include "trace.h"

static bool inter_copy_offload_enable;
module_param(inter_copy_offload_enable, bool, 0644);
MODULE_PARM_DESC(inter_copy_offload_enable,
"Enable inter server to server copy offload. Default: false");

#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
#include <linux/security.h>

Expand Down
6 changes: 0 additions & 6 deletions fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@

#define NFSDDBG_FACILITY NFSDDBG_SVC

bool inter_copy_offload_enable;
EXPORT_SYMBOL_GPL(inter_copy_offload_enable);
module_param(inter_copy_offload_enable, bool, 0644);
MODULE_PARM_DESC(inter_copy_offload_enable,
"Enable inter server to server copy offload. Default: false");

extern struct svc_program nfsd_program;
static int nfsd(void *vrqstp);
#if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
Expand Down
1 change: 0 additions & 1 deletion fs/nfsd/xdr4.h
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ struct nfsd4_copy {
struct nfs_fh c_fh;
nfs4_stateid stateid;
};
extern bool inter_copy_offload_enable;

struct nfsd4_seek {
/* request */
Expand Down

0 comments on commit d6c9e43

Please sign in to comment.