diff mbox

[3/4] nfsd: use NFS4_MAXTAGLEN for taglen checking

Message ID 5516CDDC.9030000@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kinglong Mee March 28, 2015, 3:50 p.m. UTC
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/nfsd/nfs4xdr.c | 2 +-
 fs/nfsd/xdr4.h    | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index eff0a94..4db519e 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1808,7 +1808,7 @@  nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
 	argp->opcnt = be32_to_cpup(p++);
 	max_reply += 4 + (XDR_QUADLEN(argp->taglen) << 2);
 
-	if (argp->taglen > NFSD4_MAX_TAGLEN)
+	if (argp->taglen > NFS4_MAXTAGLEN)
 		goto xdr_error;
 	if (argp->opcnt > 100)
 		goto xdr_error;
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 8bae5d8..613cece 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -40,7 +40,6 @@ 
 #include "state.h"
 #include "nfsd.h"
 
-#define NFSD4_MAX_TAGLEN	128
 #define XDR_LEN(n)                     (((n) + 3) & ~3)
 
 #define CURRENT_STATE_ID_FLAG (1<<0)