lockd: fix file selection in nlmsvc_cancel_blocked
authorJeff Layton <jlayton@kernel.org>
Fri, 11 Nov 2022 19:36:38 +0000 (14:36 -0500)
committerChuck Lever <cel@kernel.org>
Sat, 10 Dec 2022 16:01:11 +0000 (11:01 -0500)
commit9f27783b4dd235ef3c8dbf69fc6322777450323c
treec85a5bedde5bdf437171e8fb56f6ac13073ae772
parent69efce009f7df888e1fede3cb2913690eb829f52
lockd: fix file selection in nlmsvc_cancel_blocked

We currently do a lock_to_openmode call based on the arguments from the
NLM_UNLOCK call, but that will always set the fl_type of the lock to
F_UNLCK, and the O_RDONLY descriptor is always chosen.

Fix it to use the file_lock from the block instead.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svclock.c