cifs: fix broken oplock handling
authorSuresh Jayaraman <sjayaraman@suse.de>
Fri, 17 Sep 2010 13:26:39 +0000 (18:56 +0530)
committerSteve French <sfrench@us.ibm.com>
Wed, 29 Sep 2010 19:04:28 +0000 (19:04 +0000)
commitaa91c7e4ab9b0842b7d7a7cbf8cca18b20df89b5
tree94827b3006d85b8accf179ea3da30e1569983e68
parenta347ecb209b58a1b37f20d8299ab552f7d3ee8c3
cifs: fix broken oplock handling

cifs_new_fileinfo() does not use the 'oplock' value from the callers. Instead,
it sets it to REQ_OPLOCK which seems wrong. We should be using the oplock value
obtained from the Server to set the inode's clientCanCacheAll or
clientCanCacheRead flags. Fix this by passing oplock from the callers to
cifs_new_fileinfo().

This change dates back to commit a6ce4932 (2.6.30-rc3). So, all the affected
versions will need this fix. Please Cc stable once reviewed and accepted.

Cc: Stable <stable@kernel.org>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsproto.h
fs/cifs/dir.c
fs/cifs/file.c