diff options
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r-- | block/blk-lib.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c index 9260cb0b209b..d7a98d3ed4aa 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c | |||
@@ -140,7 +140,6 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, | |||
140 | bb.flags = 1 << BIO_UPTODATE; | 140 | bb.flags = 1 << BIO_UPTODATE; |
141 | bb.wait = &wait; | 141 | bb.wait = &wait; |
142 | 142 | ||
143 | submit: | ||
144 | ret = 0; | 143 | ret = 0; |
145 | while (nr_sects != 0) { | 144 | while (nr_sects != 0) { |
146 | bio = bio_alloc(gfp_mask, | 145 | bio = bio_alloc(gfp_mask, |
@@ -157,9 +156,6 @@ submit: | |||
157 | 156 | ||
158 | while (nr_sects != 0) { | 157 | while (nr_sects != 0) { |
159 | sz = min((sector_t) PAGE_SIZE >> 9 , nr_sects); | 158 | sz = min((sector_t) PAGE_SIZE >> 9 , nr_sects); |
160 | if (sz == 0) | ||
161 | /* bio has maximum size possible */ | ||
162 | break; | ||
163 | ret = bio_add_page(bio, ZERO_PAGE(0), sz << 9, 0); | 159 | ret = bio_add_page(bio, ZERO_PAGE(0), sz << 9, 0); |
164 | nr_sects -= ret >> 9; | 160 | nr_sects -= ret >> 9; |
165 | sector += ret >> 9; | 161 | sector += ret >> 9; |
@@ -179,16 +175,6 @@ submit: | |||
179 | /* One of bios in the batch was completed with error.*/ | 175 | /* One of bios in the batch was completed with error.*/ |
180 | ret = -EIO; | 176 | ret = -EIO; |
181 | 177 | ||
182 | if (ret) | ||
183 | goto out; | ||
184 | |||
185 | if (test_bit(BIO_EOPNOTSUPP, &bb.flags)) { | ||
186 | ret = -EOPNOTSUPP; | ||
187 | goto out; | ||
188 | } | ||
189 | if (nr_sects != 0) | ||
190 | goto submit; | ||
191 | out: | ||
192 | return ret; | 178 | return ret; |
193 | } | 179 | } |
194 | EXPORT_SYMBOL(blkdev_issue_zeroout); | 180 | EXPORT_SYMBOL(blkdev_issue_zeroout); |