/* Waits for completion of an SBP-2 access request. Returns nonzero if timed out or prematurely interrupted.  */
static int sbp2util_access_timeout(struct sbp2_lu *lu, int timeout)
/* Waits for completion of an SBP-2 access request. Returns nonzero if timed out or prematurely interrupted.  */
static int sbp2util_access_timeout(struct sbp2_lu *lu, int timeout)
{
	long leftover;
	leftover = wait_event_interruptible_timeout(
			sbp2_access_wq, lu->access_complete, timeout);
	lu->access_complete = 0;
	return leftover <= 0;
}