CIFS: Fix oplock break handling (try #2)
commit76d102e4c2e0509c58dfe51322e825604afdb0d0
authorPavel Shilovsky <piastryyy@gmail.com>
Mon, 17 Jan 2011 17:15:44 +0000 (17 20:15 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:45:28 +0000 (21 12:45 -0700)
treee784d499e09addd81c2d82c4e2130ae6954215ad
parent6b85e439753bfb9e1665a9697df51600cb864c38
CIFS: Fix oplock break handling (try #2)

commit 12fed00de963433128b5366a21a55808fab2f756 upstream.

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>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/file.c