summaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorSteve French2005-11-28 17:16:13 +0100
committerSteve French2005-11-28 17:16:13 +0100
commit3abb92722ab1784b419dadb5444daf8ea9636905 (patch)
tree10e8eac9df4380542fb8416137dffe3b8c08ad54 /fs/cifs/inode.c
parent[PATCH] drivers/scsi/dpt_i2o.c: fix a NULL pointer dereference (diff)
downloadkernel-qcow2-linux-3abb92722ab1784b419dadb5444daf8ea9636905.tar.gz
kernel-qcow2-linux-3abb92722ab1784b419dadb5444daf8ea9636905.tar.xz
kernel-qcow2-linux-3abb92722ab1784b419dadb5444daf8ea9636905.zip
[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)
filemap_fdatawrite(direntry->d_inode->i_mapping);
}
if (invalidate_inode) {
- if (direntry->d_inode->i_mapping)
- filemap_fdatawait(direntry->d_inode->i_mapping);
- /* may eventually have to do this for open files too */
- if (list_empty(&(cifsInode->openFileList))) {
- /* Has changed on server - flush read ahead pages */
- cFYI(1, ("Invalidating read ahead data on "
- "closed file"));
- invalidate_remote_inode(direntry->d_inode);
+ /* shrink_dcache not necessary now that cifs dentry ops
+ are exported for negative dentries */
+/* if(S_ISDIR(direntry->d_inode->i_mode))
+ shrink_dcache_parent(direntry); */
+ if (S_ISREG(direntry->d_inode->i_mode)) {
+ if (direntry->d_inode->i_mapping)
+ filemap_fdatawait(direntry->d_inode->i_mapping);
+ /* 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);
+ }
}
}
/* up(&direntry->d_inode->i_sem); */