aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2006-01-18 20:43:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 22:20:24 -0500
commit3a65588adc4401622b204caa897123e16a4a0318 (patch)
treea96a8d4a28608b49440062273c70565c1129165d /fs/nfsd/nfs4state.c
parent8a280510852959c0d51b1d625e90c0491c238368 (diff)
[PATCH] nfsd4: rename lk_stateowner
One of the things that's confusing about nfsd4_lock is that the lk_stateowner field could be set to either of two different lockowners: the open owner or the lock owner. Rename to lk_replay_owner and add a comment to make it clear that it's used for whichever stateowner has its sequence id bumped for replay detection. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c16
1 files changed, 8 insertions, 8 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:
2830out: 2830out:
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;