Jan-Marek Glogowski <glogow@xxxxxxxxxx> writes: > which is the place of the WARN call in my code. Since I also had a patch > for a newer kernel (Ubuntu 16.04 HWE for 14.04 AKA Linux 4.4), the > offsets are wrong in the attached patch. > > I just re-checked my code. I didn't test the non-WARN variant and > assumed the code simply got inlined, so the function name is wrong. I've just realized WARN() itself dumps the stacktrace and that your first email said "expected" (not "unexpected")... *sigh* I was tired that day. The reconnect logic is a bit convulted but patching where you did seems correct. Calling smb2_reconnect with the Tree Connect command will reset the Tid. Calling it with any command other command will end up calling smb2_reconnect again with the Tree Connect. smb2_reconnect(cmd, ...) if (cmd == SMB2_TREE_CONNECT) TID = 0, return else SMB2_tcon() small_smb2_init(SMB2_TREE_CONNECT, ...) smb2_reconnect(SMB2_TREE_CONNECT, ...) I think its clearer and more explicit if we reset the Tid everytime we send a Tree Con request. So in SMB2_tcon(), before the SendReceive2(). -- Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html