mirror of
https://github.com/adulau/aha.git
synced 2024-12-31 21:26:18 +00:00
[CIFS] Fix suspend/resume problem which causes EIO on subsequent access to
the mount. Signed-off-by: Pavel Machek <pavel@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
6344a423e5
commit
0fd1ffe063
2 changed files with 13 additions and 13 deletions
|
@ -367,20 +367,20 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
|
||||||
continue;
|
continue;
|
||||||
if (bigbuf == NULL) {
|
if (bigbuf == NULL) {
|
||||||
bigbuf = cifs_buf_get();
|
bigbuf = cifs_buf_get();
|
||||||
if(bigbuf == NULL) {
|
if (!bigbuf) {
|
||||||
cERROR(1, ("No memory for large SMB response"));
|
cERROR(1, ("No memory for large SMB response"));
|
||||||
msleep(3000);
|
msleep(3000);
|
||||||
/* retry will check if exiting */
|
/* retry will check if exiting */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (isLargeBuf) {
|
} else if (isLargeBuf) {
|
||||||
/* we are reusing a dirtry large buf, clear its start */
|
/* we are reusing a dirty large buf, clear its start */
|
||||||
memset(bigbuf, 0, sizeof (struct smb_hdr));
|
memset(bigbuf, 0, sizeof (struct smb_hdr));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (smallbuf == NULL) {
|
if (smallbuf == NULL) {
|
||||||
smallbuf = cifs_small_buf_get();
|
smallbuf = cifs_small_buf_get();
|
||||||
if(smallbuf == NULL) {
|
if (!smallbuf) {
|
||||||
cERROR(1, ("No memory for SMB response"));
|
cERROR(1, ("No memory for SMB response"));
|
||||||
msleep(1000);
|
msleep(1000);
|
||||||
/* retry will check if exiting */
|
/* retry will check if exiting */
|
||||||
|
@ -423,7 +423,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
|
||||||
and so simply return error to mount */
|
and so simply return error to mount */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(length == -EINTR) {
|
if (!try_to_freeze() && (length == -EINTR)) {
|
||||||
cFYI(1,("cifsd thread killed"));
|
cFYI(1,("cifsd thread killed"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue