diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-14 22:31:15 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-14 22:31:15 +0100 |
commit | 4e4490d438a1c84411e3ebd0b850b46dd2e752cf (patch) | |
tree | 46f0ca66f3725f5fccbcc1435353dff5816c5137 /net | |
parent | Merge tag 'pci-v4.20-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() (diff) | |
download | linux-4e4490d438a1c84411e3ebd0b850b46dd2e752cf.tar.xz linux-4e4490d438a1c84411e3ebd0b850b46dd2e752cf.zip |
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
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xdr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 2bbb8d38d2bf..f302c6eb8779 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -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; |