Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213181
b: refs/heads/master
c: 1e87901
h: refs/heads/master
i:
  213179: cea167b
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Sep 10, 2010
1 parent 447282a commit fba25a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fed947cb311e5aa51781d316cefca836352f6ce
refs/heads/master: 1e87901e189c8f01750d67485009fe3827c691bf
13 changes: 13 additions & 0 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,19 @@ static inline void __generic_make_request(struct bio *bio)
if (bio_check_eod(bio, nr_sectors))
goto end_io;

/*
* Filter flush bio's early so that make_request based
* drivers without flush support don't have to worry
* about them.
*/
if ((bio->bi_rw & (REQ_FLUSH | REQ_FUA)) && !q->flush_flags) {
bio->bi_rw &= ~(REQ_FLUSH | REQ_FUA);
if (!nr_sectors) {
err = 0;
goto end_io;
}
}

if ((bio->bi_rw & REQ_DISCARD) &&
(!blk_queue_discard(q) ||
((bio->bi_rw & REQ_SECURE) &&
Expand Down

0 comments on commit fba25a8

Please sign in to comment.