|
@@ -2624,6 +2624,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
|
|
|
ret = PTR_ERR(state);
|
|
|
if (IS_ERR(state))
|
|
|
goto out;
|
|
|
+ ctx->state = state;
|
|
|
if (server->caps & NFS_CAP_POSIX_LOCK)
|
|
|
set_bit(NFS_STATE_POSIX_LOCKS, &state->flags);
|
|
|
if (opendata->o_res.rflags & NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK)
|
|
@@ -2649,7 +2650,6 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
|
|
|
if (ret != 0)
|
|
|
goto out;
|
|
|
|
|
|
- ctx->state = state;
|
|
|
if (d_inode(dentry) == state->inode) {
|
|
|
nfs_inode_attach_open_context(ctx);
|
|
|
if (read_seqcount_retry(&sp->so_reclaim_seqcount, seq))
|