forked from mirrors/linux
		
	net/sched: add net device refcount tracker to struct Qdisc
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
		
							parent
							
								
									c04438f58d
								
							
						
					
					
						commit
						606509f27f
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -125,7 +125,7 @@ struct Qdisc {
 | 
				
			||||||
	spinlock_t		seqlock;
 | 
						spinlock_t		seqlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct rcu_head		rcu;
 | 
						struct rcu_head		rcu;
 | 
				
			||||||
 | 
						netdevice_tracker	dev_tracker;
 | 
				
			||||||
	/* private data */
 | 
						/* private data */
 | 
				
			||||||
	long privdata[] ____cacheline_aligned;
 | 
						long privdata[] ____cacheline_aligned;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -973,7 +973,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
 | 
				
			||||||
	sch->enqueue = ops->enqueue;
 | 
						sch->enqueue = ops->enqueue;
 | 
				
			||||||
	sch->dequeue = ops->dequeue;
 | 
						sch->dequeue = ops->dequeue;
 | 
				
			||||||
	sch->dev_queue = dev_queue;
 | 
						sch->dev_queue = dev_queue;
 | 
				
			||||||
	dev_hold(dev);
 | 
						dev_hold_track(dev, &sch->dev_tracker, GFP_KERNEL);
 | 
				
			||||||
	refcount_set(&sch->refcnt, 1);
 | 
						refcount_set(&sch->refcnt, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return sch;
 | 
						return sch;
 | 
				
			||||||
| 
						 | 
					@ -1073,7 +1073,7 @@ static void qdisc_destroy(struct Qdisc *qdisc)
 | 
				
			||||||
		ops->destroy(qdisc);
 | 
							ops->destroy(qdisc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	module_put(ops->owner);
 | 
						module_put(ops->owner);
 | 
				
			||||||
	dev_put(qdisc_dev(qdisc));
 | 
						dev_put_track(qdisc_dev(qdisc), &qdisc->dev_tracker);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	trace_qdisc_destroy(qdisc);
 | 
						trace_qdisc_destroy(qdisc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue