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

NFSv4: Ensure the inode is clean when we set a delegation

If there are attributes that are still invalid when we set a delegation,
then we need to set the NFS_INO_REVAL_FORCED flag.
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 7c672654
...@@ -404,6 +404,10 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, ...@@ -404,6 +404,10 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred,
trace_nfs4_set_delegation(inode, type); trace_nfs4_set_delegation(inode, type);
spin_lock(&inode->i_lock);
if (NFS_I(inode)->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME))
NFS_I(inode)->cache_validity |= NFS_INO_REVAL_FORCED;
spin_unlock(&inode->i_lock);
out: out:
spin_unlock(&clp->cl_lock); spin_unlock(&clp->cl_lock);
if (delegation != NULL) if (delegation != NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册