diff options
author | Pavel Shilovsky <piastryyy@gmail.com> | 2011-01-17 18:15:44 +0100 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-01-19 18:52:29 +0100 |
commit | 12fed00de963433128b5366a21a55808fab2f756 (patch) | |
tree | 2898690f5853027b70eda1bd7f3aeb78fe9af74d /fs/cifs/misc.c | |
parent | Linux 2.6.38-rc1 (diff) | |
download | linux-12fed00de963433128b5366a21a55808fab2f756.tar.xz linux-12fed00de963433128b5366a21a55808fab2f756.zip |
CIFS: Fix oplock break handling (try #2)
When we get oplock break notification we should set the appropriate
value of OplockLevel field in oplock break acknowledge according to
the oplock level held by the client in this time. As we only can have
level II oplock or no oplock in the case of oplock break, we should be
aware only about clientCanCacheRead field in cifsInodeInfo structure.
Also fix bug connected with wrong interpretation of OplockLevel field
during oplock break notification processing.
Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 43f10281bc19..09bfcf08a90f 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -571,7 +571,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) pCifsInode = CIFS_I(netfile->dentry->d_inode); cifs_set_oplock_level(pCifsInode, - pSMB->OplockLevel); + pSMB->OplockLevel ? OPLOCK_READ : 0); /* * cifs_oplock_break_put() can't be called * from here. Get reference after queueing |