diff options
Diffstat (limited to 'fs/cifs/misc.c')
| -rw-r--r-- | fs/cifs/misc.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 1394aa37f26c..3ccadc1326d6 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
| @@ -498,7 +498,6 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
| 498 | struct cifsTconInfo *tcon; | 498 | struct cifsTconInfo *tcon; |
| 499 | struct cifsInodeInfo *pCifsInode; | 499 | struct cifsInodeInfo *pCifsInode; |
| 500 | struct cifsFileInfo *netfile; | 500 | struct cifsFileInfo *netfile; |
| 501 | int rc; | ||
| 502 | 501 | ||
| 503 | cFYI(1, "Checking for oplock break or dnotify response"); | 502 | cFYI(1, "Checking for oplock break or dnotify response"); |
| 504 | if ((pSMB->hdr.Command == SMB_COM_NT_TRANSACT) && | 503 | if ((pSMB->hdr.Command == SMB_COM_NT_TRANSACT) && |
| @@ -583,13 +582,18 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
| 583 | pCifsInode->clientCanCacheAll = false; | 582 | pCifsInode->clientCanCacheAll = false; |
| 584 | if (pSMB->OplockLevel == 0) | 583 | if (pSMB->OplockLevel == 0) |
| 585 | pCifsInode->clientCanCacheRead = false; | 584 | pCifsInode->clientCanCacheRead = false; |
| 586 | rc = slow_work_enqueue(&netfile->oplock_break); | 585 | |
| 587 | if (rc) { | 586 | /* |
| 588 | cERROR(1, "failed to enqueue oplock " | 587 | * cifs_oplock_break_put() can't be called |
| 589 | "break: %d\n", rc); | 588 | * from here. Get reference after queueing |
| 590 | } else { | 589 | * succeeded. cifs_oplock_break() will |
| 591 | netfile->oplock_break_cancelled = false; | 590 | * synchronize using GlobalSMSSeslock. |
| 592 | } | 591 | */ |
| 592 | if (queue_work(system_nrt_wq, | ||
| 593 | &netfile->oplock_break)) | ||
| 594 | cifs_oplock_break_get(netfile); | ||
| 595 | netfile->oplock_break_cancelled = false; | ||
| 596 | |||
| 593 | read_unlock(&GlobalSMBSeslock); | 597 | read_unlock(&GlobalSMBSeslock); |
| 594 | read_unlock(&cifs_tcp_ses_lock); | 598 | read_unlock(&cifs_tcp_ses_lock); |
| 595 | return true; | 599 | return true; |
