nfsd: constify nfsd_suppatttrs
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 12 Jan 2017 01:40:36 +0000 (20:40 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 31 Jan 2017 17:31:54 +0000 (12:31 -0500)
To keep me from accidentally writing to this again....

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4xdr.c
fs/nfsd/nfsd.h

index 93eba39d57c4dc9036749149486bc2466e69f0fa..12cc6b29e78c326b49c9e237607cb631d5a0fc63 100644 (file)
@@ -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},
index d74c8c44dc3536ffdd6a93b0cd340121233e5a95..d96606801d47ae6ee9927a2991263780c00840d7 100644 (file)
@@ -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]);
 }