Skip to content
Commit 99602572 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Linus Torvalds
Browse files

list.h: add list_is_singular()



Add list_is_singular() to check a list has just one entry.

list_is_singular() is useful to check whether a list_head which have been
temporarily allocated for listing objects can be released or not.

Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3d8d996e
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