]> www.infradead.org Git - users/dwmw2/linux.git/commit
lockd: fix file selection in nlmsvc_cancel_blocked
authorJeff Layton <jlayton@kernel.org>
Fri, 11 Nov 2022 19:36:38 +0000 (14:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:24 +0000 (16:19 +0200)
commitaf7ee7ec1051aa2f7556a36b87966fec58f2f73f
treed573ff3a77b5551971c8c9b871f7099e0520c109
parenteb0433d95c848f5fd8fcca75aa5f89b56edaf348
lockd: fix file selection in nlmsvc_cancel_blocked

[ Upstream commit 9f27783b4dd235ef3c8dbf69fc6322777450323c ]

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