Skip to contentSkip to conversation

cifs: request oplock when doing open on lookup

PATCH In review Jeff Layton 2 participants 2 messages Feb 3, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: request oplock when doing open on lookup

Currently, it's always set to 0 (no oplock requested).

---
 fs/cifs/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/cifs/dir.c +1 -1
index df8fecb..63a196b 100644
@@ -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;
Signature · 1 line
1.7.7.6

A message that is not in the archive (sent off-list or not yet received): 1328271252-19146-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

Reviewed-by
#2 lore raw

2012/2/3 Jeff Layton <[email protected]>:

Quoted 24 lines

Currently, it's always set to 0 (no oplock requested).

---
 fs/cifs/dir.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
fs/cifs/dir.c +0 -0
index df8fecb..63a196b 100644
@@ -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

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

Looks right.

Signature · 2 lines
Best regards,
Pavel Shilovsky.