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:40:30 +0000 (13:40 +0200)
commit9ce6e29375bab3c081bc61162d82e47e8d7a439a
tree987ea20f370fec041cd412ce7d7bfde27f97bd07
parent2d3fab9ceafad925d30d0ea78f3a2b1bc8ce550b
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