提交 97db8f41 编写于 作者: T Trond Myklebust

NFS: Don't invalidate the symlink we just stuffed into the cache

And slight optimisation of nfs_end_data_update(): directories never have
delegations anyway.
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 5f004cf2
...@@ -717,13 +717,11 @@ void nfs_end_data_update(struct inode *inode) ...@@ -717,13 +717,11 @@ void nfs_end_data_update(struct inode *inode)
{ {
struct nfs_inode *nfsi = NFS_I(inode); struct nfs_inode *nfsi = NFS_I(inode);
if (!nfs_have_delegation(inode, FMODE_READ)) { /* Directories: invalidate page cache */
/* Directories and symlinks: invalidate page cache */ if (S_ISDIR(inode->i_mode)) {
if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) { spin_lock(&inode->i_lock);
spin_lock(&inode->i_lock); nfsi->cache_validity |= NFS_INO_INVALID_DATA;
nfsi->cache_validity |= NFS_INO_INVALID_DATA; spin_unlock(&inode->i_lock);
spin_unlock(&inode->i_lock);
}
} }
nfsi->cache_change_attribute = jiffies; nfsi->cache_change_attribute = jiffies;
atomic_dec(&nfsi->data_updates); atomic_dec(&nfsi->data_updates);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册