diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 16 | ||||
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 5 | ||||
-rw-r--r-- | include/linux/nfsd/xdr4.h | 5 |
3 files changed, 13 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 5bf7fd3947ce..578ea521c827 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -2725,11 +2725,11 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock | |||
2725 | lock->lk_new_open_seqid, | 2725 | lock->lk_new_open_seqid, |
2726 | &lock->lk_new_open_stateid, | 2726 | &lock->lk_new_open_stateid, |
2727 | CHECK_FH | OPEN_STATE, | 2727 | CHECK_FH | OPEN_STATE, |
2728 | &lock->lk_stateowner, &open_stp, | 2728 | &lock->lk_replay_owner, &open_stp, |
2729 | lock); | 2729 | lock); |
2730 | if (status) | 2730 | if (status) |
2731 | goto out; | 2731 | goto out; |
2732 | open_sop = lock->lk_stateowner; | 2732 | open_sop = lock->lk_replay_owner; |
2733 | /* create lockowner and lock stateid */ | 2733 | /* create lockowner and lock stateid */ |
2734 | fp = open_stp->st_file; | 2734 | fp = open_stp->st_file; |
2735 | strhashval = lock_ownerstr_hashval(fp->fi_inode, | 2735 | strhashval = lock_ownerstr_hashval(fp->fi_inode, |
@@ -2752,12 +2752,12 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock | |||
2752 | lock->lk_old_lock_seqid, | 2752 | lock->lk_old_lock_seqid, |
2753 | &lock->lk_old_lock_stateid, | 2753 | &lock->lk_old_lock_stateid, |
2754 | CHECK_FH | LOCK_STATE, | 2754 | CHECK_FH | LOCK_STATE, |
2755 | &lock->lk_stateowner, &lock_stp, lock); | 2755 | &lock->lk_replay_owner, &lock_stp, lock); |
2756 | if (status) | 2756 | if (status) |
2757 | goto out; | 2757 | goto out; |
2758 | lock_sop = lock->lk_stateowner; | 2758 | lock_sop = lock->lk_replay_owner; |
2759 | } | 2759 | } |
2760 | /* lock->lk_stateowner and lock_stp have been created or found */ | 2760 | /* lock->lk_replay_owner and lock_stp have been created or found */ |
2761 | filp = lock_stp->st_vfs_file; | 2761 | filp = lock_stp->st_vfs_file; |
2762 | 2762 | ||
2763 | status = nfserr_grace; | 2763 | status = nfserr_grace; |
@@ -2830,9 +2830,9 @@ conflicting_lock: | |||
2830 | out: | 2830 | out: |
2831 | if (status && lock->lk_is_new && lock_sop) | 2831 | if (status && lock->lk_is_new && lock_sop) |
2832 | release_stateowner(lock_sop); | 2832 | release_stateowner(lock_sop); |
2833 | if (lock->lk_stateowner) { | 2833 | if (lock->lk_replay_owner) { |
2834 | nfs4_get_stateowner(lock->lk_stateowner); | 2834 | nfs4_get_stateowner(lock->lk_replay_owner); |
2835 | *replay_owner = lock->lk_stateowner; | 2835 | *replay_owner = lock->lk_replay_owner; |
2836 | } | 2836 | } |
2837 | nfs4_unlock_state(); | 2837 | nfs4_unlock_state(); |
2838 | return status; | 2838 | return status; |
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index dcd673186944..6b743327686c 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -528,7 +528,7 @@ nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock) | |||
528 | { | 528 | { |
529 | DECODE_HEAD; | 529 | DECODE_HEAD; |
530 | 530 | ||
531 | lock->lk_stateowner = NULL; | 531 | lock->lk_replay_owner = NULL; |
532 | /* | 532 | /* |
533 | * type, reclaim(boolean), offset, length, new_lock_owner(boolean) | 533 | * type, reclaim(boolean), offset, length, new_lock_owner(boolean) |
534 | */ | 534 | */ |
@@ -1895,7 +1895,6 @@ nfsd4_encode_lock_denied(struct nfsd4_compoundres *resp, struct nfsd4_lock_denie | |||
1895 | static void | 1895 | static void |
1896 | nfsd4_encode_lock(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_lock *lock) | 1896 | nfsd4_encode_lock(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_lock *lock) |
1897 | { | 1897 | { |
1898 | |||
1899 | ENCODE_SEQID_OP_HEAD; | 1898 | ENCODE_SEQID_OP_HEAD; |
1900 | 1899 | ||
1901 | if (!nfserr) { | 1900 | if (!nfserr) { |
@@ -1906,7 +1905,7 @@ nfsd4_encode_lock(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_lock | |||
1906 | } else if (nfserr == nfserr_denied) | 1905 | } else if (nfserr == nfserr_denied) |
1907 | nfsd4_encode_lock_denied(resp, &lock->lk_denied); | 1906 | nfsd4_encode_lock_denied(resp, &lock->lk_denied); |
1908 | 1907 | ||
1909 | ENCODE_SEQID_OP_TAIL(lock->lk_stateowner); | 1908 | ENCODE_SEQID_OP_TAIL(lock->lk_replay_owner); |
1910 | } | 1909 | } |
1911 | 1910 | ||
1912 | static void | 1911 | static void |
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 8903688890ce..77adba7d2281 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
@@ -145,8 +145,9 @@ struct nfsd4_lock { | |||
145 | } ok; | 145 | } ok; |
146 | struct nfsd4_lock_denied denied; | 146 | struct nfsd4_lock_denied denied; |
147 | } u; | 147 | } u; |
148 | 148 | /* The lk_replay_owner is the open owner in the open_to_lock_owner | |
149 | struct nfs4_stateowner *lk_stateowner; | 149 | * case and the lock owner otherwise: */ |
150 | struct nfs4_stateowner *lk_replay_owner; | ||
150 | }; | 151 | }; |
151 | #define lk_new_open_seqid v.new.open_seqid | 152 | #define lk_new_open_seqid v.new.open_seqid |
152 | #define lk_new_open_stateid v.new.open_stateid | 153 | #define lk_new_open_stateid v.new.open_stateid |