Commit 15f3ec3f authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Linus Torvalds
Browse files

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: default avatarLai Jiangshan <>
Acked-by: default avatarTejun Heo <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 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)
call_rcu(&p->rcu_head, idr_layer_rcu_free);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment