diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2020-06-04 00:49:19 +0300 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2020-06-04 00:49:19 +0300 |
| commit | 08e780103611fb2be36c17ff80de6cb54c910dd0 (patch) | |
| tree | 8bd63552a71f699da64faee819fc9c56501be6f2 /include/net/sock.h | |
| parent | 978414b66805b23c93560db9cdacd4fd83f8cc52 (diff) | |
| parent | 60fca757270659c627384fcfe7219d2b85f1459c (diff) | |
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998
This brings LA.UM.8.4.r1-05500-8x98.0 up to date with
https://android.googlesource.com/kernel/common/ android-4.4-p at commit:
60fca75727065 Merge 4.4.226 into android-4.4-p
Conflicts:
drivers/base/firmware_class.c
drivers/gpu/drm/msm/msm_gem.c
drivers/mmc/host/sdhci.c
drivers/net/wireless/ath/ath10k/core.c
kernel/trace/blktrace.c
net/socket.c
sound/core/rawmidi.c
sound/usb/mixer.c
Change-Id: Ic8599e865656da72a9405c45f27091ec1ddc168c
Diffstat (limited to 'include/net/sock.h')
| -rw-r--r-- | include/net/sock.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index f5bc965dced4..e6c3505c7f02 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1208,11 +1208,13 @@ static inline void memcg_memory_allocated_add(struct cg_proto *prot, unsigned long amt, int *parent_status) { - page_counter_charge(&prot->memory_allocated, amt); + struct page_counter *counter; + + if (page_counter_try_charge(&prot->memory_allocated, amt, &counter)) + return; - if (page_counter_read(&prot->memory_allocated) > - prot->memory_allocated.limit) - *parent_status = OVER_LIMIT; + page_counter_charge(&prot->memory_allocated, amt); + *parent_status = OVER_LIMIT; } static inline void memcg_memory_allocated_sub(struct cg_proto *prot, @@ -1655,7 +1657,13 @@ static inline void sock_put(struct sock *sk) */ void sock_gen_put(struct sock *sk); -int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested); +int __sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested, + unsigned int trim_cap); +static inline int sk_receive_skb(struct sock *sk, struct sk_buff *skb, + const int nested) +{ + return __sk_receive_skb(sk, skb, nested, 1); +} static inline void sk_tx_queue_set(struct sock *sk, int tx_queue) { |
