diff options
author | Long Li <longli@microsoft.com> | 2019-04-05 21:36:33 +0000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-05-07 23:24:54 -0500 |
commit | 62fdf6707ebd46ae97e3cb7a7d246b05c3c619f1 (patch) | |
tree | af5edae9fc283c41686cb2746de56a77f8b96575 /fs/cifs/smbdirect.c | |
parent | 98e0d40888458e6abf60227ac85c675ed07cffc2 (diff) | |
download | linux-62fdf6707ebd46ae97e3cb7a7d246b05c3c619f1.tar.bz2 |
cifs: smbd: Indicate to retry on transport sending failure
Failure to send a packet doesn't mean it's a permanent failure, it can't be
returned to user process. This I/O should be retried or failed based on
server packet response and transport health. This logic is handled by the
upper layer.
Give this decision to upper layer.
Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smbdirect.c')
-rw-r--r-- | fs/cifs/smbdirect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index df95c7568445..05b05e78f31b 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -853,7 +853,7 @@ static int smbd_create_header(struct smbd_connection *info, if (info->transport_status != SMBD_CONNECTED) { log_outgoing(ERR, "disconnected not sending\n"); - return -ENOENT; + return -EAGAIN; } atomic_dec(&info->send_credits); @@ -979,6 +979,7 @@ static int smbd_post_send(struct smbd_connection *info, wake_up(&info->wait_send_pending); } smbd_disconnect_rdma_connection(info); + rc = -EAGAIN; } else /* Reset timer for idle connection after packet is sent */ mod_delayed_work(info->workqueue, &info->idle_timer_work, @@ -2085,7 +2086,7 @@ int smbd_send(struct TCP_Server_Info *server, struct smb_rqst *rqst) int rc; if (info->transport_status != SMBD_CONNECTED) { - rc = -ENODEV; + rc = -EAGAIN; goto done; } |