Skip to content

Commit 30c1d24

Browse files
committed
NFSD: Remove unused values from nfsd4_encode_components_esc()
Clean up. The computed value of @p is saved each time through the loop but is never used. Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 6b9c108 commit 30c1d24

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

fs/nfsd/nfs4xdr.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2652,13 +2652,10 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
26522652

26532653
strlen = end - str;
26542654
if (strlen) {
2655-
p = xdr_reserve_space(xdr, strlen + 4);
2656-
if (!p)
2655+
if (xdr_stream_encode_opaque(xdr, str, strlen) < 0)
26572656
return nfserr_resource;
2658-
p = xdr_encode_opaque(p, str, strlen);
26592657
count++;
2660-
}
2661-
else
2658+
} else
26622659
end++;
26632660
if (found_esc)
26642661
end = next;

0 commit comments

Comments
 (0)