projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
block: use bio_has_data() in the IO completion path
[deliverable/linux.git]
/
block
/
blk-core.c
diff --git
a/block/blk-core.c
b/block/blk-core.c
index 4889eb86a39e883c040d53627c98e61a96cd0e26..b5776c1fd52aca777ae9dc185a936121caf0e8a9 100644
(file)
--- a/
block/blk-core.c
+++ b/
block/blk-core.c
@@
-582,6
+582,8
@@
blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
q->sg_reserved_size = INT_MAX;
q->sg_reserved_size = INT_MAX;
+ blk_set_cmd_filter_defaults(&q->cmd_filter);
+
/*
* all done
*/
/*
* all done
*/
@@
-1488,10
+1490,7
@@
void submit_bio(int rw, struct bio *bio)
* If it's a regular read/write or a barrier with data attached,
* go through the normal accounting stuff before submission.
*/
* If it's a regular read/write or a barrier with data attached,
* go through the normal accounting stuff before submission.
*/
- if (!bio_empty_barrier(bio)) {
-
- BIO_BUG_ON(!bio->bi_size);
- BIO_BUG_ON(!bio->bi_io_vec);
+ if (bio_has_data(bio)) {
if (rw & WRITE) {
count_vm_events(PGPGOUT, count);
if (rw & WRITE) {
count_vm_events(PGPGOUT, count);
@@
-1886,7
+1885,7
@@
static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
struct request_queue *q = rq->q;
unsigned long flags = 0UL;
struct request_queue *q = rq->q;
unsigned long flags = 0UL;
- if (b
lk_fs_request(rq) || blk_pc_request(rq
)) {
+ if (b
io_has_data(rq->bio
)) {
if (__end_that_request_first(rq, error, nr_bytes))
return 1;
if (__end_that_request_first(rq, error, nr_bytes))
return 1;
@@
-1944,10
+1943,9
@@
EXPORT_SYMBOL_GPL(blk_end_request);
**/
int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{
**/
int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{
- if (blk_fs_request(rq) || blk_pc_request(rq)) {
- if (__end_that_request_first(rq, error, nr_bytes))
- return 1;
- }
+ if (bio_has_data(rq->bio) &&
+ __end_that_request_first(rq, error, nr_bytes))
+ return 1;
add_disk_randomness(rq->rq_disk);
add_disk_randomness(rq->rq_disk);
This page took
0.025335 seconds
and
5
git commands to generate.