提交 29e7ca71 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

NFS: Fix handling of reply page vector

NFSv4 GETACL and FS_LOCATIONS requests stopped working in v5.1-rc.

These two need the extra padding to be added directly to the reply
length.
Reported-by: NOlga Kornievskaia <aglo@umich.edu>
Fixes: 02ef04e4 ("NFS: Account for XDR pad of buf->pages")
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Tested-by: NOlga Kornievskaia <aglo@umich.edu>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 7c2bd9a3
...@@ -2589,7 +2589,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr, ...@@ -2589,7 +2589,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
ARRAY_SIZE(nfs4_acl_bitmap), &hdr); ARRAY_SIZE(nfs4_acl_bitmap), &hdr);
rpc_prepare_reply_pages(req, args->acl_pages, 0, rpc_prepare_reply_pages(req, args->acl_pages, 0,
args->acl_len, replen); args->acl_len, replen + 1);
encode_nops(&hdr); encode_nops(&hdr);
} }
...@@ -2811,7 +2811,7 @@ static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, ...@@ -2811,7 +2811,7 @@ static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req,
} }
rpc_prepare_reply_pages(req, (struct page **)&args->page, 0, rpc_prepare_reply_pages(req, (struct page **)&args->page, 0,
PAGE_SIZE, replen); PAGE_SIZE, replen + 1);
encode_nops(&hdr); encode_nops(&hdr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册