Commit 983f7121 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] NFS: readdir reply truncated

Fix the tests for readdir reply truncation so that we don't get
uncalled for kernel verbiage.
parent 8069b968
...@@ -434,7 +434,7 @@ nfs_xdr_readdirres(struct rpc_rqst *req, u32 *p, void *dummy) ...@@ -434,7 +434,7 @@ nfs_xdr_readdirres(struct rpc_rqst *req, u32 *p, void *dummy)
goto short_pkt; goto short_pkt;
entry = p; entry = p;
} }
if (!nr) if (!nr && (entry[0] != 0 || entry[1] != 1))
goto short_pkt; goto short_pkt;
out: out:
kunmap(*page); kunmap(*page);
......
...@@ -579,7 +579,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res) ...@@ -579,7 +579,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res)
goto short_pkt; goto short_pkt;
entry = p; entry = p;
} }
if (!nr) if (!nr && (entry[0] != 0 || entry[1] != 1))
goto short_pkt; goto short_pkt;
out: out:
kunmap(*page); kunmap(*page);
......
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