Revert "lockd: Show pid of lockd for remote locks"

This reverts most of commit b8eee0e90f97 ("lockd: Show pid of lockd for
remote locks"), which caused remote locks to not be differentiated between
remote processes for NLM.

We retain the fixup for setting the client's fl_pid to a negative value.

Fixes: b8eee0e90f97 ("lockd: Show pid of lockd for remote locks")
Cc: stable@vger.kernel.org

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: XueWei Zhang <xueweiz@google.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by Benjamin Coddington and committed by J. Bruce Fields 141731d1 cd6c84d8

+4 -4
+2 -2
fs/lockd/xdr.c
··· 127 127 128 128 locks_init_lock(fl); 129 129 fl->fl_owner = current->files; 130 - fl->fl_pid = current->tgid; 130 + fl->fl_pid = (pid_t)lock->svid; 131 131 fl->fl_flags = FL_POSIX; 132 132 fl->fl_type = F_RDLCK; /* as good as anything else */ 133 133 start = ntohl(*p++); ··· 269 269 memset(lock, 0, sizeof(*lock)); 270 270 locks_init_lock(&lock->fl); 271 271 lock->svid = ~(u32) 0; 272 - lock->fl.fl_pid = current->tgid; 272 + lock->fl.fl_pid = (pid_t)lock->svid; 273 273 274 274 if (!(p = nlm_decode_cookie(p, &argp->cookie)) 275 275 || !(p = xdr_decode_string_inplace(p, &lock->caller,
+2 -2
fs/lockd/xdr4.c
··· 119 119 120 120 locks_init_lock(fl); 121 121 fl->fl_owner = current->files; 122 - fl->fl_pid = current->tgid; 122 + fl->fl_pid = (pid_t)lock->svid; 123 123 fl->fl_flags = FL_POSIX; 124 124 fl->fl_type = F_RDLCK; /* as good as anything else */ 125 125 p = xdr_decode_hyper(p, &start); ··· 266 266 memset(lock, 0, sizeof(*lock)); 267 267 locks_init_lock(&lock->fl); 268 268 lock->svid = ~(u32) 0; 269 - lock->fl.fl_pid = current->tgid; 269 + lock->fl.fl_pid = (pid_t)lock->svid; 270 270 271 271 if (!(p = nlm4_decode_cookie(p, &argp->cookie)) 272 272 || !(p = xdr_decode_string_inplace(p, &lock->caller,