]> git.baikalelectronics.ru Git - kernel.git/commit
sock: dedup sock_def_write_space wmem_alloc checks
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 28 Apr 2022 10:58:17 +0000 (11:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 May 2022 11:19:01 +0000 (12:19 +0100)
commit3f249d64290abb1e7450d0c0c47a9c374b0f2762
treeb52d5c6ed00ce1113620a4b9c13fed2cc3151be1
parent83261afbeb4e9879c8eafb954cfe18d349afc18c
sock: dedup sock_def_write_space wmem_alloc checks

Except for minor rounding differences the first ->sk_wmem_alloc test in
sock_def_write_space() is a hand coded version of sock_writeable().
Replace it with the helper, and also kill the following if duplicating
the check.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c