]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lockd: lockd server-side shouldn't set fl_ops
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 20 Aug 2021 21:01:59 +0000 (17:01 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:42:14 +0000 (13:42 +0200)
commit954c9d000da09f1a7c8fe4453032bd5ac648b90f
tree59d2b2f6b2a2fca09e3817aac9e4be787d2f0204
parenteb38ac7ad2809a8cf629bec68780d9666c9ce637
lockd: lockd server-side shouldn't set fl_ops

[ Upstream commit 7de875b231edb807387a81cde288aa9e1015ef9e ]

Locks have two sets of op arrays, fl_lmops for the lock manager (lockd
or nfsd), fl_ops for the filesystem.  The server-side lockd code has
been setting its own fl_ops, which leads to confusion (and crashes) in
the reexport case, where the filesystem expects to be the only one
setting fl_ops.

And there's no reason for it that I can see-the lm_get/put_owner ops do
the same job.

Reported-by: Daire Byrne <daire@dneg.com>
Tested-by: Daire Byrne <daire@dneg.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/lockd/svclock.c