nfsd: Remove unnecessary assignment in nfs4xdr.c
Subsystems (2)
PATCH 1/2 nfsd: Remove unnecessary assignment in nfs4xdr.c
In nfsd4_encode_listxattrs(), the variable p is assigned to at one point but this value is never used before p is reassigned. Fix this.
Addresses-Coverity: ("Unused value")
--- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +1 -1
@@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr, goto out; } - p =xdr_encode_opaque (p, sp, slen); +xdr_encode_opaque (p, sp, slen); xdrleft -= xdrlen; count++;
Signature · 1 line
2.28.0
PATCH 2/2 nfsd: Fix typo in comment
Fix typos in nfs4xdr.c.
--- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +1 -1
@@ -4828,7 +4828,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr, slen =strlen (sp);/* -* Check if this a user. attribute, skip it if not. +* Check if this is a user attribute, skip it if not. */ if (strncmp (sp,XATTR_USER_PREFIX ,XATTR_USER_PREFIX_LEN )) goto contloop;
Signature · 1 line
2.28.0
Re: [PATCH 2/2] nfsd: Fix typo in comment
Quoted 22 lines · Alex Dewar
Fix typos in
nfs4xdr.c.Signed-off-by Alex Dewar <[email protected]>--- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4xdr.c +1
-2@@ -4828,7 +4828,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr, slen =strlen (sp);/* -* Check if this a user. attribute, skip it if not. +* Check if this is a user attribute, skip it if not. */ if (strncmp (sp,XATTR_USER_PREFIX ,XATTR_USER_PREFIX_LEN )) goto contloop; --
Quoted 2 lines
2.28.0
"this a" should indeed by "this is a", but "user." is not a typo - it is talking about checking the prefix of the extended attribute, which is "user.", so the "." is intended to be there.
Thanks,
- Frank
Quoted 24 lines · Alex Dewar
In
nfsd4_encode_listxattrs(), the variable p is assigned to at one point but this value is never used before p is reassigned. Fix this.Addresses-Coverity: ("Unused value")
Signed-off-by Alex Dewar <[email protected]>--- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4xdr.c +1
-2@@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr, goto out; } - p =xdr_encode_opaque (p, sp, slen); +xdr_encode_opaque (p, sp, slen); xdrleft -= xdrlen; count++; --
Quoted 2 lines
2.28.0
Yep, I guess my linting missed that, thanks for the fix.
- Frank
Quoted 26 lines · Frank van der Linden
Quoted 21 lines · Alex Dewar
In
nfsd4_encode_listxattrs(), the variable p is assigned to at one point but this value is never used before p is reassigned. Fix this.Addresses-Coverity: ("Unused value")
Signed-off-by Alex Dewar <[email protected]>---
fs/nfsd/nfs4xdr.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4xdr.c +1
-1@@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr, goto out; } - p =xdr_encode_opaque (p, sp, slen); +xdr_encode_opaque (p, sp, slen);
Quoted 7 lines
Quoted 5 lines
fs/nfsd/nfs4xdr.c +0
-1xdrleft -= xdrlen; count++; --2.28.0
Yep, I guess my linting missed that, thanks for the fix.
Bruce, these two don't appear to be urgent, so I'm deferring them to you for v5.10.
--
Chuck Lever
Quoted 30 lines · Frank van der Linden
Quoted 24 lines · Alex Dewar
In
nfsd4_encode_listxattrs(), the variable p is assigned to at one point but this value is never used before p is reassigned. Fix this.Addresses-Coverity: ("Unused value")
Signed-off-by Alex Dewar <[email protected]>--- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4xdr.c +1
-2@@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr, goto out; } - p =xdr_encode_opaque (p, sp, slen); +xdr_encode_opaque (p, sp, slen); xdrleft -= xdrlen; count++; --Quoted 2 lines
2.28.0
Yep, I guess my linting missed that, thanks for the fix.
Quoted 1 line
- Frank
Ping? The second patch in this series had a mistake in it, but I think this one's still good to go :-)
J. Bruce Fields
AppliedQuoted 31 lines · Alex Dewar
Quoted 30 lines · Frank van der Linden
Quoted 24 lines · Alex Dewar
In
nfsd4_encode_listxattrs(), the variable p is assigned to at one point but this value is never used before p is reassigned. Fix this.Addresses-Coverity: ("Unused value")
Signed-off-by Alex Dewar <[email protected]>--- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4xdr.c +1
-2@@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr, goto out; } - p =xdr_encode_opaque (p, sp, slen); +xdr_encode_opaque (p, sp, slen); xdrleft -= xdrlen; count++; --Quoted 2 lines
2.28.0
Yep, I guess my linting missed that, thanks for the fix.
Quoted 4 lines
Quoted 1 line
- Frank
Ping? The second patch in this series had a mistake in it, but I think this one's still good to go :-)
Thanks, applied for 5.10.--b.