#include <linux/spinlock.h> #include <linux/list.h> #include <linux/module.h> #include <target/iscsi/iscsi_transport.h> static LIST_HEAD(g_transport_list); static DEFINE_MUTEX(transport_mutex);
struct iscsit_transport *iscsit_get_transport(int type) { struct iscsit_transport *t; mutex_lock(&transport_mutex); list_for_each_entry(t, &g_transport_list, t_node) { if (t->transport_type == type) { if (t->owner && !try_module_get(t->owner)) { t = NULL; } mutex_unlock(&transport_mutex); return t; } } mutex_unlock(&transport_mutex); return NULL; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Nicholas Bellinger | 79 | 100.00% | 1 | 100.00% |
Total | 79 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Nicholas Bellinger | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Nicholas Bellinger | 53 | 100.00% | 1 | 100.00% |
Total | 53 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Nicholas Bellinger | 39 | 100.00% | 1 | 100.00% |
Total | 39 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Nicholas Bellinger | 219 | 98.65% | 1 | 50.00% |
Bart Van Assche | 3 | 1.35% | 1 | 50.00% |
Total | 222 | 100.00% | 2 | 100.00% |