aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-12-06 18:33:15 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-06 01:16:25 -0500
commit2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 (patch)
tree04c095d45dfa892b7710e338724a1ac4f1da7cba /fs/buffer.c
parentde59cf9ed44f64991e52a9de6094729537f0420c (diff)
[PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed
Now that i2c_add_driver() doesn't need the module owner to be set by hand, we can delete it from the drivers. This patch catches all of the drivers that I found in the current tree (if a driver sets the .owner by hand, it's not a problem, just not needed.) Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'fs/buffer.c')
0 files changed, 0 insertions, 0 deletions
cted pointer' href='/cgit/cgit.cgi/litmus-rt-budgetable-locks.git/.git/commit/net/batman-adv/originator.c?h=update_litmus_2019&id=e1a5382f978b67b5cc36eec65e6046730ce07714'>e1a5382f978b
7ae8b2852f94


c6c8fea29769
7ae8b2852f94
c6c8fea29769

704509b8d448
c6c8fea29769
7ae8b2852f94
c6c8fea29769
9591a79f280e
c6c8fea29769
7ae8b2852f94
e3b0d0dea6e0
1605d0d60b66


c6c8fea29769
7ae8b2852f94




c6c8fea29769


7b36e8eef989
c6c8fea29769
9591a79f280e
a4c135c56110
16b1aba849ee

7b36e8eef989
c6c8fea29769
f987ed6ebd99

a4c135c56110



44524fcdf6ca
a4c135c56110

c6c8fea29769
9591a79f280e

f987ed6ebd99
44524fcdf6ca
c6c8fea29769

f987ed6ebd99

c6c8fea29769
2dafb49d84a9
7c64fd98ce51
c6c8fea29769
a73105b8d4c7
c6c8fea29769




7b36e8eef989





c6c8fea29769

16b1aba849ee
7aadf889e897
16b1aba849ee
16b1aba849ee

c90681b85059
16b1aba849ee

c6c8fea29769



c6c8fea29769
16b1aba849ee





7aadf889e897

16b1aba849ee
7aadf889e897
7b36e8eef989
16b1aba849ee




c6c8fea29769



747e4221a03c
c6c8fea29769




7aadf889e897

c6c8fea29769




704509b8d448
c6c8fea29769


9591a79f280e
a4c135c56110
2ae2daf6c3f2
f3e0008f01b2
f987ed6ebd99
a73105b8d4c7
7b36e8eef989


c6c8fea29769
17071578888c
cc47f66e6b9e
16b1aba849ee
c6c8fea29769

c8c991bf2076

2dafb49d84a9
a73105b8d4c7

c6c8fea29769




a4c135c56110

c6c8fea29769














7aadf889e897

1a1f37d9257a
c6c8fea29769















9591a79f280e
c6c8fea29769

0b0094e00084
c6c8fea29769


f987ed6ebd99

c6c8fea29769
9591a79f280e

c6c8fea29769
d7b2a97e03ad
c6c8fea29769
1a241a57be46
c6c8fea29769

0b0094e00084

1a241a57be46





c6c8fea29769
86ceb360565d
c6c8fea29769



0b0094e00084
c6c8fea29769
0b0094e00084
c6c8fea29769

9591a79f280e
f987ed6ebd99
a4c135c56110
44524fcdf6ca
c6c8fea29769





f987ed6ebd99

c6c8fea29769







d7b2a97e03ad
c6c8fea29769
0b0094e00084


c6c8fea29769


7c64fd98ce51
fc9572756418
c6c8fea29769







7aadf889e897
c6c8fea29769
fb778ea173fc
c6c8fea29769
c90681b85059
c6c8fea29769



c6c8fea29769


fb778ea173fc
c6c8fea29769
fb778ea173fc
7aadf889e897

c6c8fea29769


7aadf889e897
7b36e8eef989
fb778ea173fc
c6c8fea29769

032b7969f887

c6c8fea29769

fb778ea173fc
c6c8fea29769

c6c8fea29769

c6c8fea29769






















7aadf889e897
c6c8fea29769
32ae9b221e78
c6c8fea29769
e1a5382f978b
c6c8fea29769


c90681b85059

32ae9b221e78

c6c8fea29769
32ae9b221e78
86ceb360565d

32ae9b221e78


c6c8fea29769
32ae9b221e78
86ceb360565d

32ae9b221e78

c6c8fea29769

44c4349a2a11

32ae9b221e78
c6c8fea29769



c6c8fea29769


fb778ea173fc
7aadf889e897
e1a5382f978b

c6c8fea29769

e1a5382f978b

c6c8fea29769

d7b2a97e03ad
c6c8fea29769
d7b2a97e03ad
c6c8fea29769
c6c8fea29769





e1a5382f978b
f987ed6ebd99
e1a5382f978b


c6c8fea29769



e1a5382f978b


c6c8fea29769
fb778ea173fc
c6c8fea29769

e1a5382f978b
c6c8fea29769

32ae9b221e78



c6c8fea29769







320f422f629c
c6c8fea29769
c6c8fea29769






320f422f629c
c6c8fea29769
c6c8fea29769








e6c10f433af9
c6c8fea29769
e6c10f433af9
c6c8fea29769
7aadf889e897
c6c8fea29769
c6c8fea29769
c90681b85059

c6c8fea29769


c6c8fea29769


fb778ea173fc
7aadf889e897
2ae2daf6c3f2




c6c8fea29769

fb778ea173fc
c6c8fea29769

c6c8fea29769


fb778ea173fc
c6c8fea29769














320f422f629c
c6c8fea29769
c6c8fea29769




38e3c5f0dae7
c6c8fea29769










320f422f629c
c6c8fea29769
c6c8fea29769



38e3c5f0dae7
c6c8fea29769









e6c10f433af9
c6c8fea29769
e6c10f433af9
c6c8fea29769
7aadf889e897
c6c8fea29769
e6c10f433af9
c6c8fea29769
c90681b85059

c6c8fea29769


c6c8fea29769


fb778ea173fc
7aadf889e897
2ae2daf6c3f2
c6c8fea29769
e6c10f433af9
2ae2daf6c3f2
c6c8fea29769



fb778ea173fc
c6c8fea29769



e6c10f433af9

c6c8fea29769

e6c10f433af9
c6c8fea29769

e6c10f433af9
c6c8fea29769

e6c10f433af9

c6c8fea29769


e6c10f433af9
c6c8fea29769


fb778ea173fc
c6c8fea29769

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
  
                                                     


















                                                                      








                              
                                  





                                                            

                                                                         

 







                                                                             




                                              




                                             



                                    


                 
                                                       
 
                                                       
                                           

 














                                                                    


                                                                       
 
                                                                        

                                      
                                                              
                        
                         
 
                                           
 
                                                       
                                                    


                                             
 




                                                                


                          
                                                    
 
                                           
                                                       

                                    
                                                             
 

                                                  



                                                                       
                                                

         
                                                           

                                                                 
                                                 
                                                

         

                                                    
                                              
                                                          
                                                   
 
                                  




                                        





                                                              

                                               
                                                       
                                           
                                

                                                                     
                   

                  



                                                       
                                   





                                                 

                                                                    
 
                                            
                                                      




                                          



                                                                   
                                                                               




                                    

                                                   




                                                        
                                                            


                            
                                                
                                              
                                                 
                                                     
                                                    
                                                 


                                            
 
                                          
                                          
                                       

                                                

                                             
                                  

                                           




                                                                                

                                                   














                                                                        

                                                                              
                            















                                                                     
                                           

                                      
                                


                                

                                                  
                                                           

                                                                 
 
                                                                            
                                                                          
                                                                            

                                                                               

                                                          





                                                                               
                                                             
                                                                                                     



                                                                                
                                                                                                           
                                                                          
                                                                     

                                            
 
                                                         
                                                                     
                                                        





                                                                              

                                                    







                                                        
                                                                     
                                             


                                                                             


                                                             
                                                           
                                                                           







                                                       
                                           
                                
                                                                     
                                    
                   



                       


                                          
                                                 
 
                                        

                                                                    


                                                                            
                                                    
                                                              
                                         

                         

                                                                      

                                                                      
                                          

         

                                






















                                                                       
                                           
                                
                                      
                                    
                                                       


                             

                    

                                                       
 
                          

                                                                                                      


                                                
 
                                                 

                                                                                            

                                                

         

                                                                           
                                                                 



                                                                           


                                          
                                
                                                                             

                                                                     

                                         

                                                    

                                                                   
                                                                             
                                                                    
                                                                             
 





                                                                            
                                                                          
                                                                                


                                                                   



                                              


                                                        
                 
                                  

         
                              

                                                                  



                                            







                                                                          
                      
                          






                                                                     
                      
                          








                                                   
                                                                   
 
                                                                        
                                                       
                                
                                
                                    

                   


                                                                             


                                          
                                
                                                                             




                                                                      

                                         
                                  

         


                 
                          














                                                                
                      
                          




                                                                        
                                                          










                                                                      
                      
                          



                                                  
                                                               









                                                                               
                                                                   
 
                                                                        
                                                       
                                
                                
                                          
                                    

                   


                                                                             


                                          
                                
                                                                             
                                                               
                                                                     
                                                            
                                                                 



                                         
                                  



                                                                             

                                                                     

                                 
                                                 

                                 
                                                                         

                                 

                                                                


                          
                                


                 
                          

                       
/*
 * Copyright (C) 2009-2012 B.A.T.M.A.N. contributors:
 *
 * Marek Lindner, Simon Wunderlich
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA
 *
 */

#include "main.h"
#include "originator.h"
#include "hash.h"
#include "translation-table.h"
#include "routing.h"
#include "gateway_client.h"
#include "hard-interface.h"
#include "unicast.h"
#include "soft-interface.h"
#include "bridge_loop_avoidance.h"

static void purge_orig(struct work_struct *work);

static void start_purge_timer(struct bat_priv *bat_priv)
{
	INIT_DELAYED_WORK(&bat_priv->orig_work, purge_orig);
	queue_delayed_work(bat_event_workqueue,
			   &bat_priv->orig_work, msecs_to_jiffies(1000));
}

/* returns 1 if they are the same originator */
static int compare_orig(const struct hlist_node *node, const void *data2)
{
	const void *data1 = container_of(node, struct orig_node, hash_entry);

	return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
}

int originator_init(struct bat_priv *bat_priv)
{
	if (bat_priv->orig_hash)
		return 1;

	bat_priv->orig_hash = hash_new(1024);

	if (!bat_priv->orig_hash)
		goto err;

	start_purge_timer(bat_priv);
	return 1;

err:
	return 0;
}

void neigh_node_free_ref(struct neigh_node *neigh_node)
{
	if (atomic_dec_and_test(&neigh_node->refcount))
		kfree_rcu(neigh_node, rcu);
}

/* increases the refcounter of a found router */
struct neigh_node *orig_node_get_router(struct orig_node *orig_node)
{
	struct neigh_node *router;

	rcu_read_lock();
	router = rcu_dereference(orig_node->router);

	if (router && !atomic_inc_not_zero(&router->refcount))
		router = NULL;

	rcu_read_unlock();
	return router;
}

struct neigh_node *batadv_neigh_node_new(struct hard_iface *hard_iface,
					 const uint8_t *neigh_addr,
					 uint32_t seqno)
{
	struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
	struct neigh_node *neigh_node;

	neigh_node = kzalloc(sizeof(*neigh_node), GFP_ATOMIC);
	if (!neigh_node)
		goto out;

	INIT_HLIST_NODE(&neigh_node->list);

	memcpy(neigh_node->addr, neigh_addr, ETH_ALEN);
	spin_lock_init(&neigh_node->lq_update_lock);

	/* extra reference for return */
	atomic_set(&neigh_node->refcount, 2);

	bat_dbg(DBG_BATMAN, bat_priv,
		"Creating new neighbor %pM, initial seqno %d\n",
		neigh_addr, seqno);

out:
	return neigh_node;
}

static void orig_node_free_rcu(struct rcu_head *rcu)
{
	struct hlist_node *node, *node_tmp;
	struct neigh_node *neigh_node, *tmp_neigh_node;
	struct orig_node *orig_node;

	orig_node = container_of(rcu, struct orig_node, rcu);

	spin_lock_bh(&orig_node->neigh_list_lock);

	/* for all bonding members ... */
	list_for_each_entry_safe(neigh_node, tmp_neigh_node,
				 &orig_node->bond_list, bonding_list) {
		list_del_rcu(&neigh_node->bonding_list);
		neigh_node_free_ref(neigh_node);
	}

	/* for all neighbors towards this originator ... */
	hlist_for_each_entry_safe(neigh_node, node, node_tmp,
				  &orig_node->neigh_list, list) {
		hlist_del_rcu(&neigh_node->list);
		neigh_node_free_ref(neigh_node);
	}

	spin_unlock_bh(&orig_node->neigh_list_lock);

	frag_list_free(&orig_node->frag_list);
	tt_global_del_orig(orig_node->bat_priv, orig_node,
			   "originator timed out");

	kfree(orig_node->tt_buff);
	kfree(orig_node->bcast_own);
	kfree(orig_node->bcast_own_sum);
	kfree(orig_node);
}

void orig_node_free_ref(struct orig_node *orig_node)
{
	if (atomic_dec_and_test(&orig_node->refcount))
		call_rcu(&orig_node->rcu, orig_node_free_rcu);
}

void originator_free(struct bat_priv *bat_priv)
{
	struct hashtable_t *hash = bat_priv->orig_hash;