Commit 85964d7d authored by Steve French's avatar Steve French Committed by Steve French

invalidate cached pages when last local instance closed so we do

not use stale data while someone may be modifying the file on the
server.
parent 847c71fb
Version 0.99 Version 0.99
------------ ------------
Invalidate local inode cached pages on oplock break so client does not Invalidate local inode cached pages on oplock break and when last file
continue using data modified in server copy of file. Do not reconnect instance is closed so that the client does not continue using stale local
copy rather than later modified server copy of file. Do not reconnect
when server drops the tcp session prematurely before negotiate when server drops the tcp session prematurely before negotiate
protocol response. protocol response. Fix oops in roepen_file when dentry freed.
Version 0.98 Version 0.98
------------ ------------
......
...@@ -283,10 +283,10 @@ static int cifs_reopen_file(struct inode *inode, struct file *file) ...@@ -283,10 +283,10 @@ static int cifs_reopen_file(struct inode *inode, struct file *file)
pCifsInode = CIFS_I(inode); pCifsInode = CIFS_I(inode);
if(pCifsInode) { if(pCifsInode) {
if (pTcon->ses->capabilities & CAP_UNIX) if (pTcon->ses->capabilities & CAP_UNIX)
rc = cifs_get_inode_info_unix(inode, rc = cifs_get_inode_info_unix(&inode,
full_path, inode->i_sb); full_path, inode->i_sb);
else else
rc = cifs_get_inode_info(inode, rc = cifs_get_inode_info(&inode,
full_path, buf, inode->i_sb); full_path, buf, inode->i_sb);
if(oplock == OPLOCK_EXCLUSIVE) { if(oplock == OPLOCK_EXCLUSIVE) {
...@@ -353,6 +353,7 @@ cifs_close(struct inode *inode, struct file *file) ...@@ -353,6 +353,7 @@ cifs_close(struct inode *inode, struct file *file)
info on this inode, much less write behind and read ahead */ info on this inode, much less write behind and read ahead */
CIFS_I(inode)->clientCanCacheRead = FALSE; CIFS_I(inode)->clientCanCacheRead = FALSE;
CIFS_I(inode)->clientCanCacheAll = FALSE; CIFS_I(inode)->clientCanCacheAll = FALSE;
invalidate_remote_inode(inode);
} }
if((rc ==0) && CIFS_I(inode)->write_behind_rc) if((rc ==0) && CIFS_I(inode)->write_behind_rc)
rc = CIFS_I(inode)->write_behind_rc; rc = CIFS_I(inode)->write_behind_rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment