/* Whoa nelly now it gets really hairy. For some functions (e.g. steal lock for eckd devices) the currently running request has to be terminated and be put back to status queued, before the special request is added to the head of the queue. Then the special request is waited on normally.  */
static int _dasd_term_running_cqr(struct dasd_device *device)
/* Whoa nelly now it gets really hairy. For some functions (e.g. steal lock for eckd devices) the currently running request has to be terminated and be put back to status queued, before the special request is added to the head of the queue. Then the special request is waited on normally.  */
static int _dasd_term_running_cqr(struct dasd_device *device)
{
	struct dasd_ccw_req *cqr;
	if (list_empty(&device->ccw_queue))
		return 0;
	cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, devlist);
	return device->discipline->term_IO(cqr);
}