diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-11-01 17:43:20 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-11-01 17:43:20 +0100 |
commit | a53a0ab8ff725672fcb47bb9a5ef75fce45679d0 (patch) | |
tree | 75cdea78f27fdd569d72cea0b7837bbcc8d871f7 /include/net/fq_impl.h | |
parent | 1f20f9ff57ca23b9f5502fca85ce3977e8496cb1 (diff) | |
parent | b817d936248b9bcee8282e97fb1dda1b03c903fe (diff) |
Merge tag 'asoc-fix-v4.14-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linussound-4.14-rc8
ASoC: Fixes for v4.14
A bunch of fixes here, mostly device specific ones (the biggest one
being the revert of the hotword support for rt5514), with a couple of
core fixes for potential issues with corrupted or otherwise invalid
topology files.
Diffstat (limited to 'include/net/fq_impl.h')
-rw-r--r-- | include/net/fq_impl.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h index 4e6131cd3f43..ac1a2317941e 100644 --- a/include/net/fq_impl.h +++ b/include/net/fq_impl.h @@ -146,6 +146,7 @@ static void fq_tin_enqueue(struct fq *fq, fq_flow_get_default_t get_default_func) { struct fq_flow *flow; + bool oom; lockdep_assert_held(&fq->lock); @@ -167,8 +168,8 @@ static void fq_tin_enqueue(struct fq *fq, } __skb_queue_tail(&flow->queue, skb); - - if (fq->backlog > fq->limit || fq->memory_usage > fq->memory_limit) { + oom = (fq->memory_usage > fq->memory_limit); + while (fq->backlog > fq->limit || oom) { flow = list_first_entry_or_null(&fq->backlogs, struct fq_flow, backlogchain); @@ -183,8 +184,10 @@ static void fq_tin_enqueue(struct fq *fq, flow->tin->overlimit++; fq->overlimit++; - if (fq->memory_usage > fq->memory_limit) + if (oom) { fq->overmemory++; + oom = (fq->memory_usage > fq->memory_limit); + } } } |