@@ -211,8 +211,14 @@ client_can_cache:
pCifsInode->clientCanCacheAll = true;
pCifsInode->clientCanCacheRead = true;
cFYI(1, "Exclusive Oplock granted on inode %p", inode);
- } else if ((oplock & 0xF) == OPLOCK_READ)
+ } else if ((oplock & 0xF) == OPLOCK_READ) {
+ pCifsInode->clientCanCacheAll = false;
pCifsInode->clientCanCacheRead = true;
+ cFYI(1, "Level II Oplock franted on inode %p", inode);
+ } else {
+ pCifsInode->clientCanCacheAll = false;
+ pCifsInode->clientCanCacheRead = false;
+ }
return rc;
}
@@ -633,6 +639,7 @@ int cifs_close(struct inode *inode, struct file *file)
on this inode, much less write behind and read ahead */
CIFS_I(inode)->clientCanCacheRead = false;
CIFS_I(inode)->clientCanCacheAll = false;
+ invalidate_remote_inode(inode);
}
read_unlock(&GlobalSMBSeslock);
if ((rc == 0) && CIFS_I(inode)->write_behind_rc)