]> git.baikalelectronics.ru Git - kernel.git/commit
lockd: Show pid of lockd for remote locks
authorBenjamin Coddington <bcodding@redhat.com>
Thu, 1 Nov 2018 17:39:49 +0000 (13:39 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 14 Dec 2018 17:52:16 +0000 (12:52 -0500)
commit75a93f3775b16aec071d088bb4a3f29768212abf
tree571a45f36113efaabf31d68f4e43ff83a9ec4e68
parent76c1700b4fbe960c9fcf71e1db2ad035a79c5422
lockd: Show pid of lockd for remote locks

Commit 9ba6f5f6d450 ("fs/locks: Remove fl_nspid and use fs-specific l_pid
for remote locks") specified that the l_pid returned for F_GETLK on a local
file that has a remote lock should be the pid of the lock manager process.
That commit, while updating other filesystems, failed to update lockd, such
that locks created by lockd had their fl_pid set to that of the remote
process holding the lock.  Fix that here to be the pid of lockd.

Also, fix the client case so that the returned lock pid is negative, which
indicates a remote lock on a remote file.

Fixes: 9ba6f5f6d450 ("fs/locks: Remove fl_nspid and use fs-specific...")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/lockd/clntproc.c
fs/lockd/xdr.c
fs/lockd/xdr4.c