summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 50bae7471147..50063a85f505 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -408,8 +408,8 @@ out:
if (open->op_stateowner) {
nfs4_get_stateowner(open->op_stateowner);
cstate->replay_owner = open->op_stateowner;
- }
- nfs4_unlock_state();
+ } else
+ nfs4_unlock_state();
return status;
}
@@ -1227,6 +1227,7 @@ encode_op:
be32_to_cpu(status));
if (cstate->replay_owner) {
+ nfs4_unlock_state();
nfs4_put_stateowner(cstate->replay_owner);
cstate->replay_owner = NULL;
}