Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269946
b: refs/heads/master
c: e750473
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Oct 13, 2011
1 parent a072968 commit e7859e1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba749e6d5227de22e442c6088cc7dc1f0c5c68bf
refs/heads/master: e75047344ea415760b2508a6fa29c0288c7b6b68
6 changes: 3 additions & 3 deletions trunk/fs/cifs/cifs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ static const struct file_operations cifsFYI_proc_fops = {

static int cifs_oplock_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "%d\n", oplockEnabled);
seq_printf(m, "%d\n", enable_oplocks);
return 0;
}

Expand All @@ -530,9 +530,9 @@ static ssize_t cifs_oplock_proc_write(struct file *file,
if (rc)
return rc;
if (c == '0' || c == 'n' || c == 'N')
oplockEnabled = 0;
enable_oplocks = false;
else if (c == '1' || c == 'y' || c == 'Y')
oplockEnabled = 1;
enable_oplocks = true;

return count;
}
Expand Down
6 changes: 5 additions & 1 deletion trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
int cifsFYI = 0;
int cifsERROR = 1;
int traceSMB = 0;
unsigned int oplockEnabled = 1;
bool enable_oplocks = true;
unsigned int linuxExtEnabled = 1;
unsigned int lookupCacheEnabled = 1;
unsigned int multiuser_mount = 0;
Expand Down Expand Up @@ -82,6 +82,10 @@ module_param(echo_retries, ushort, 0644);
MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and "
"reconnecting server. Default: 5. 0 means "
"never reconnect.");
module_param(enable_oplocks, bool, 0644);
MODULE_PARM_DESC(enable_oplocks, "Enable or disable oplocks (bool). Default:"
"y/Y/1");

extern mempool_t *cifs_sm_req_poolp;
extern mempool_t *cifs_req_poolp;
extern mempool_t *cifs_mid_poolp;
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,8 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions
to be established on existing mount if we
have the uid/password or Kerberos credential
or equivalent for current user */
GLOBAL_EXTERN unsigned int oplockEnabled;
/* enable or disable oplocks */
GLOBAL_EXTERN bool enable_oplocks;
GLOBAL_EXTERN unsigned int lookupCacheEnabled;
GLOBAL_EXTERN unsigned int global_secflags; /* if on, session setup sent
with more secure ntlmssp2 challenge/resp */
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
}
tcon = tlink_tcon(tlink);

if (oplockEnabled)
if (enable_oplocks)
oplock = REQ_OPLOCK;

if (nd)
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ int cifs_open(struct inode *inode, struct file *file)
cFYI(1, "inode = 0x%p file flags are 0x%x for %s",
inode, file->f_flags, full_path);

if (oplockEnabled)
if (enable_oplocks)
oplock = REQ_OPLOCK;
else
oplock = 0;
Expand Down Expand Up @@ -495,7 +495,7 @@ static int cifs_reopen_file(struct cifsFileInfo *pCifsFile, bool can_flush)
cFYI(1, "inode = 0x%p file flags 0x%x for %s",
inode, pCifsFile->f_flags, full_path);

if (oplockEnabled)
if (enable_oplocks)
oplock = REQ_OPLOCK;
else
oplock = 0;
Expand Down

0 comments on commit e7859e1

Please sign in to comment.