mirror of https://gitee.com/openkylin/linux.git
Three nfsd bugfixes. None are new bugs, but they all take a little
effort to hit, which might explain why they weren't found sooner. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJb6zwdAAoJECebzXlCjuG+SLMP/AlpI+vPV7DdCLRWGCY1ZMjk 5pxIS+74mD2EopBYgZY58L1fxWgv2bLOiAs/baAlNpkjTNX3wlxXGTu9IzVdPOn7 3n+W2Rb+mXEFaag7mP8RFpOvt7Yb3p4DObGpg7TKWJZ6r/8xcxQWQO+e0iiS5+XK EOiaFcGmYlOC1JtrRIL2fr16trXUhT1gz7qAZgKBzebbEdn4FfdsdwHm7nUyRB3I LhCMV35RfzOBC2C/kQzlHaHYlo0dx5lKMtVzvtgMdpgXr4QXE/7Ke/ANQ7oGfhhO 9uX0Uf18HmeGRejK9QoMha7VWuwh5pyHBq0ppMpGL2jb11BD/l9iXgS+vTxpA2B0 YIiSOnaiDFsEk6hMsFqueVIdaTrarcjg/S2mh2QDjtkXKS3L0W6/7v97JJHu9J4l 6zxiT6Crq2p8pMZ5gY3RI1AYllW/K+TRoccLhO+q19g3q1HWxP6DyeFBgNF66/ha NtmQP+94IkaCS70zirpEu/OeUMviQgX2x77OReyibHLA4+R+hNHwtR67BLl+xG0G jmKHfqqX7offFaHmsoD8kK3gpKtit0/py9Hp7gXQg4vU5iL512gI83ICEOEkZMXn Ppsrl1HyoO/ohY/USpMvRqYHjM1ZGew19ZzD7SId6vUVaYjQIEsjQVnycK3h+gSb otk5pc3bWPCwa8csOWPs =+1Ub -----END PGP SIGNATURE----- Merge tag 'nfsd-4.20-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "Three nfsd bugfixes. None are new bugs, but they all take a little effort to hit, which might explain why they weren't found sooner" * tag 'nfsd-4.20-1' of git://linux-nfs.org/~bfields/linux: SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() nfsd: COPY and CLONE operations require the saved filehandle to be set sunrpc: correct the computation for page_ptr when truncating
This commit is contained in:
commit
4e4490d438
|
@ -1038,6 +1038,9 @@ nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|||
{
|
||||
__be32 status;
|
||||
|
||||
if (!cstate->save_fh.fh_dentry)
|
||||
return nfserr_nofilehandle;
|
||||
|
||||
status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh,
|
||||
src_stateid, RD_STATE, src, NULL);
|
||||
if (status) {
|
||||
|
|
|
@ -546,7 +546,7 @@ EXPORT_SYMBOL_GPL(xdr_commit_encode);
|
|||
static __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr,
|
||||
size_t nbytes)
|
||||
{
|
||||
static __be32 *p;
|
||||
__be32 *p;
|
||||
int space_left;
|
||||
int frag1bytes, frag2bytes;
|
||||
|
||||
|
@ -673,11 +673,10 @@ void xdr_truncate_encode(struct xdr_stream *xdr, size_t len)
|
|||
WARN_ON_ONCE(xdr->iov);
|
||||
return;
|
||||
}
|
||||
if (fraglen) {
|
||||
if (fraglen)
|
||||
xdr->end = head->iov_base + head->iov_len;
|
||||
xdr->page_ptr--;
|
||||
}
|
||||
/* (otherwise assume xdr->end is already set) */
|
||||
xdr->page_ptr--;
|
||||
head->iov_len = len;
|
||||
buf->len = len;
|
||||
xdr->p = head->iov_base + head->iov_len;
|
||||
|
|
Loading…
Reference in New Issue