diff options
author | J. Bruce Fields <bfields@redhat.com> | 2017-01-12 02:40:36 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-01-31 18:31:54 +0100 |
commit | 5cf23dbb1d3122bbc378dbbd96880a086c1b63df (patch) | |
tree | ba5aa47cc9ea82a102ee3cdf1a72203e8bcf1d83 | |
parent | lockd: initialize sin6_scope_id in lockd_inet6addr_event() (diff) | |
download | linux-5cf23dbb1d3122bbc378dbbd96880a086c1b63df.tar.xz linux-5cf23dbb1d3122bbc378dbbd96880a086c1b63df.zip |
nfsd: constify nfsd_suppatttrs
To keep me from accidentally writing to this again....
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfsd.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 93eba39d57c4..12cc6b29e78c 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -58,7 +58,7 @@ #define NFSDDBG_FACILITY NFSDDBG_XDR -u32 nfsd_suppattrs[3][3] = { +const u32 nfsd_suppattrs[3][3] = { {NFSD4_SUPPORTED_ATTRS_WORD0, NFSD4_SUPPORTED_ATTRS_WORD1, NFSD4_SUPPORTED_ATTRS_WORD2}, diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h index d74c8c44dc35..d96606801d47 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h @@ -362,16 +362,16 @@ void nfsd_lockd_shutdown(void); FATTR4_WORD2_MODE_UMASK | \ NFSD4_2_SECURITY_ATTRS) -extern u32 nfsd_suppattrs[3][3]; +extern const u32 nfsd_suppattrs[3][3]; -static inline bool bmval_is_subset(u32 *bm1, u32 *bm2) +static inline bool bmval_is_subset(const u32 *bm1, const u32 *bm2) { return !((bm1[0] & ~bm2[0]) || (bm1[1] & ~bm2[1]) || (bm1[2] & ~bm2[2])); } -static inline bool nfsd_attrs_supported(u32 minorversion, u32 *bmval) +static inline bool nfsd_attrs_supported(u32 minorversion, const u32 *bmval) { return bmval_is_subset(bmval, nfsd_suppattrs[minorversion]); } |