target: Better handling of AllRegistrants reservations
authorIlias Tsitsimpis <iliastsi@arrikto.com>
Thu, 26 Mar 2015 15:12:42 +0000 (17:12 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 26 Mar 2015 21:49:51 +0000 (14:49 -0700)
Fix AllRegistrants reservations in register_and_move() function where
the code didn't handle all of the registered devices as reservation
holders, resulting in the wrong warning message being displayed.

At the same time, introduce a helper function named
'is_reservation_holder()' that properly checks if a device is a
reservation holder, taking into account the reservation type. This
function cleans up the code and improves readability.

Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
Signed-off-by: Vangelis Koukis <vkoukis@arrikto.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_pr.c

Simple merge