OSDN Git Service

cifs: Do not modify mid entry after submitting I/O in cifs_call_async
authorLong Li <longli@microsoft.com>
Wed, 28 Jun 2017 22:55:55 +0000 (15:55 -0700)
committerSteve French <smfrench@gmail.com>
Thu, 6 Jul 2017 00:58:08 +0000 (19:58 -0500)
commit93d2cb6c82f4d50a1b35b9de379ebb1d022801ac
treeed3fd67ed88beceda359993e3bce7f1d446358f6
parent7e46f0900acdd8cc26588d8f6abdf2ed75dfbcd8
cifs: Do not modify mid entry after submitting I/O in cifs_call_async

In cifs_call_async, server may respond as soon as I/O is submitted. Because
mid entry is freed on the return path, it should not be modified after I/O
is submitted.

cifs_save_when_sent modifies the sent timestamp in mid entry, and should not
be called after I/O. Call it before I/O.

Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/transport.c