Commit 1ec8c0c4 authored by Kinglong Mee's avatar Kinglong Mee Committed by J. Bruce Fields

nfsd: Remove duplicate macro define for max sec label length

NFS4_MAXLABELLEN has defined for sec label max length, use it directly.
Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent b14f4f7e
...@@ -1815,7 +1815,7 @@ static inline u32 nfsd4_getattr_rsize(struct svc_rqst *rqstp, ...@@ -1815,7 +1815,7 @@ static inline u32 nfsd4_getattr_rsize(struct svc_rqst *rqstp,
bmap0 &= ~FATTR4_WORD0_FILEHANDLE; bmap0 &= ~FATTR4_WORD0_FILEHANDLE;
} }
if (bmap2 & FATTR4_WORD2_SECURITY_LABEL) { if (bmap2 & FATTR4_WORD2_SECURITY_LABEL) {
ret += NFSD4_MAX_SEC_LABEL_LEN + 12; ret += NFS4_MAXLABELLEN + 12;
bmap2 &= ~FATTR4_WORD2_SECURITY_LABEL; bmap2 &= ~FATTR4_WORD2_SECURITY_LABEL;
} }
/* /*
......
...@@ -424,7 +424,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, ...@@ -424,7 +424,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
len += 4; len += 4;
dummy32 = be32_to_cpup(p++); dummy32 = be32_to_cpup(p++);
READ_BUF(dummy32); READ_BUF(dummy32);
if (dummy32 > NFSD4_MAX_SEC_LABEL_LEN) if (dummy32 > NFS4_MAXLABELLEN)
return nfserr_badlabel; return nfserr_badlabel;
len += (XDR_QUADLEN(dummy32) << 2); len += (XDR_QUADLEN(dummy32) << 2);
READMEM(buf, dummy32); READMEM(buf, dummy32);
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "state.h" #include "state.h"
#include "nfsd.h" #include "nfsd.h"
#define NFSD4_MAX_SEC_LABEL_LEN 2048
#define NFSD4_MAX_TAGLEN 128 #define NFSD4_MAX_TAGLEN 128
#define XDR_LEN(n) (((n) + 3) & ~3) #define XDR_LEN(n) (((n) + 3) & ~3)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment