ksmbd: use SOCK_NONBLOCK type for kernel_accept()
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 2 Jun 2022 01:07:38 +0000 (10:07 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:32 +0000 (21:24 +0200)
commit4e69750549b8cf567e29d2b18979218975469265
tree7430d4a6e3d054e2ff96b6b8e394116fa092ff76
parentd300ced1288937d727cad69b3374f489f3e24795
ksmbd: use SOCK_NONBLOCK type for kernel_accept()

[ Upstream commit fe0fde09e1cb83effcf8fafa372533f438d93a1a ]

I found that normally it is O_NONBLOCK but there are different value
for some arch.

/include/linux/net.h:
#ifndef SOCK_NONBLOCK
#define SOCK_NONBLOCK   O_NONBLOCK
#endif

/arch/alpha/include/asm/socket.h:
#define SOCK_NONBLOCK   0x40000000

Use SOCK_NONBLOCK instead of O_NONBLOCK for kernel_accept().

Suggested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Namjae Jeon <linkinjeon@kerne.org>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ksmbd/transport_tcp.c