Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251143
b: refs/heads/master
c: 8af1954
h: refs/heads/master
i:
  251141: 2103e6c
  251139: ae40f0c
  251135: c235490
v: v3
  • Loading branch information
Lukas Czerner authored and Jens Axboe committed May 7, 2011
1 parent f9fa6b3 commit 6c2daa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5baebe5c86acd6100536a466905880529f79cf1a
refs/heads/master: 8af1954d172a46a63e5e79dae523a6d74715e458
9 changes: 2 additions & 7 deletions trunk/block/blk-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ static void bio_batch_end_io(struct bio *bio, int err)
{
struct bio_batch *bb = bio->bi_private;

if (err) {
if (err == -EOPNOTSUPP)
set_bit(BIO_EOPNOTSUPP, &bb->flags);
if (err && (err != -EOPNOTSUPP))
clear_bit(BIO_UPTODATE, &bb->flags);
}
if (atomic_dec_and_test(&bb->done))
complete(bb->wait);
bio_put(bio);
Expand Down Expand Up @@ -107,9 +104,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
if (!atomic_dec_and_test(&bb.done))
wait_for_completion(&wait);

if (test_bit(BIO_EOPNOTSUPP, &bb.flags))
ret = -EOPNOTSUPP;
else if (!test_bit(BIO_UPTODATE, &bb.flags))
if (!test_bit(BIO_UPTODATE, &bb.flags))
ret = -EIO;

return ret;
Expand Down

0 comments on commit 6c2daa9

Please sign in to comment.