提交 15f3ec3f 编写于 作者: L Lai Jiangshan 提交者: Linus Torvalds

idr: reduce the unneeded check in free_layer()

If "idr->hint == p" is true, it also implies "idr->hint" is true(not NULL).
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: NTejun Heo <tj@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 aefb7682
......@@ -145,7 +145,7 @@ static void idr_layer_rcu_free(struct rcu_head *head)
static inline void free_layer(struct idr *idr, struct idr_layer *p)
{
if (idr->hint && idr->hint == p)
if (idr->hint == p)
RCU_INIT_POINTER(idr->hint, NULL);
call_rcu(&p->rcu_head, idr_layer_rcu_free);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册