diag: Close the read when buffer is already marked free

Currently there is a possibility of reading the data for
read queued by md session which is already closed and buffer
is marked free. The patch adds check for buffer busy status
and close the read thread if buffer is marked free. The patch
also modify the checks for keeping buffer busy for multi logging
mode at starting of session.

CRs-Fixed: 2203013
Change-Id: If97cf3c64fa6cbc4a496b6ca1ee4471e4e336012
Signed-off-by: Hardik Arya <harya@codeaurora.org>
5 files changed