[PATCH] klist: fix klist to have the same klist_add semantics as list_head
at the moment, the list_head semantics are list_add(node, head) whereas current klist semantics are klist_add(head, node) This is bound to cause confusion, and since klist is the newcomer, it should follow the list_head semantics. I also added missing include guards to klist.h Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
fef6ec8dd9
commit
d856f1e337
@@ -9,6 +9,9 @@
|
||||
* This file is rleased under the GPL v2.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_KLIST_H
|
||||
#define _LINUX_KLIST_H
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/kref.h>
|
||||
@@ -31,8 +34,8 @@ struct klist_node {
|
||||
struct completion n_removed;
|
||||
};
|
||||
|
||||
extern void klist_add_tail(struct klist * k, struct klist_node * n);
|
||||
extern void klist_add_head(struct klist * k, struct klist_node * n);
|
||||
extern void klist_add_tail(struct klist_node * n, struct klist * k);
|
||||
extern void klist_add_head(struct klist_node * n, struct klist * k);
|
||||
|
||||
extern void klist_del(struct klist_node * n);
|
||||
extern void klist_remove(struct klist_node * n);
|
||||
@@ -53,3 +56,4 @@ extern void klist_iter_init_node(struct klist * k, struct klist_iter * i,
|
||||
extern void klist_iter_exit(struct klist_iter * i);
|
||||
extern struct klist_node * klist_next(struct klist_iter * i);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user