
From: NeilBrown <neilb@cse.unsw.edu.au>

The file_lock.fl_pid is no longer used in posix_same_owner() tests.  So just
set it to current->tgid for informational purposes.

Signed-off-by: Andy Adamson <andros@umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/nfsd/nfs4state.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -puN fs/nfsd/nfs4state.c~nfsd4-store-current-tgid-instead-of-lockowner-hash-in-fl_pid fs/nfsd/nfs4state.c
--- 25/fs/nfsd/nfs4state.c~nfsd4-store-current-tgid-instead-of-lockowner-hash-in-fl_pid	2004-09-02 20:29:04.058953776 -0700
+++ 25-akpm/fs/nfsd/nfs4state.c	2004-09-02 20:29:04.066952560 -0700
@@ -1950,9 +1950,10 @@ static inline void
 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny)
 {
 	struct nfs4_stateowner *sop = (struct nfs4_stateowner *) fl->fl_owner;
+	unsigned int hval = lockownerid_hashval(sop->so_id);
 
 	deny->ld_sop = NULL;
-	if (nfs4_verify_lock_stateowner(sop, fl->fl_pid))
+	if (nfs4_verify_lock_stateowner(sop, hval))
 		deny->ld_sop = sop;
 	deny->ld_start = fl->fl_start;
 	deny->ld_length = ~(u64)0;
@@ -2196,7 +2197,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struc
 		goto out;
 	}
 	file_lock.fl_owner = (fl_owner_t) lock->lk_stateowner;
-	file_lock.fl_pid = lockownerid_hashval(lock->lk_stateowner->so_id);
+	file_lock.fl_pid = current->tgid;
 	file_lock.fl_file = filp;
 	file_lock.fl_flags = FL_POSIX;
 
@@ -2322,7 +2323,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
 	sop = lockt->lt_stateowner;
 	if (sop) {
 		file_lock.fl_owner = (fl_owner_t) sop;
-		file_lock.fl_pid = lockownerid_hashval(sop->so_id);
+		file_lock.fl_pid = current->tgid;
 	} else {
 		file_lock.fl_owner = NULL;
 		file_lock.fl_pid = 0;
@@ -2386,7 +2387,7 @@ nfsd4_locku(struct svc_rqst *rqstp, stru
 	locks_init_lock(&file_lock);
 	file_lock.fl_type = F_UNLCK;
 	file_lock.fl_owner = (fl_owner_t) locku->lu_stateowner;
-	file_lock.fl_pid = lockownerid_hashval(locku->lu_stateowner->so_id);
+	file_lock.fl_pid = current->tgid;
 	file_lock.fl_file = filp;
 	file_lock.fl_flags = FL_POSIX; 
 	file_lock.fl_start = locku->lu_offset;
_
