From: Alex Elder Date: Wed, 4 Apr 2012 18:35:44 +0000 (-0500) Subject: rbd: don't hold spinlock during messenger flush X-Git-Tag: v3.5-rc1~36^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd9d9f5df6098c50726200d4185e9e8da32785b3;p=pandora-kernel.git rbd: don't hold spinlock during messenger flush A recent change made changes to the rbd_client_list be protected by a spinlock. Unfortunately in rbd_put_client(), the lock is taken before possibly dropping the last reference to an rbd_client, and on the last reference that eventually calls flush_workqueue() which can sleep. The problem was flagged by a debug spinlock warning: BUG: spinlock wrong CPU on CPU#3, rbd/27814 The solution is to move the spinlock acquisition and release inside rbd_client_release(), which is the spot where it's really needed for protecting the removal of the rbd_client from the client list. Signed-off-by: Alex Elder Reviewed-by: Sage Weil --- Reading git-diff-tree failed