xen-blkback: replace work_pending with work_busy in purge_persistent_gnt()
authorBob Liu <bob.liu@oracle.com>
Wed, 22 Jul 2015 06:40:10 +0000 (14:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 16:07:38 +0000 (09:07 -0700)
commite46ebf0b0f94429f6813d8e4162dd060ef7ca7fd
treee81ea1f9765eb36e7da88f7dda9e799aa3d0530f
parent8fab9f94b4b4d5487bb3e2b683f7f85e8aba5c09
xen-blkback: replace work_pending with work_busy in purge_persistent_gnt()

commit 53bc7dc004fecf39e0ba70f2f8d120a1444315d3 upstream.

The BUG_ON() in purge_persistent_gnt() will be triggered when previous purge
work haven't finished.

There is a work_pending() before this BUG_ON, but it doesn't account if the work
is still currently running.

Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/xen-blkback/blkback.c