diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index fd5eae37f2a8..99e087d3554f 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -408,21 +408,24 @@ static struct quotactl_ops cifs_quotactl_ops = { | |||
408 | static void cifs_umount_begin(struct super_block * sblock) | 408 | static void cifs_umount_begin(struct super_block * sblock) |
409 | { | 409 | { |
410 | struct cifs_sb_info *cifs_sb; | 410 | struct cifs_sb_info *cifs_sb; |
411 | struct cifsTconInfo * tcon; | ||
411 | 412 | ||
412 | cifs_sb = CIFS_SB(sb); | 413 | cifs_sb = CIFS_SB(sb); |
413 | if(cifs_sb == NULL) | 414 | if(cifs_sb == NULL) |
414 | return -EIO; | 415 | return; |
415 | if(cifs_sb->tcon == NULL) | 416 | |
416 | return -EIO; | 417 | tcon = cifs_sb->tcon; |
418 | if(tcon == NULL) | ||
419 | return; | ||
417 | down(&tcon->tconSem); | 420 | down(&tcon->tconSem); |
418 | if (atomic_read(&tcon->useCount) == 1) | 421 | if (atomic_read(&tcon->useCount) == 1) |
419 | tcon->tidStatus = CifsExiting; | 422 | tcon->tidStatus = CifsExiting; |
420 | up(&tcon->tconSem); | 423 | up(&tcon->tconSem); |
421 | 424 | ||
422 | if((cifs->sb->tcon->ses) && (cifs_sb->tcon->ses->server)) | 425 | if(tcon->ses && tcon->ses->server) |
423 | { | 426 | { |
424 | cERROR(1,("wake up tasks now - umount begin not complete")); | 427 | cERROR(1,("wake up tasks now - umount begin not complete")); |
425 | wake_up_all(&server->request_q); | 428 | wake_up_all(&tcon->ses->server->request_q); |
426 | } | 429 | } |
427 | /* BB FIXME - finish add checks for tidStatus BB */ | 430 | /* BB FIXME - finish add checks for tidStatus BB */ |
428 | 431 | ||