cifs: fix broken oplock handling
commit28feaa47bc4f21545dce9834d9c8f90481647c1a
authorSuresh Jayaraman <sjayaraman@suse.de>
Fri, 17 Sep 2010 13:26:39 +0000 (17 18:56 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Nov 2010 18:59:45 +0000 (22 10:59 -0800)
tree3713d80dd7b073f0a09618017be2fafb4fd6a27a
parent52c974f34e857dc648f013cc24f6ad4febc26040
cifs: fix broken oplock handling

commit aa91c7e4ab9b0842b7d7a7cbf8cca18b20df89b5 upstream.

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.

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/cifsproto.h
fs/cifs/dir.c
fs/cifs/file.c