Skip to content

Commit 29e7ca7

Browse files
chuckleverTrond Myklebust
authored andcommitted
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: Olga Kornievskaia <aglo@umich.edu> Fixes: 02ef04e ("NFS: Account for XDR pad of buf->pages") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Olga Kornievskaia <aglo@umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 7c2bd9a commit 29e7ca7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/nfs/nfs4xdr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,7 +2589,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
25892589
ARRAY_SIZE(nfs4_acl_bitmap), &hdr);
25902590

25912591
rpc_prepare_reply_pages(req, args->acl_pages, 0,
2592-
args->acl_len, replen);
2592+
args->acl_len, replen + 1);
25932593
encode_nops(&hdr);
25942594
}
25952595

@@ -2811,7 +2811,7 @@ static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req,
28112811
}
28122812

28132813
rpc_prepare_reply_pages(req, (struct page **)&args->page, 0,
2814-
PAGE_SIZE, replen);
2814+
PAGE_SIZE, replen + 1);
28152815
encode_nops(&hdr);
28162816
}
28172817

0 commit comments

Comments
 (0)