diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-07-06 13:45:24 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-07-06 13:45:24 -0400 |
commit | a2262d8a231e92742651859a10c9a4430a5e899a (patch) | |
tree | b5a823e3f6a3f60e1dd995f113caf0b350228d84 /block/blk-core.c | |
parent | ef06f55a5c936a395f3ee2e1237bbebdb4396c65 (diff) | |
parent | 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff) | |
download | linux-a2262d8a231e92742651859a10c9a4430a5e899a.tar.gz linux-a2262d8a231e92742651859a10c9a4430a5e899a.tar.xz |
Merge branch 'master' into for-linus
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index f84cce42fc58..f0640d7f800f 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1149,13 +1149,10 @@ void init_request_from_bio(struct request *req, struct bio *bio) else req->cmd_flags |= bio->bi_rw & REQ_FAILFAST_MASK; - if (unlikely(bio_rw_flagged(bio, BIO_RW_DISCARD))) { + if (bio_rw_flagged(bio, BIO_RW_DISCARD)) req->cmd_flags |= REQ_DISCARD; - if (bio_rw_flagged(bio, BIO_RW_BARRIER)) - req->cmd_flags |= REQ_SOFTBARRIER; - } else if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) + if (bio_rw_flagged(bio, BIO_RW_BARRIER)) req->cmd_flags |= REQ_HARDBARRIER; - if (bio_rw_flagged(bio, BIO_RW_SYNCIO)) req->cmd_flags |= REQ_RW_SYNC; if (bio_rw_flagged(bio, BIO_RW_META)) @@ -1586,7 +1583,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 (bio_has_data(bio)) { + if (bio_has_data(bio) && !(rw & (1 << BIO_RW_DISCARD))) { if (rw & WRITE) { count_vm_events(PGPGOUT, count); } else { |