diff options
Diffstat (limited to 'net/802/psnap.c')
-rw-r--r-- | net/802/psnap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/802/psnap.c b/net/802/psnap.c index 31128cb92a23..b3cfe5a14fca 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/in.h> | 21 | #include <linux/in.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/rculist.h> | ||
23 | 24 | ||
24 | static LIST_HEAD(snap_list); | 25 | static LIST_HEAD(snap_list); |
25 | static DEFINE_SPINLOCK(snap_lock); | 26 | static DEFINE_SPINLOCK(snap_lock); |
@@ -30,11 +31,9 @@ static struct llc_sap *snap_sap; | |||
30 | */ | 31 | */ |
31 | static struct datalink_proto *find_snap_client(unsigned char *desc) | 32 | static struct datalink_proto *find_snap_client(unsigned char *desc) |
32 | { | 33 | { |
33 | struct list_head *entry; | ||
34 | struct datalink_proto *proto = NULL, *p; | 34 | struct datalink_proto *proto = NULL, *p; |
35 | 35 | ||
36 | list_for_each_rcu(entry, &snap_list) { | 36 | list_for_each_entry_rcu(p, &snap_list, node) { |
37 | p = list_entry(entry, struct datalink_proto, node); | ||
38 | if (!memcmp(p->type, desc, 5)) { | 37 | if (!memcmp(p->type, desc, 5)) { |
39 | proto = p; | 38 | proto = p; |
40 | break; | 39 | break; |