diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2019-05-23 10:45:47 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-07-03 17:52:09 -0400 |
commit | 646d73e91b4222ea972953bad4374a5ca903e79d (patch) | |
tree | fcd45f943866ade75475b66a11b579bb3d1c8a58 /fs/lockd/svclock.c | |
parent | 9adfac6d730db5e9c4c294798f5f191b621f8bc3 (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/svclock.c')
-rw-r--r-- | fs/lockd/svclock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 637c50687fd7..5f9f19b81754 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -432,7 +432,7 @@ static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock) /* set default data area */ call->a_args.lock.oh.data = call->a_owner; - call->a_args.lock.svid = lock->fl.fl_pid; + call->a_args.lock.svid = ((struct nlm_lockowner *)lock->fl.fl_owner)->pid; if (lock->oh.len > NLMCLNT_OHSIZE) { void *data = kmalloc(lock->oh.len, GFP_KERNEL); @@ -634,7 +634,7 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file, conflock->caller = "somehost"; /* FIXME */ conflock->len = strlen(conflock->caller); conflock->oh.len = 0; /* don't return OH info */ - conflock->svid = lock->fl.fl_pid; + conflock->svid = ((struct nlm_lockowner *)lock->fl.fl_owner)->pid; conflock->fl.fl_type = lock->fl.fl_type; conflock->fl.fl_start = lock->fl.fl_start; conflock->fl.fl_end = lock->fl.fl_end; |