diff options
author | Steve French <sfrench@us.ibm.com> | 2007-10-18 17:45:27 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-10-18 17:45:27 -0400 |
commit | a761ac579b89bc1f00212a42401398108deba65c (patch) | |
tree | 5345eaf8fa239af7f8f28989bea7942b0ab8ea13 /fs/cifs/transport.c | |
parent | abb63d6c3d3d0e4d93b63589135962091154be9b (diff) |
[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>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 6684926bf3d2..7ed32b3cb781 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -418,7 +418,7 @@ static int wait_for_response(struct cifsSesInfo *ses, | |||
418 | int | 418 | int |
419 | SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | 419 | SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, |
420 | struct kvec *iov, int n_vec, int *pRespBufType /* ret */, | 420 | struct kvec *iov, int n_vec, int *pRespBufType /* ret */, |
421 | const int long_op) | 421 | const int long_op, const int logError) |
422 | { | 422 | { |
423 | int rc = 0; | 423 | int rc = 0; |
424 | unsigned int receive_len; | 424 | unsigned int receive_len; |
@@ -464,7 +464,6 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
464 | wake_up(&ses->server->request_q); | 464 | wake_up(&ses->server->request_q); |
465 | return rc; | 465 | return rc; |
466 | } | 466 | } |
467 | |||
468 | rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number); | 467 | rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number); |
469 | 468 | ||
470 | midQ->midState = MID_REQUEST_SUBMITTED; | 469 | midQ->midState = MID_REQUEST_SUBMITTED; |
@@ -567,8 +566,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
567 | } | 566 | } |
568 | 567 | ||
569 | /* BB special case reconnect tid and uid here? */ | 568 | /* BB special case reconnect tid and uid here? */ |
570 | /* BB special case Errbadpassword and pwdexpired here */ | 569 | rc = map_smb_to_linux_error(midQ->resp_buf, logError); |
571 | rc = map_smb_to_linux_error(midQ->resp_buf); | ||
572 | 570 | ||
573 | /* convert ByteCount if necessary */ | 571 | /* convert ByteCount if necessary */ |
574 | if (receive_len >= sizeof(struct smb_hdr) - 4 | 572 | if (receive_len >= sizeof(struct smb_hdr) - 4 |
@@ -747,7 +745,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
747 | *pbytes_returned = out_buf->smb_buf_length; | 745 | *pbytes_returned = out_buf->smb_buf_length; |
748 | 746 | ||
749 | /* BB special case reconnect tid and uid here? */ | 747 | /* BB special case reconnect tid and uid here? */ |
750 | rc = map_smb_to_linux_error(out_buf); | 748 | rc = map_smb_to_linux_error(out_buf, 0 /* no log */ ); |
751 | 749 | ||
752 | /* convert ByteCount if necessary */ | 750 | /* convert ByteCount if necessary */ |
753 | if (receive_len >= sizeof(struct smb_hdr) - 4 | 751 | if (receive_len >= sizeof(struct smb_hdr) - 4 |
@@ -990,7 +988,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
990 | *pbytes_returned = out_buf->smb_buf_length; | 988 | *pbytes_returned = out_buf->smb_buf_length; |
991 | 989 | ||
992 | /* BB special case reconnect tid and uid here? */ | 990 | /* BB special case reconnect tid and uid here? */ |
993 | rc = map_smb_to_linux_error(out_buf); | 991 | rc = map_smb_to_linux_error(out_buf, 0 /* no log */ ); |
994 | 992 | ||
995 | /* convert ByteCount if necessary */ | 993 | /* convert ByteCount if necessary */ |
996 | if (receive_len >= sizeof(struct smb_hdr) - 4 | 994 | if (receive_len >= sizeof(struct smb_hdr) - 4 |