Remove the smb_read_error global variable and replace