summaryrefslogtreecommitdiff
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2012-04-04 10:52:26 -0500
committerClark Williams <williams@redhat.com>2012-04-04 10:52:26 -0500
commit2d93eaf2d4ace5853a74a4b0596f601aa62cb840 (patch)
treeb0a2e2083c1749c4e3b8ae23db7bb13a7ca9aafe /fs/cifs/dir.c
parent003133585fc61d7bd36d3a097d7fde62e64a9550 (diff)
parent23d8c3f8f494c8516c9b4c05529e118e6a485956 (diff)
Merge commit 'v3.2.14' into rt-3.2.14-rt23v3.2.14-rt23
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index bf68b4fc9512..6937e7c19ee3 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -171,7 +171,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
}
tcon = tlink_tcon(tlink);
- if (enable_oplocks)
+ if (tcon->ses->server->oplocks)
oplock = REQ_OPLOCK;
if (nd)
@@ -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 = enable_oplocks ? REQ_OPLOCK : 0;
+ __u32 oplock;
__u16 fileHandle = 0;
bool posix_open = false;
struct cifs_sb_info *cifs_sb;
@@ -518,6 +518,8 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
}
pTcon = tlink_tcon(tlink);
+ oplock = pTcon->ses->server->oplocks ? REQ_OPLOCK : 0;
+
/*
* Don't allow the separator character in a path component.
* The VFS will not allow "/", but "\" is allowed by posix.