#include <linux/spinlock.h> #include <linux/list.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 | nicholas bellinger | 79 | 100.00% | 1 | 100.00% |
Total | 79 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
nicholas bellinger | nicholas bellinger | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
nicholas bellinger | nicholas bellinger | 53 | 100.00% | 1 | 100.00% |
Total | 53 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
nicholas bellinger | nicholas bellinger | 39 | 100.00% | 1 | 100.00% |
Total | 39 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
nicholas bellinger | nicholas bellinger | 219 | 100.00% | 1 | 100.00% |
Total | 219 | 100.00% | 1 | 100.00% |