Re: [PATCH 5/6] block: Introduce BLKPREP_DONE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/21/2016 07:58 AM, Christoph Hellwig wrote:
>> +++ b/block/blk-core.c
>> @@ -2462,9 +2462,13 @@ struct request *blk_peek_request(struct request_queue *q)
>>  
>>  			rq = NULL;
>>  			break;
>> -		} else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID) {
>> +		} else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID ||
>> +			   ret == BLKPREP_DONE) {
>>  			int err = (ret == BLKPREP_INVALID) ? -EREMOTEIO : -EIO;
>>  
>> +			if (ret == BLKPREP_DONE)
>> +				err = 0;
>> +
> 
> Please just use a proper switch statement for the return values.
> 
Ok.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux