if (sdkp) { if (sdkp->WCE) { memset(rq->cmd, 0, sizeof(rq->cmd)); rq->flags |= REQ_BLOCK_PC | REQ_SOFTBARRIER; rq->timeout = SD_TIMEOUT; rq->cmd[0] = SYNCHRONIZE_CACHE; ret = 1; } scsi_disk_put(sdkp); } return ret; 
if (!sdkp || !sdkp->WCE) return 0;  memset(rq->cmd, 0, sizeof(rq->cmd)); rq->flags |= REQ_BLOCK_PC | REQ_SOFTBARRIER; rq->timeout = SD_TIMEOUT; rq->cmd[0] = SYNCHRONIZE_CACHE; return 1; 
static int sd_prepare_flush(request_queue_t *q, struct request *rq){	struct scsi_device *sdev = q->queuedata;	struct scsi_disk *sdkp = scsi_disk_get_from_dev(&sdev->sdev_gendev);	int ret = 0;	if (sdkp) {		if (sdkp->WCE) {			memset(rq->cmd, 0, sizeof(rq->cmd));			rq->flags |= REQ_BLOCK_PC | REQ_SOFTBARRIER;			rq->timeout = SD_TIMEOUT;			rq->cmd[0] = SYNCHRONIZE_CACHE;			ret = 1;		}		scsi_disk_put(sdkp);	}	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c0ed79a331caa68ac027dd6afc02bb5b58ef2798/sd.c/buggy/drivers/scsi/sd.c