diff options
-rw-r--r-- | fs/cifs/cifsfs.c | 19 | ||||
-rw-r--r-- | fs/cifs/transport.c | 3 |
2 files changed, 20 insertions, 2 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index e3177a031edc..fd5eae37f2a8 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -407,9 +407,24 @@ static struct quotactl_ops cifs_quotactl_ops = { | |||
407 | 407 | ||
408 | static void cifs_umount_begin(struct super_block * sblock) | 408 | static void cifs_umount_begin(struct super_block * sblock) |
409 | { | 409 | { |
410 | cERROR(1,("kill all tasks now - umount begin not implemented yet")); | 410 | struct cifs_sb_info *cifs_sb; |
411 | 411 | ||
412 | /* BB FIXME - finish BB */ | 412 | cifs_sb = CIFS_SB(sb); |
413 | if(cifs_sb == NULL) | ||
414 | return -EIO; | ||
415 | if(cifs_sb->tcon == NULL) | ||
416 | return -EIO; | ||
417 | down(&tcon->tconSem); | ||
418 | if (atomic_read(&tcon->useCount) == 1) | ||
419 | tcon->tidStatus = CifsExiting; | ||
420 | up(&tcon->tconSem); | ||
421 | |||
422 | if((cifs->sb->tcon->ses) && (cifs_sb->tcon->ses->server)) | ||
423 | { | ||
424 | cERROR(1,("wake up tasks now - umount begin not complete")); | ||
425 | wake_up_all(&server->request_q); | ||
426 | } | ||
427 | /* BB FIXME - finish add checks for tidStatus BB */ | ||
413 | 428 | ||
414 | return; | 429 | return; |
415 | } | 430 | } |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index d9b11690746d..d8865fbd876a 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -169,6 +169,8 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer, | |||
169 | } | 169 | } |
170 | if (rc < 0) | 170 | if (rc < 0) |
171 | break; | 171 | break; |
172 | else | ||
173 | i = 0; /* reset i after each successful send */ | ||
172 | iov.iov_base += rc; | 174 | iov.iov_base += rc; |
173 | iov.iov_len -= rc; | 175 | iov.iov_len -= rc; |
174 | len -= rc; | 176 | len -= rc; |
@@ -263,6 +265,7 @@ smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec, | |||
263 | } | 265 | } |
264 | } | 266 | } |
265 | } | 267 | } |
268 | i = 0; /* in case we get ENOSPC on the next send */ | ||
266 | } | 269 | } |
267 | 270 | ||
268 | if (rc < 0) { | 271 | if (rc < 0) { |