]> www.infradead.org Git - users/dwmw2/linux.git/commit
lockd: ensure we use the correct file descriptor when unlocking
authorJeff Layton <jlayton@kernel.org>
Fri, 11 Nov 2022 19:36:37 +0000 (14:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:24 +0000 (16:19 +0200)
commiteb0433d95c848f5fd8fcca75aa5f89b56edaf348
treebd291b47b114afb29abd69d765ecd43c70a1af96
parent281092cf3fc36366e00bf9a621761a134ec23473
lockd: ensure we use the correct file descriptor when unlocking

[ Upstream commit 69efce009f7df888e1fede3cb2913690eb829f52 ]

Shared locks are set on O_RDONLY descriptors and exclusive locks are set
on O_WRONLY ones. nlmsvc_unlock however calls vfs_lock_file twice, once
for each descriptor, but it doesn't reset fl_file. Ensure that it does.

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