NFSv4: nfs4_open_confirm must not set the open_owner as confirmed on error

RFC3530 states that the open_owner is confirmed if and only if the client
sends an OPEN_CONFIRM request with the appropriate sequence id and stateid
within the lease period.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

+1 -3
+1 -3
fs/nfs/nfs4proc.c
··· 741 741 if (data->rpc_status == 0) { 742 742 memcpy(data->o_res.stateid.data, data->c_res.stateid.data, 743 743 sizeof(data->o_res.stateid.data)); 744 + nfs_confirm_seqid(&data->owner->so_seqid, 0); 744 745 renew_lease(data->o_res.server, data->timestamp); 745 746 data->rpc_done = 1; 746 747 } 747 - nfs_confirm_seqid(&data->owner->so_seqid, data->rpc_status); 748 748 nfs_increment_open_seqid(data->rpc_status, data->c_arg.seqid); 749 749 } 750 750 ··· 759 759 /* In case of error, no cleanup! */ 760 760 if (!data->rpc_done) 761 761 goto out_free; 762 - nfs_confirm_seqid(&data->owner->so_seqid, 0); 763 762 state = nfs4_opendata_to_nfs4_state(data); 764 763 if (!IS_ERR(state)) 765 764 nfs4_close_state(&data->path, state, data->o_arg.open_flags); ··· 885 886 /* In case we need an open_confirm, no cleanup! */ 886 887 if (data->o_res.rflags & NFS4_OPEN_RESULT_CONFIRM) 887 888 goto out_free; 888 - nfs_confirm_seqid(&data->owner->so_seqid, 0); 889 889 state = nfs4_opendata_to_nfs4_state(data); 890 890 if (!IS_ERR(state)) 891 891 nfs4_close_state(&data->path, state, data->o_arg.open_flags);