blob: 75aa3b45d6eca2176d0225a76e360cb96d8b4d3d [file] [log] [blame]
From sjayaraman@suse.com Mon Dec 5 13:33:36 2011
From: Suresh Jayaraman <sjayaraman@suse.com>
Date: Fri, 02 Dec 2011 16:24:56 +0530
Subject: cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch
To: stable@kernel.org, Greg KH <gregkh@suse.de>
Cc: Pavel Shilovsky <piastryyy@gmail.com>, Steve French <smfrench@gmail.com>, linux-cifs <linux-cifs@vger.kernel.org>
Message-ID: <4ED8AE80.7030008@suse.com>
From: Suresh Jayaraman <sjayaraman@suse.com>
The stable release 2.6.32.32 added the upstream commit
12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of
the original patch seems missing from the stable backport which can be
found here:
http://permalink.gmane.org/gmane.linux.kernel.stable/5676
This hunk corresponds to the change in is_valid_oplock_break() at
fs/cifs/misc.c.
This patch backports the missing hunk and is against
linux-2.6.32.y stable kernel.
Cc: Steve French <sfrench@us.ibm.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/cifs/misc.c | 3 +++
1 file changed, 3 insertions(+)
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *bu
pCifsInode->clientCanCacheAll = false;
if (pSMB->OplockLevel == 0)
pCifsInode->clientCanCacheRead = false;
+ else if (pSMB->OplockLevel)
+ pCifsInode->clientCanCacheRead = true;
+
rc = slow_work_enqueue(&netfile->oplock_break);
if (rc) {
cERROR(1, ("failed to enqueue oplock "