summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-10-22 18:12:17 +0200
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-11-04 03:28:45 +0100
commit333ac786a1b4a366da9830f550ba440e398bb5a5 (patch)
tree2597dcc6888d2d039aba2158d9a360b449d75e5f /fs/nfs
parentNFSv4.1: Don't rebind to the same source port when reconnecting to the server (diff)
downloadlinux-333ac786a1b4a366da9830f550ba440e398bb5a5.tar.xz
linux-333ac786a1b4a366da9830f550ba440e398bb5a5.zip
NFSv4: Fix delegation handling in update_open_stateid()
If the delegation is marked as being revoked, then don't use it in the open state structure. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index caacf5e7f5e1..217885e32852 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1737,7 +1737,7 @@ static int update_open_stateid(struct nfs4_state *state,
ret = 1;
}
- deleg_cur = rcu_dereference(nfsi->delegation);
+ deleg_cur = nfs4_get_valid_delegation(state->inode);
if (deleg_cur == NULL)
goto no_delegation;
@@ -1749,7 +1749,7 @@ static int update_open_stateid(struct nfs4_state *state,
if (delegation == NULL)
delegation = &deleg_cur->stateid;
- else if (!nfs4_stateid_match(&deleg_cur->stateid, delegation))
+ else if (!nfs4_stateid_match_other(&deleg_cur->stateid, delegation))
goto no_delegation_unlock;
nfs_mark_delegation_referenced(deleg_cur);