cifs: fix oplock request handling in posix codepath
authorJeff Layton <jlayton@redhat.com>
Sat, 12 Sep 2009 15:54:28 +0000 (11:54 -0400)
committerSteve French <sfrench@us.ibm.com>
Tue, 15 Sep 2009 19:45:03 +0000 (19:45 +0000)
commit590a3fe0e18473a55b0ff48548ba87a2010d7730
tree0e5fdfa70ee40a10a5b0df3b85cef3baa0d1b2c6
parent20d1752f3d6bd32beb90949559e0d14a0b234445
cifs: fix oplock request handling in posix codepath

cifs_posix_open takes a "poplock" argument that's intended to be used in
the actual posix open call to set the "Flags" field. It ignores this
value however and declares an "oplock" parameter on the stack that it
passes uninitialized to the CIFSPOSIXOpen function. Not only does this
mean that the oplock request flags are bogus, but the result that's
expected to be in that variable is unchanged.

Fix this, and also clean up the type of the oplock parameter used. Since
it's expected to be __u32, we should use that everywhere and not
implicitly cast it from a signed type.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsproto.h
fs/cifs/dir.c
fs/cifs/file.c