diff options
author | Steve French <sfrench@us.ibm.com> | 2005-11-28 08:16:13 -0800 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-11-28 08:16:13 -0800 |
commit | 3abb92722ab1784b419dadb5444daf8ea9636905 (patch) | |
tree | 10e8eac9df4380542fb8416137dffe3b8c08ad54 /fs/cifs/inode.c | |
parent | 458af5439fe7ae7d95ca14106844e61f0795166c (diff) | |
download | op-kernel-dev-3abb92722ab1784b419dadb5444daf8ea9636905.zip op-kernel-dev-3abb92722ab1784b419dadb5444daf8ea9636905.tar.gz |
[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.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 05b5258..d34325c 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); */ |