diff options
author | Pavel Shilovsky <piastryyy@gmail.com> | 2010-11-03 03:58:57 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-11-05 13:39:01 -0400 |
commit | c67236281c5d749741f5414103903a7c1b9c4636 (patch) | |
tree | ddc93fd5fcf47db18ce067309475a12a32b4c00c /fs/cifs/misc.c | |
parent | d38922949d377da7d47473c7868334408ae3b373 (diff) |
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.c | 16 |
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) | |||
570 | cFYI(1, "file id match, oplock break"); | 570 | cFYI(1, "file id match, oplock break"); |
571 | pCifsInode = CIFS_I(netfile->dentry->d_inode); | 571 | pCifsInode = CIFS_I(netfile->dentry->d_inode); |
572 | 572 | ||
573 | cifs_set_oplock_level(netfile->dentry->d_inode, | 573 | cifs_set_oplock_level(pCifsInode, |
574 | pSMB->OplockLevel); | 574 | pSMB->OplockLevel); |
575 | /* | 575 | /* |
576 | * cifs_oplock_break_put() can't be called | 576 | * cifs_oplock_break_put() can't be called |
@@ -722,18 +722,20 @@ cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) | |||
722 | } | 722 | } |
723 | } | 723 | } |
724 | 724 | ||
725 | void cifs_set_oplock_level(struct inode *inode, __u32 oplock) | 725 | void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock) |
726 | { | 726 | { |
727 | struct cifsInodeInfo *cinode = CIFS_I(inode); | 727 | oplock &= 0xF; |
728 | 728 | ||
729 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { | 729 | if (oplock == OPLOCK_EXCLUSIVE) { |
730 | cinode->clientCanCacheAll = true; | 730 | cinode->clientCanCacheAll = true; |
731 | cinode->clientCanCacheRead = true; | 731 | cinode->clientCanCacheRead = true; |
732 | cFYI(1, "Exclusive Oplock granted on inode %p", inode); | 732 | cFYI(1, "Exclusive Oplock granted on inode %p", |
733 | } else if ((oplock & 0xF) == OPLOCK_READ) { | 733 | &cinode->vfs_inode); |
734 | } else if (oplock == OPLOCK_READ) { | ||
734 | cinode->clientCanCacheAll = false; | 735 | cinode->clientCanCacheAll = false; |
735 | cinode->clientCanCacheRead = true; | 736 | cinode->clientCanCacheRead = true; |
736 | cFYI(1, "Level II Oplock granted on inode %p", inode); | 737 | cFYI(1, "Level II Oplock granted on inode %p", |
738 | &cinode->vfs_inode); | ||
737 | } else { | 739 | } else { |
738 | cinode->clientCanCacheAll = false; | 740 | cinode->clientCanCacheAll = false; |
739 | cinode->clientCanCacheRead = false; | 741 | cinode->clientCanCacheRead = false; |