summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-05-22 11:17:16 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-05-31 15:03:12 -0400
commitae55e59da0e401893b3c52b575fc18a00623d0a1 (patch)
tree44467021cc3ac279cb70b829625eb031c7a3d9d5 /fs/nfs
parent32f1c28f3d453f4652948ab9298078874d1a56b6 (diff)
pnfs: Don't release the sequence slot until we've processed layoutget on open
If the server recalls the layout that was just handed out, we risk hitting a race as described in RFC5661 Section 2.10.6.3 unless we ensure that we release the sequence slot after processing the LAYOUTGET operation that was sent as part of the OPEN compound. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index d18447d11b06..bb1141c48281 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2789,7 +2789,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
2789 if (ret != 0) 2789 if (ret != 0)
2790 goto out; 2790 goto out;
2791 2791
2792 state = nfs4_opendata_to_nfs4_state(opendata); 2792 state = _nfs4_opendata_to_nfs4_state(opendata);
2793 ret = PTR_ERR(state); 2793 ret = PTR_ERR(state);
2794 if (IS_ERR(state)) 2794 if (IS_ERR(state))
2795 goto out; 2795 goto out;
@@ -2828,6 +2828,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
2828 } 2828 }
2829 2829
2830out: 2830out:
2831 nfs4_sequence_free_slot(&opendata->o_res.seq_res);
2831 return ret; 2832 return ret;
2832} 2833}
2833 2834