]> git.baikalelectronics.ru Git - kernel.git/commit
rpc: Allow xdr_buf_subsegment to operate in-place
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 25 Feb 2014 22:21:08 +0000 (17:21 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Sat, 29 Mar 2014 01:24:49 +0000 (21:24 -0400)
commit01173fb3d7b20f008780ef4dd408c5bfc61741a0
tree6eb394e6792d24331afde16e4704ce558b1882e1
parent9a0be9d965bc0848d4a33a85f08b4d518158d6a3
rpc: Allow xdr_buf_subsegment to operate in-place

Allow

xdr_buf_subsegment(&buf, &buf, base, len)

to modify an xdr_buf in-place.

Also, none of the callers need the iov_base of head or tail to be zeroed
out.

Also add documentation.

(As it turns out, I'm not really using this new guarantee, but it seems
a simple way to make this function a bit more robust.)

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xdr.c