Message ID | 5516CD45.7060200@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, Mar 28, 2015 at 11:48:21PM +0800, Kinglong Mee wrote: > According to rfc3530 and rfc5661, the max tag length should be > limited by opaque limited. > > Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> > --- > fs/nfs/nfs4xdr.c | 7 ------- > include/linux/nfs4.h | 1 + > 2 files changed, 1 insertion(+), 7 deletions(-) > > diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c > index 5c399ec..1c2ad01 100644 > --- a/fs/nfs/nfs4xdr.c > +++ b/fs/nfs/nfs4xdr.c > @@ -67,13 +67,6 @@ > > static int nfs4_stat_to_errno(int); > > -/* NFSv4 COMPOUND tags are only wanted for debugging purposes */ > -#ifdef DEBUG > -#define NFS4_MAXTAGLEN 20 > -#else > -#define NFS4_MAXTAGLEN 0 > -#endif As far as I can tell, DEBUG is never defined, and there's no logic elsewhere that could actually make use of the tag if DEBUG was defined. So maybe simplest would be just to remove the DEBUG case and leave #define NFS4_MAXTAGLEN 0 --b. > - > /* lock,open owner id: > * we currently use size 2 (u64) out of (NFS4_OPAQUE_LIMIT >> 2) > */ > diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h > index ed43cb7..ba54ec2 100644 > --- a/include/linux/nfs4.h > +++ b/include/linux/nfs4.h > @@ -33,6 +33,7 @@ struct nfs4_acl { > }; > > #define NFS4_MAXLABELLEN 2048 > +#define NFS4_MAXTAGLEN NFS4_OPAQUE_LIMIT > > struct nfs4_label { > uint32_t lfs; > -- > 2.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 5c399ec..1c2ad01 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -67,13 +67,6 @@ static int nfs4_stat_to_errno(int); -/* NFSv4 COMPOUND tags are only wanted for debugging purposes */ -#ifdef DEBUG -#define NFS4_MAXTAGLEN 20 -#else -#define NFS4_MAXTAGLEN 0 -#endif - /* lock,open owner id: * we currently use size 2 (u64) out of (NFS4_OPAQUE_LIMIT >> 2) */ diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index ed43cb7..ba54ec2 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h @@ -33,6 +33,7 @@ struct nfs4_acl { }; #define NFS4_MAXLABELLEN 2048 +#define NFS4_MAXTAGLEN NFS4_OPAQUE_LIMIT struct nfs4_label { uint32_t lfs;
According to rfc3530 and rfc5661, the max tag length should be limited by opaque limited. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> --- fs/nfs/nfs4xdr.c | 7 ------- include/linux/nfs4.h | 1 + 2 files changed, 1 insertion(+), 7 deletions(-)