Joe Thornber 3cdf93f9d8 dm bio prison: add dm_cell_promote_or_release()
Rather than always releasing the prisoners in a cell, the client may
want to promote one of them to be the new holder.  There is a race here
though between releasing an empty cell, and other threads adding new
inmates.  So this function makes the decision with its lock held.

This function can have two outcomes:
i)  An inmate is promoted to be the holder of the cell (return value of 0).
ii) The cell has no inmate for promotion and is released (return value of 1).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2015-05-29 14:19:06 -04:00
..
2015-04-22 07:59:39 +10:00
2015-02-04 08:35:52 +11:00
2015-04-24 09:28:01 -07:00
2015-02-04 08:35:52 +11:00
2015-04-24 09:28:01 -07:00
2015-04-22 07:59:39 +10:00
2015-04-22 07:59:39 +10:00
2015-02-04 08:35:52 +11:00