]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r229694:
authorjh <jh@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 Jan 2012 16:28:35 +0000 (16:28 +0000)
committerjh <jh@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 Jan 2012 16:28:35 +0000 (16:28 +0000)
commitbfb887d9c4230bc5ed242173e4485c6e0d9c8e49
tree131d3d25ce9041b9f4472c78d609861c25b470ca
parent36f8d506a3b5d68faba3994c3d8f0590ab318075
MFC r229694:

r222004 changed sbuf_finish() to not clear the buffer error status. As a
consequence sbuf_len() will return -1 for buffers which had the error
status set prior to sbuf_finish() call. This causes a problem in
pfs_read() which purposely uses a fixed size sbuf to discard bytes which
are not needed to fulfill the read request.

Work around the problem by using the full buffer length when
sbuf_finish() indicates an overflow. An overflowed sbuf with fixed size
is always full.

PR: kern/163076

git-svn-id: svn://svn.freebsd.org/base/stable/9@230485 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/pseudofs/pseudofs_vnops.c