Skip to content

Commit fe0fde0

Browse files
namjaejeonsmfrench
authored andcommitted
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]>
1 parent f2906aa commit fe0fde0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ksmbd/transport_tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int ksmbd_kthread_fn(void *p)
230230
break;
231231
}
232232
ret = kernel_accept(iface->ksmbd_socket, &client_sk,
233-
O_NONBLOCK);
233+
SOCK_NONBLOCK);
234234
mutex_unlock(&iface->sock_release_lock);
235235
if (ret) {
236236
if (ret == -EAGAIN)

0 commit comments

Comments
 (0)