Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18947
b: refs/heads/master
c: 8a28051
h: refs/heads/master
i:
  18945: 9f2024a
  18943: 11a3331
v: v3
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jan 19, 2006
1 parent 632c2ca commit 080576a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6f6ef2f1d7329111fcad7db48fb7adba5062d0a
refs/heads/master: 8a280510852959c0d51b1d625e90c0491c238368
18 changes: 4 additions & 14 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2744,10 +2744,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
if (lock_sop == NULL)
goto out;
lock_stp = alloc_init_lock_stateid(lock_sop, fp, open_stp);
if (lock_stp == NULL) {
release_stateowner(lock_sop);
if (lock_stp == NULL)
goto out;
}
} else {
/* lock (lock owner + lock stateid) already exists */
status = nfs4_preprocess_seqid_op(current_fh,
Expand Down Expand Up @@ -2815,7 +2813,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
status = nfserr_deadlock;
default:
dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status);
goto out_destroy_new_stateid;
goto out;
}

conflicting_lock:
Expand All @@ -2829,17 +2827,9 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
goto out;
}
nfs4_set_lock_denied(conflock, &lock->lk_denied);

out_destroy_new_stateid:
if (lock->lk_is_new) {
dprintk("NFSD: nfsd4_lock: destroy new stateid!\n");
/*
* An error encountered after instantiation of the new
* stateid has forced us to destroy it.
*/
release_state_owner(lock_stp, LOCK_STATE);
}
out:
if (status && lock->lk_is_new && lock_sop)
release_stateowner(lock_sop);
if (lock->lk_stateowner) {
nfs4_get_stateowner(lock->lk_stateowner);
*replay_owner = lock->lk_stateowner;
Expand Down

0 comments on commit 080576a

Please sign in to comment.