Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18948
b: refs/heads/master
c: 3a65588
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jan 19, 2006
1 parent 080576a commit 26528b7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 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: 8a280510852959c0d51b1d625e90c0491c238368
refs/heads/master: 3a65588adc4401622b204caa897123e16a4a0318
16 changes: 8 additions & 8 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2725,11 +2725,11 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
lock->lk_new_open_seqid,
&lock->lk_new_open_stateid,
CHECK_FH | OPEN_STATE,
&lock->lk_stateowner, &open_stp,
&lock->lk_replay_owner, &open_stp,
lock);
if (status)
goto out;
open_sop = lock->lk_stateowner;
open_sop = lock->lk_replay_owner;
/* create lockowner and lock stateid */
fp = open_stp->st_file;
strhashval = lock_ownerstr_hashval(fp->fi_inode,
Expand All @@ -2752,12 +2752,12 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
lock->lk_old_lock_seqid,
&lock->lk_old_lock_stateid,
CHECK_FH | LOCK_STATE,
&lock->lk_stateowner, &lock_stp, lock);
&lock->lk_replay_owner, &lock_stp, lock);
if (status)
goto out;
lock_sop = lock->lk_stateowner;
lock_sop = lock->lk_replay_owner;
}
/* lock->lk_stateowner and lock_stp have been created or found */
/* lock->lk_replay_owner and lock_stp have been created or found */
filp = lock_stp->st_vfs_file;

status = nfserr_grace;
Expand Down Expand Up @@ -2830,9 +2830,9 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
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;
if (lock->lk_replay_owner) {
nfs4_get_stateowner(lock->lk_replay_owner);
*replay_owner = lock->lk_replay_owner;
}
nfs4_unlock_state();
return status;
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock)
{
DECODE_HEAD;

lock->lk_stateowner = NULL;
lock->lk_replay_owner = NULL;
/*
* type, reclaim(boolean), offset, length, new_lock_owner(boolean)
*/
Expand Down Expand Up @@ -1895,7 +1895,6 @@ nfsd4_encode_lock_denied(struct nfsd4_compoundres *resp, struct nfsd4_lock_denie
static void
nfsd4_encode_lock(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_lock *lock)
{

ENCODE_SEQID_OP_HEAD;

if (!nfserr) {
Expand All @@ -1906,7 +1905,7 @@ nfsd4_encode_lock(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_lock
} else if (nfserr == nfserr_denied)
nfsd4_encode_lock_denied(resp, &lock->lk_denied);

ENCODE_SEQID_OP_TAIL(lock->lk_stateowner);
ENCODE_SEQID_OP_TAIL(lock->lk_replay_owner);
}

static void
Expand Down
5 changes: 3 additions & 2 deletions trunk/include/linux/nfsd/xdr4.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ struct nfsd4_lock {
} ok;
struct nfsd4_lock_denied denied;
} u;

struct nfs4_stateowner *lk_stateowner;
/* The lk_replay_owner is the open owner in the open_to_lock_owner
* case and the lock owner otherwise: */
struct nfs4_stateowner *lk_replay_owner;
};
#define lk_new_open_seqid v.new.open_seqid
#define lk_new_open_stateid v.new.open_stateid
Expand Down

0 comments on commit 26528b7

Please sign in to comment.