diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-01-18 16:52:20 -0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-01-18 16:52:20 -0800 |
commit | bd86d2ea369be2e768b58cba590e70b8bdc6f86a (patch) | |
tree | 4cd68e21041237c0a4d7e0299f9bb3eeb1ac1e2c /fs/ksmbd/transport_tcp.c | |
parent | 19fa92fb72f8bc542f1673862058f3b078114004 (diff) | |
parent | 5dc4c995db9eb45f6373a956eb1f69460e69e6d4 (diff) | |
download | linux-rpi-bd86d2ea369be2e768b58cba590e70b8bdc6f86a.tar.gz linux-rpi-bd86d2ea369be2e768b58cba590e70b8bdc6f86a.tar.bz2 linux-rpi-bd86d2ea369be2e768b58cba590e70b8bdc6f86a.zip |
Sync with v6.2-rc4
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'fs/ksmbd/transport_tcp.c')
-rw-r--r-- | fs/ksmbd/transport_tcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ksmbd/transport_tcp.c b/fs/ksmbd/transport_tcp.c index 63d55f543bd2..4c6bd0b69979 100644 --- a/fs/ksmbd/transport_tcp.c +++ b/fs/ksmbd/transport_tcp.c @@ -295,6 +295,7 @@ static int ksmbd_tcp_readv(struct tcp_transport *t, struct kvec *iov_orig, struct msghdr ksmbd_msg; struct kvec *iov; struct ksmbd_conn *conn = KSMBD_TRANS(t)->conn; + int max_retry = 2; iov = get_conn_iovec(t, nr_segs); if (!iov) @@ -321,9 +322,11 @@ static int ksmbd_tcp_readv(struct tcp_transport *t, struct kvec *iov_orig, } else if (conn->status == KSMBD_SESS_NEED_RECONNECT) { total_read = -EAGAIN; break; - } else if (length == -ERESTARTSYS || length == -EAGAIN) { + } else if ((length == -ERESTARTSYS || length == -EAGAIN) && + max_retry) { usleep_range(1000, 2000); length = 0; + max_retry--; continue; } else if (length <= 0) { total_read = -EAGAIN; |