Skip to content

Commit

Permalink
NFS: Fix handling of reply page vector
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chucklever authored and Trond Myklebust committed Apr 11, 2019
1 parent 7c2bd9a commit 29e7ca7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfs/nfs4xdr.c
Expand Up @@ -2589,7 +2589,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
ARRAY_SIZE(nfs4_acl_bitmap), &hdr);

rpc_prepare_reply_pages(req, args->acl_pages, 0,
args->acl_len, replen);
args->acl_len, replen + 1);
encode_nops(&hdr);
}

Expand Down Expand Up @@ -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,
PAGE_SIZE, replen);
PAGE_SIZE, replen + 1);
encode_nops(&hdr);
}

Expand Down

0 comments on commit 29e7ca7

Please sign in to comment.