mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[INET]: Consolidate frag queues freeing
Since we now allocate the queues in inet_fragment.c, we can safely free it in the same place. The ->destructor callback thus becomes optional for inet_frags. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
48d6005638
commit
c95477090a
4 changed files with 5 additions and 14 deletions
|
|
@ -136,7 +136,9 @@ void inet_frag_destroy(struct inet_frag_queue *q, struct inet_frags *f,
|
|||
*work -= f->qsize;
|
||||
atomic_sub(f->qsize, &f->mem);
|
||||
|
||||
f->destructor(q);
|
||||
if (f->destructor)
|
||||
f->destructor(q);
|
||||
kfree(q);
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(inet_frag_destroy);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ static __inline__ void ip4_frag_free(struct inet_frag_queue *q)
|
|||
qp = container_of(q, struct ipq, q);
|
||||
if (qp->peer)
|
||||
inet_putpeer(qp->peer);
|
||||
kfree(qp);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue