diff options
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r-- | fs/nfs/delegation.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 56f4f6a99d4e..20ac403469a0 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -124,10 +124,6 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
124 | struct nfs_delegation *delegation; | 124 | struct nfs_delegation *delegation; |
125 | int status = 0; | 125 | int status = 0; |
126 | 126 | ||
127 | /* Ensure we first revalidate the attributes and page cache! */ | ||
128 | if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))) | ||
129 | __nfs_revalidate_inode(NFS_SERVER(inode), inode); | ||
130 | |||
131 | delegation = kmalloc(sizeof(*delegation), GFP_KERNEL); | 127 | delegation = kmalloc(sizeof(*delegation), GFP_KERNEL); |
132 | if (delegation == NULL) | 128 | if (delegation == NULL) |
133 | return -ENOMEM; | 129 | return -ENOMEM; |
@@ -154,6 +150,12 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
154 | status = -EIO; | 150 | status = -EIO; |
155 | } | 151 | } |
156 | } | 152 | } |
153 | |||
154 | /* Ensure we revalidate the attributes and page cache! */ | ||
155 | spin_lock(&inode->i_lock); | ||
156 | nfsi->cache_validity |= NFS_INO_REVAL_FORCED; | ||
157 | spin_unlock(&inode->i_lock); | ||
158 | |||
157 | spin_unlock(&clp->cl_lock); | 159 | spin_unlock(&clp->cl_lock); |
158 | kfree(delegation); | 160 | kfree(delegation); |
159 | return status; | 161 | return status; |