Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251142
b: refs/heads/master
c: 5baebe5
h: refs/heads/master
v: v3
  • Loading branch information
Lukas Czerner authored and Jens Axboe committed May 7, 2011
1 parent 2103e6c commit f9fa6b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 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: 5dba3089ed03f84b84c6c739df8330112f04a15d
refs/heads/master: 5baebe5c86acd6100536a466905880529f79cf1a
14 changes: 0 additions & 14 deletions trunk/block/blk-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
bb.flags = 1 << BIO_UPTODATE;
bb.wait = &wait;

submit:
ret = 0;
while (nr_sects != 0) {
bio = bio_alloc(gfp_mask,
Expand All @@ -157,9 +156,6 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,

while (nr_sects != 0) {
sz = min((sector_t) PAGE_SIZE >> 9 , nr_sects);
if (sz == 0)
/* bio has maximum size possible */
break;
ret = bio_add_page(bio, ZERO_PAGE(0), sz << 9, 0);
nr_sects -= ret >> 9;
sector += ret >> 9;
Expand All @@ -179,16 +175,6 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
/* One of bios in the batch was completed with error.*/
ret = -EIO;

if (ret)
goto out;

if (test_bit(BIO_EOPNOTSUPP, &bb.flags)) {
ret = -EOPNOTSUPP;
goto out;
}
if (nr_sects != 0)
goto submit;
out:
return ret;
}
EXPORT_SYMBOL(blkdev_issue_zeroout);

0 comments on commit f9fa6b3

Please sign in to comment.