Commit d0642c69 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix a possible bio-leak on I/O submission, in a case where no I/O was required.

SGI Modid: 2.5.x-xfs:slinx:163119a
parent 364c4073
......@@ -1395,7 +1395,6 @@ _pagebuf_ioapply(
break;
offset = 0;
sector += nbytes >> BBSHIFT;
size -= nbytes;
total_nr_pages--;
......@@ -1403,15 +1402,11 @@ _pagebuf_ioapply(
submit_io:
if (likely(bio->bi_size)) {
if (pb->pb_flags & PBF_READ) {
submit_bio(READ, bio);
} else {
submit_bio(WRITE, bio);
}
submit_bio((pb->pb_flags & PBF_READ) ? READ : WRITE, bio);
if (size)
goto next_chunk;
} else {
bio_put(bio);
pagebuf_ioerror(pb, EIO);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment