aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 473b48ff4523..282a9a2ec90c 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -104,7 +104,7 @@ int xprt_register_transport(struct xprt_class *transport)
104 spin_lock(&xprt_list_lock); 104 spin_lock(&xprt_list_lock);
105 list_for_each_entry(t, &xprt_list, list) { 105 list_for_each_entry(t, &xprt_list, list) {
106 /* don't register the same transport class twice */ 106 /* don't register the same transport class twice */
107 if (t == transport) 107 if (t->ident == transport->ident)
108 goto out; 108 goto out;
109 } 109 }
110 110
@@ -987,15 +987,13 @@ struct rpc_xprt *xprt_create_transport(struct xprt_create *args)
987 987
988 spin_lock(&xprt_list_lock); 988 spin_lock(&xprt_list_lock);
989 list_for_each_entry(t, &xprt_list, list) { 989 list_for_each_entry(t, &xprt_list, list) {
990 if ((t->family == args->dstaddr->sa_family) && 990 if (t->ident == args->ident) {
991 (t->protocol == args->proto)) {
992 spin_unlock(&xprt_list_lock); 991 spin_unlock(&xprt_list_lock);
993 goto found; 992 goto found;
994 } 993 }
995 } 994 }
996 spin_unlock(&xprt_list_lock); 995 spin_unlock(&xprt_list_lock);
997 printk(KERN_ERR "RPC: transport (%u/%d) not supported\n", 996 printk(KERN_ERR "RPC: transport (%d) not supported\n", args->ident);
998 args->dstaddr->sa_family, args->proto);
999 return ERR_PTR(-EIO); 997 return ERR_PTR(-EIO);
1000 998
1001found: 999found: