]> git.ipfire.org Git - people/arne_f/kernel.git/commit
xprtrdma: Fix completion wait during device removal
authorChuck Lever <chuck.lever@oracle.com>
Fri, 3 Jan 2020 16:52:17 +0000 (11:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:45:47 +0000 (19:45 +0100)
commit760e1a2e4d220c7c1992bbb197790cedf0c86f3d
treed2371db6572e8a2a5478c364f7727a5b0e19a257
parentc2d4a986f979d4004be7f5a3460bc0f0b8f41c02
xprtrdma: Fix completion wait during device removal

commit 13cb886c591f341a8759f175292ddf978ef903a1 upstream.

I've found that on occasion, "rmmod <dev>" will hang while if an NFS
is under load.

Ensure that ri_remove_done is initialized only just before the
transport is woken up to force a close. This avoids the completion
possibly getting initialized again while the CM event handler is
waiting for a wake-up.

Fixes: bebd031866ca ("xprtrdma: Support unplugging an HCA from under an NFS mount")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/xprtrdma/verbs.c