]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
cifs: request oplock when doing open on lookup
authorJeff Layton <jlayton@redhat.com>
Tue, 7 Feb 2012 11:30:52 +0000 (06:30 -0500)
committerSteve French <smfrench@gmail.com>
Wed, 8 Feb 2012 04:25:29 +0000 (22:25 -0600)
Currently, it's always set to 0 (no oplock requested).

Cc: <stable@vger.kernel.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/dir.c

index df8fecb5b993316dfb5787098a3470eba8e3446c..63a196b97d5094a02e0f68b4fe5084051e7ad33a 100644 (file)
@@ -492,7 +492,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
 {
        int xid;
        int rc = 0; /* to get around spurious gcc warning, set to zero here */
-       __u32 oplock = 0;
+       __u32 oplock = enable_oplocks ? REQ_OPLOCK : 0;
        __u16 fileHandle = 0;
        bool posix_open = false;
        struct cifs_sb_info *cifs_sb;