From 646968da72ac05e3c8f3c0995814bb1d43fdaf3f Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 7 Dec 2009 10:46:15 -0500 Subject: [PATCH] cifs: allow invalidation of open files The cifs_revalidate code does not currently invalidate page data if a file is already open and it's changed on the server. Allow it to invalidate cached data of files that are open as well. Signed-off-by: Jeff Layton --- fs/cifs/inode.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index cababd8..2ed11d0 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1507,13 +1507,9 @@ int cifs_revalidate(struct dentry *direntry) if (wbrc) CIFS_I(direntry->d_inode)->write_behind_rc = wbrc; } - /* may eventually have to do this for open files too */ - if (list_empty(&(cifsInode->openFileList))) { - /* changed on server - flush read ahead pages */ - cFYI(1, ("Invalidating read ahead data on " - "closed file")); - invalidate_remote_inode(direntry->d_inode); - } + cFYI(1, ("invalidating cached data for inode 0x%p", + direntry->d_inode)); + invalidate_remote_inode(direntry->d_inode); } } /* mutex_unlock(&direntry->d_inode->i_mutex); */ -- 1.6.5.2