Commit af1dbde2 authored by Jochen Friedrich's avatar Jochen Friedrich Committed by Linus Torvalds

[PATCH] NFSv2 READDIR encoding fix

When mounting a Linux partition with NFSv2, READDIR fills in the last
cookie without properly byte-swapping it.  The following READDIR will
fail, so the NFS client sees a truncated directory.

Fix it thus.
parent fb4532b5
......@@ -482,7 +482,7 @@ nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
resp->count = resp->buffer - argp->buffer;
if (resp->offset)
*resp->offset = (u32)offset;
*resp->offset = htonl(offset);
fh_put(&argp->fh);
return nfserr;
......
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