diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2018-08-10 13:21:58 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-11 12:13:49 -0700 |
commit | bdd0292f96e43de46283ea0efdef8d13b4ffe895 (patch) | |
tree | e87f71ffc50028abb3743f05e978ffc647c9e39d /usr/Kconfig | |
parent | 01e28b921b19cb99a09dda89ab0e5dc49bf4ab38 (diff) | |
download | lwn-bdd0292f96e43de46283ea0efdef8d13b4ffe895.tar.gz lwn-bdd0292f96e43de46283ea0efdef8d13b4ffe895.zip |
l2tp: simplify pppol2tp_ioctl()
* Drop test on 'sk': sock->sk cannot be NULL, or pppox_ioctl() could
not have called us.
* Drop test on 'SOCK_DEAD' state: if this flag was set, the socket
would be in the process of being released and no ioctl could be
running anymore.
* Drop test on 'PPPOX_*' state: we depend on ->sk_user_data to get
the session structure. If it is non-NULL, then the socket is
connected. Testing for PPPOX_* is redundant.
* Retrieve session using ->sk_user_data directly, instead of going
through pppol2tp_sock_to_session(). This avoids grabbing a useless
reference on the socket.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'usr/Kconfig')
0 files changed, 0 insertions, 0 deletions