diff options
| author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2014-06-06 14:37:14 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:59:26 +0200 |
| commit | 23131245a191c61ad0307025d00b9677a7bc8363 (patch) | |
| tree | e43de966a55cd0feef0f782e0a5b9b13f0ab1fbb /lib/idr.c | |
| parent | fe03159fd91e25c88b6a59ec3271b1d52cefa5de (diff) | |
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: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/idr.c')
| -rw-r--r-- | lib/idr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |
