aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 19:03:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 19:03:04 -0400
commit86d9c070175de65890794fa227b68297da6206d8 (patch)
tree1aa4f1d1ecf397bd0d745a67b9d828420a99a8b4 /block/blk-core.c
parent413e3376485e6cf81f4cf6a4dbc0de0326535093 (diff)
parenta2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4 (diff)
Merge branch 'for-2.6.30' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.30' of git://git.kernel.dk/linux-2.6-block: Get rid of pdflush_operation() in emergency sync and remount btrfs: get rid of current_is_pdflush() in btrfs_btree_balance_dirty Move the default_backing_dev_info out of readahead.c and into backing-dev.c block: Repeated lines in switching-sched.txt bsg: Remove bogus check against request_queue->max_sectors block: WARN in __blk_put_request() for potential bio leak loop: fix circular locking in loop_clr_fd() loop: support barrier writes bsg: add support for tail queuing cpqarray: enable bus mastering block: genhd.h cleanup patch block: add private bio_set for bio integrity allocations block: genhd.h comment needs updating block: get rid of unused blkdev_free_rq() define block: remove various blk_queue_*() setting functions in blk_init_queue_node() cciss: add BUILD_BUG_ON() for catching bad CommandList_struct alignment block: don't create bio_vec slabs of less than the inline number block: cleanup bio_alloc_bioset()
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 29bcfac6c688..996ed906d8ca 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -603,13 +603,10 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
603 q->queue_flags = QUEUE_FLAG_DEFAULT; 603 q->queue_flags = QUEUE_FLAG_DEFAULT;
604 q->queue_lock = lock; 604 q->queue_lock = lock;
605 605
606 blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK); 606 /*
607 607 * This also sets hw/phys segments, boundary and size
608 */
608 blk_queue_make_request(q, __make_request); 609 blk_queue_make_request(q, __make_request);
609 blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE);
610
611 blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS);
612 blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
613 610
614 q->sg_reserved_size = INT_MAX; 611 q->sg_reserved_size = INT_MAX;
615 612
@@ -735,7 +732,6 @@ static void freed_request(struct request_queue *q, int rw, int priv)
735 __freed_request(q, rw ^ 1); 732 __freed_request(q, rw ^ 1);
736} 733}
737 734
738#define blkdev_free_rq(list) list_entry((list)->next, struct request, queuelist)
739/* 735/*
740 * Get a free request, queue_lock must be held. 736 * Get a free request, queue_lock must be held.
741 * Returns NULL on failure, with queue_lock held. 737 * Returns NULL on failure, with queue_lock held.
@@ -1066,6 +1062,9 @@ void __blk_put_request(struct request_queue *q, struct request *req)
1066 1062
1067 elv_completed_request(q, req); 1063 elv_completed_request(q, req);
1068 1064
1065 /* this is a bio leak */
1066 WARN_ON(req->bio != NULL);
1067
1069 /* 1068 /*
1070 * Request may not have originated from ll_rw_blk. if not, 1069 * Request may not have originated from ll_rw_blk. if not,
1071 * it didn't come out of our reserved rq pools 1070 * it didn't come out of our reserved rq pools