[CIFS] log better errors on failed mounts
Also returns more accurate errors to mount for the cases of
account expired and password expired
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 6684926..7ed32b3 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -418,7 +418,7 @@
int
SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
struct kvec *iov, int n_vec, int *pRespBufType /* ret */,
- const int long_op)
+ const int long_op, const int logError)
{
int rc = 0;
unsigned int receive_len;
@@ -464,7 +464,6 @@
wake_up(&ses->server->request_q);
return rc;
}
-
rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number);
midQ->midState = MID_REQUEST_SUBMITTED;
@@ -567,8 +566,7 @@
}
/* BB special case reconnect tid and uid here? */
- /* BB special case Errbadpassword and pwdexpired here */
- rc = map_smb_to_linux_error(midQ->resp_buf);
+ rc = map_smb_to_linux_error(midQ->resp_buf, logError);
/* convert ByteCount if necessary */
if (receive_len >= sizeof(struct smb_hdr) - 4
@@ -747,7 +745,7 @@
*pbytes_returned = out_buf->smb_buf_length;
/* BB special case reconnect tid and uid here? */
- rc = map_smb_to_linux_error(out_buf);
+ rc = map_smb_to_linux_error(out_buf, 0 /* no log */ );
/* convert ByteCount if necessary */
if (receive_len >= sizeof(struct smb_hdr) - 4
@@ -990,7 +988,7 @@
*pbytes_returned = out_buf->smb_buf_length;
/* BB special case reconnect tid and uid here? */
- rc = map_smb_to_linux_error(out_buf);
+ rc = map_smb_to_linux_error(out_buf, 0 /* no log */ );
/* convert ByteCount if necessary */
if (receive_len >= sizeof(struct smb_hdr) - 4