summaryrefslogtreecommitdiff
path: root/net/sunrpc/xdr.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2019-08-20 01:37:05 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-08-20 17:28:50 +0300
commit95bd8304b34656d30bc0c908384de007b8fbcb55 (patch)
tree09ff1a47d333767d04253c5b53ea08fa56b7ac16 /net/sunrpc/xdr.c
parent691b45ddbd182a4ce0bc91953c70c845cf0935f1 (diff)
downloadlinux-95bd8304b34656d30bc0c908384de007b8fbcb55.tar.xz
SUNRPC: Inline xdr_commit_encode
Micro-optimization: For xdr_commit_encode call sites in net/sunrpc/xdr.c, eliminate the extra calling sequence. On my client, this change saves about a microsecond for every 30 calls to xdr_reserve_space(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xdr.c')
-rw-r--r--net/sunrpc/xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 48c93b9e525e..7ba0ede6b417 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -560,7 +560,7 @@ EXPORT_SYMBOL_GPL(xdr_init_encode);
* required at the end of encoding, or any other time when the xdr_buf
* data might be read.
*/
-void xdr_commit_encode(struct xdr_stream *xdr)
+inline void xdr_commit_encode(struct xdr_stream *xdr)
{
int shift = xdr->scratch.iov_len;
void *page;