Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers

From: Peter Jeremy <peter_at_rulingia.com>
Date: Wed, 24 Nov 2021 08:01:56 UTC
On 2021-Nov-24 05:12:19 +0200, Konstantin Belousov <kostikbel@gmail.com> wrote:
>Try this (combined two patches).

That's helped.  I can now swapon and swapoff but not actually use swap:
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
assert_vop_locked() at assert_vop_locked+0x58
VOP_STRATEGY_APV() at VOP_STRATEGY_APV+0x54
bufstrategy() at bufstrategy+0x4c
swap_pager_putpages() at swap_pager_putpages+0x108
vm_pageout_flush() at vm_pageout_flush+0x108
vm_pageout_cluster() at vm_pageout_cluster+0x464
vm_pageout_laundry_worker() at vm_pageout_laundry_worker+0x910
fork_exit() at fork_exit+0x74
fork_trampoline() at fork_trampoline+0x14
vnode 0xffffa00008840700: type VREG
    usecount 1, writecount 0, refcount 2 seqc users 0
    hold count flags ()
    flags (VV_VMSIZEVNLOCK)
    v_object 0xffffa00008df3738 ref 0 pages 0 cleanbuf 0 dirtybuf 0
    lock type nfs: UNLOCKED
        fileid 30984 fsid 0x3a3a00ff01
VOP_STRATEGY: 0xffffa00008840700 is not locked but should be
KDB: enter: lock violation

-- 
Peter Jeremy