aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-11-28 11:16:13 -0500
committerSteve French <sfrench@us.ibm.com>2005-11-28 11:16:13 -0500
commit3abb92722ab1784b419dadb5444daf8ea9636905 (patch)
tree10e8eac9df4380542fb8416137dffe3b8c08ad54 /fs/cifs/inode.c
parent458af5439fe7ae7d95ca14106844e61f0795166c (diff)
[CIFS] When file is deleted locally but later recreated on the server
fix cifs negative dentries so they are freed faster (not requiring umount or readdir e.g.) so the client recognizes the new file on the server more quickly. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 05b525812adb..d34325c887c4 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1039,14 +1039,20 @@ int cifs_revalidate(struct dentry *direntry)
1039 filemap_fdatawrite(direntry->d_inode->i_mapping); 1039 filemap_fdatawrite(direntry->d_inode->i_mapping);
1040 } 1040 }
1041 if (invalidate_inode) { 1041 if (invalidate_inode) {
1042 if (direntry->d_inode->i_mapping) 1042 /* shrink_dcache not necessary now that cifs dentry ops
1043 filemap_fdatawait(direntry->d_inode->i_mapping); 1043 are exported for negative dentries */
1044 /* may eventually have to do this for open files too */ 1044/* if(S_ISDIR(direntry->d_inode->i_mode))
1045 if (list_empty(&(cifsInode->openFileList))) { 1045 shrink_dcache_parent(direntry); */
1046 /* Has changed on server - flush read ahead pages */ 1046 if (S_ISREG(direntry->d_inode->i_mode)) {
1047 cFYI(1, ("Invalidating read ahead data on " 1047 if (direntry->d_inode->i_mapping)
1048 "closed file")); 1048 filemap_fdatawait(direntry->d_inode->i_mapping);
1049 invalidate_remote_inode(direntry->d_inode); 1049 /* may eventually have to do this for open files too */
1050 if (list_empty(&(cifsInode->openFileList))) {
1051 /* changed on server - flush read ahead pages */
1052 cFYI(1, ("Invalidating read ahead data on "
1053 "closed file"));
1054 invalidate_remote_inode(direntry->d_inode);
1055 }
1050 } 1056 }
1051 } 1057 }
1052/* up(&direntry->d_inode->i_sem); */ 1058/* up(&direntry->d_inode->i_sem); */