Thread (1 message) 1 message, 1 author, 2012-02-03

Re: [PATCH] cifs: request oplock when doing open on lookup

From: Pavel Shilovsky <hidden>
Date: 2012-02-03 12:25:15

2012/2/3 Jeff Layton [off-list ref]:
quoted hunk
Currently, it's always set to 0 (no oplock requested).

Cc: <redacted>
Signed-off-by: Jeff Layton <redacted>
---
 fs/cifs/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index df8fecb..63a196b 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -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;
--
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Looks right.

Reviewed-by: Pavel Shilovsky <redacted>

-- 
Best regards,
Pavel Shilovsky.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help