From 6c566dc8f7d594a5becc2a456e1b1ea6c638e497 Mon Sep 17 00:00:00 2001 From: nikita Date: Thu, 12 Oct 2006 20:18:02 +0000 Subject: [PATCH] ptlrpc: mark branches in hot path as unlikely() --- lustre/ptlrpc/pack_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index a83cc98..9bd9388 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -421,14 +421,14 @@ void *lustre_msg_buf_v1(void *msg, int n, int min_size) LASSERT(n >= 0); bufcount = m->lm_bufcount; - if (n >= bufcount) { + if (unlikely(n >= bufcount)) { CDEBUG(D_INFO, "msg %p buffer[%d] not present (count %d)\n", m, n, bufcount); return NULL; } buflen = m->lm_buflens[n]; - if (buflen < min_size) { + if (unlikely(buflen < min_size)) { CERROR("msg %p buffer[%d] size %d too small (required %d)\n", m, n, buflen, min_size); LBUG(); -- 1.8.3.1