From 79d74f04468475db223169d0cb33ee19ff829747 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 23 Oct 2013 04:35:57 +0000 Subject: [PATCH] Microoptimization git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5078 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 8f473809d..b230b85ea 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5629,7 +5629,7 @@ int scst_alloc_space(struct scst_cmd *cmd) cmd->sg = sgv_pool_alloc(tgt_dev->pool, cmd->bufflen, gfp_mask, flags, &cmd->sg_cnt, &cmd->sgv, &cmd->dev->dev_mem_lim, NULL); - if (cmd->sg == NULL) + if (unlikely(cmd->sg == NULL)) goto out; if (unlikely(cmd->sg_cnt > tgt_dev->max_sg_cnt)) @@ -5642,7 +5642,7 @@ int scst_alloc_space(struct scst_cmd *cmd) cmd->out_sg = sgv_pool_alloc(tgt_dev->pool, cmd->out_bufflen, gfp_mask, flags, &cmd->out_sg_cnt, &cmd->out_sgv, &cmd->dev->dev_mem_lim, NULL); - if (cmd->out_sg == NULL) + if (unlikely(cmd->out_sg == NULL)) goto out_sg_free; if (unlikely(cmd->out_sg_cnt > tgt_dev->max_sg_cnt))