summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2287c32)
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/include/linux/klist.h b/include/linux/klist.h
extern void klist_del(struct klist_node * n);
extern void klist_remove(struct klist_node * n);
extern void klist_del(struct klist_node * n);
extern void klist_remove(struct klist_node * n);
+extern int klist_node_attached(struct klist_node * n);
+
struct klist_iter {
struct klist * i_klist;
struct klist_iter {
struct klist * i_klist;
struct klist_node * n = container_of(kref, struct klist_node, n_ref);
list_del(&n->n_node);
complete(&n->n_removed);
struct klist_node * n = container_of(kref, struct klist_node, n_ref);
list_del(&n->n_node);
complete(&n->n_removed);
}
static int klist_dec_and_del(struct klist_node * n)
}
static int klist_dec_and_del(struct klist_node * n)
EXPORT_SYMBOL_GPL(klist_remove);
EXPORT_SYMBOL_GPL(klist_remove);
+/**
+ * klist_node_attached - Say whether a node is bound to a list or not.
+ * @n: Node that we're testing.
+ */
+
+int klist_node_attached(struct klist_node * n)
+{
+ return (n->n_klist != NULL);
+}
+
+EXPORT_SYMBOL_GPL(klist_node_attached);
+
+
/**
* klist_iter_init_node - Initialize a klist_iter structure.
* @k: klist we're iterating.
/**
* klist_iter_init_node - Initialize a klist_iter structure.
* @k: klist we're iterating.
}
EXPORT_SYMBOL_GPL(klist_next);
}
EXPORT_SYMBOL_GPL(klist_next);