Skip to content

Commit 7d729df

Browse files
metze-sambasmfrench
authored andcommitted
smb: server: let smb_direct_disconnect_rdma_connection() disable all work but disconnect_work
There's no point run these if we already know the connection is broken. Acked-by: Namjae Jeon <linkinjeon@kernel.org> Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 3d71e7c commit 7d729df

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

fs/smb/server/transport_rdma.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,15 @@ static void smb_direct_disconnect_rdma_work(struct work_struct *work)
262262
static void
263263
smb_direct_disconnect_rdma_connection(struct smbdirect_socket *sc)
264264
{
265+
/*
266+
* make sure other work (than disconnect_work) is
267+
* not queued again but here we don't block and avoid
268+
* disable[_delayed]_work_sync()
269+
*/
270+
disable_work(&sc->recv_io.posted.refill_work);
271+
disable_work(&sc->idle.immediate_work);
272+
disable_delayed_work(&sc->idle.timer_work);
273+
265274
if (sc->first_error == 0)
266275
sc->first_error = -ECONNABORTED;
267276

0 commit comments

Comments
 (0)