aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamjae Jeon <[email protected]>2022-06-02 10:07:38 +0900
committerSteve French <[email protected]>2022-06-11 11:18:26 -0500
commitfe0fde09e1cb83effcf8fafa372533f438d93a1a (patch)
treec7cba279afe6740bbddef5b5a360534e1a573981
parentf2906aa863381afb0015a9eb7fefad885d4e5a56 (diff)
ksmbd: use SOCK_NONBLOCK type for kernel_accept()
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 <[email protected]> Signed-off-by: Namjae Jeon <[email protected]> Reviewed-by: Hyunchul Lee <[email protected]> Signed-off-by: Steve French <[email protected]>
-rw-r--r--fs/ksmbd/transport_tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ksmbd/transport_tcp.c b/fs/ksmbd/transport_tcp.c
index 8fef9de787d3..143bba4e4db8 100644
--- a/fs/ksmbd/transport_tcp.c
+++ b/fs/ksmbd/transport_tcp.c
@@ -230,7 +230,7 @@ static int ksmbd_kthread_fn(void *p)
break;
}
ret = kernel_accept(iface->ksmbd_socket, &client_sk,
- O_NONBLOCK);
+ SOCK_NONBLOCK);
mutex_unlock(&iface->sock_release_lock);
if (ret) {
if (ret == -EAGAIN)