diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-16 19:48:09 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-19 17:29:29 -0500 |
commit | 0bc2c9b4dca9668a236fde48ebb15e5f0735cbff (patch) | |
tree | fdbd1b88f08b93ded2902009ef4baca07b4688d7 | |
parent | e603a4c1b5c2b9d24139eeb1769c5ac600318c07 (diff) |
NFSv4: Don't discard the attributes returned by asynchronous DELEGRETURN
DELEGRETURN will always carry a reference to the inode except when
the latter is being freed, so let's ensure that we always use that
inode information to ensure close-to-open cache consistency, even
when the DELEGRETURN call is asynchronous.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 39dfba9265f9..0d9fa18aa243 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -5699,6 +5699,7 @@ static void nfs4_delegreturn_release(void *calldata) | |||
5699 | if (data->lr.roc) | 5699 | if (data->lr.roc) |
5700 | pnfs_roc_release(&data->lr.arg, &data->lr.res, | 5700 | pnfs_roc_release(&data->lr.arg, &data->lr.res, |
5701 | data->res.lr_ret); | 5701 | data->res.lr_ret); |
5702 | nfs_post_op_update_inode_force_wcc(inode, &data->fattr); | ||
5702 | nfs_iput_and_deactive(inode); | 5703 | nfs_iput_and_deactive(inode); |
5703 | } | 5704 | } |
5704 | kfree(calldata); | 5705 | kfree(calldata); |
@@ -5787,10 +5788,6 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, co | |||
5787 | if (status != 0) | 5788 | if (status != 0) |
5788 | goto out; | 5789 | goto out; |
5789 | status = data->rpc_status; | 5790 | status = data->rpc_status; |
5790 | if (status == 0) | ||
5791 | nfs_post_op_update_inode_force_wcc(inode, &data->fattr); | ||
5792 | else | ||
5793 | nfs_refresh_inode(inode, &data->fattr); | ||
5794 | out: | 5791 | out: |
5795 | rpc_put_task(task); | 5792 | rpc_put_task(task); |
5796 | return status; | 5793 | return status; |