summaryrefslogtreecommitdiff
path: root/fs/lockd/svc4proc.c
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2019-05-23 10:45:47 -0400
committerJ. Bruce Fields <bfields@redhat.com>2019-07-03 17:52:09 -0400
commit646d73e91b4222ea972953bad4374a5ca903e79d (patch)
treefcd45f943866ade75475b66a11b579bb3d1c8a58 /fs/lockd/svc4proc.c
parent9adfac6d730db5e9c4c294798f5f191b621f8bc3 (diff)
lockd: Show pid of lockd for remote locks
Use the pid of lockd instead of the remote lock's svid for the fl_pid for local POSIX locks. This allows proper enumeration of which local process owns which lock. The svid is meaningless to local lock readers. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd/svc4proc.c')
-rw-r--r--fs/lockd/svc4proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index a00134fd8956..e4d3f783e06a 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -46,6 +46,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
/* Set up the missing parts of the file_lock structure */
lock->fl.fl_file = file->f_file;
+ lock->fl.fl_pid = current->tgid;
lock->fl.fl_lmops = &nlmsvc_lock_operations;
nlmsvc_locks_init_private(&lock->fl, host, (pid_t)lock->svid);
if (!lock->fl.fl_owner) {