Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69ca06c9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  cfq-iosched: reset oom_cfqq in cfq_set_request()
  block: fix sg SG_DXFER_TO_FROM_DEV regression
  block: call blk_scsi_ioctl_init()
  Fix congestion_wait() sync/async vs read/write confusion
parents 9f2d8be4 32f2e807
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -751,7 +751,7 @@ unsigned long __copy_to_user_ll(void __user *to, const void *from,

			if (retval == -ENOMEM && is_global_init(current)) {
				up_read(&current->mm->mmap_sem);
				congestion_wait(WRITE, HZ/50);
				congestion_wait(BLK_RW_ASYNC, HZ/50);
				goto survive;
			}

+1 −1
Original line number Diff line number Diff line
@@ -2311,7 +2311,7 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
		goto queue_fail;

	cfqq = cic_to_cfqq(cic, is_sync);
	if (!cfqq) {
	if (!cfqq || cfqq == &cfqd->oom_cfqq) {
		cfqq = cfq_get_queue(cfqd, is_sync, cic->ioc, gfp_mask);
		cic_set_cfqq(cic, cfqq, is_sync);
	}
+1 −0
Original line number Diff line number Diff line
@@ -680,3 +680,4 @@ int __init blk_scsi_ioctl_init(void)
	blk_set_cmd_filter_defaults(&blk_default_cmd_filter);
	return 0;
}
fs_initcall(blk_scsi_ioctl_init);
+6 −4
Original line number Diff line number Diff line
@@ -1372,8 +1372,10 @@ static int pkt_handle_queue(struct pktcdvd_device *pd)
	wakeup = (pd->write_congestion_on > 0
	 		&& pd->bio_queue_size <= pd->write_congestion_off);
	spin_unlock(&pd->lock);
	if (wakeup)
		clear_bdi_congested(&pd->disk->queue->backing_dev_info, WRITE);
	if (wakeup) {
		clear_bdi_congested(&pd->disk->queue->backing_dev_info,
					BLK_RW_ASYNC);
	}

	pkt->sleep_time = max(PACKET_WAIT_TIME, 1);
	pkt_set_state(pkt, PACKET_WAITING_STATE);
@@ -2592,10 +2594,10 @@ static int pkt_make_request(struct request_queue *q, struct bio *bio)
	spin_lock(&pd->lock);
	if (pd->write_congestion_on > 0
	    && pd->bio_queue_size >= pd->write_congestion_on) {
		set_bdi_congested(&q->backing_dev_info, WRITE);
		set_bdi_congested(&q->backing_dev_info, BLK_RW_ASYNC);
		do {
			spin_unlock(&pd->lock);
			congestion_wait(WRITE, HZ);
			congestion_wait(BLK_RW_ASYNC, HZ);
			spin_lock(&pd->lock);
		} while(pd->bio_queue_size > pd->write_congestion_off);
	}
+1 −1
Original line number Diff line number Diff line
@@ -776,7 +776,7 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
		 * But don't wait if split was due to the io size restriction
		 */
		if (unlikely(out_of_pages))
			congestion_wait(WRITE, HZ/100);
			congestion_wait(BLK_RW_ASYNC, HZ/100);

		/*
		 * With async crypto it is unsafe to share the crypto context
Loading