summaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastryyy@gmail.com>2010-11-03 10:58:57 +0300
committerSteve French <sfrench@us.ibm.com>2010-11-05 17:39:01 +0000
commitc67236281c5d749741f5414103903a7c1b9c4636 (patch)
treeddc93fd5fcf47db18ce067309475a12a32b4c00c /fs/cifs/misc.c
parentd38922949d377da7d47473c7868334408ae3b373 (diff)
downloadblackbird-op-linux-c67236281c5d749741f5414103903a7c1b9c4636.tar.gz
blackbird-op-linux-c67236281c5d749741f5414103903a7c1b9c4636.zip
cifs: make cifs_set_oplock_level() take a cifsInodeInfo pointer
All the callers already have a pointer to struct cifsInodeInfo. Use it. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index d3b9ddebc17e..43f10281bc19 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -570,7 +570,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
cFYI(1, "file id match, oplock break");
pCifsInode = CIFS_I(netfile->dentry->d_inode);
- cifs_set_oplock_level(netfile->dentry->d_inode,
+ cifs_set_oplock_level(pCifsInode,
pSMB->OplockLevel);
/*
* cifs_oplock_break_put() can't be called
@@ -722,18 +722,20 @@ cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb)
}
}
-void cifs_set_oplock_level(struct inode *inode, __u32 oplock)
+void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock)
{
- struct cifsInodeInfo *cinode = CIFS_I(inode);
+ oplock &= 0xF;
- if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
+ if (oplock == OPLOCK_EXCLUSIVE) {
cinode->clientCanCacheAll = true;
cinode->clientCanCacheRead = true;
- cFYI(1, "Exclusive Oplock granted on inode %p", inode);
- } else if ((oplock & 0xF) == OPLOCK_READ) {
+ cFYI(1, "Exclusive Oplock granted on inode %p",
+ &cinode->vfs_inode);
+ } else if (oplock == OPLOCK_READ) {
cinode->clientCanCacheAll = false;
cinode->clientCanCacheRead = true;
- cFYI(1, "Level II Oplock granted on inode %p", inode);
+ cFYI(1, "Level II Oplock granted on inode %p",
+ &cinode->vfs_inode);
} else {
cinode->clientCanCacheAll = false;
cinode->clientCanCacheRead = false;
OpenPOWER on IntegriCloud