@@ -615,6 +615,7 @@ static int dio_bio_add_page(struct dio *dio)
*/
static int dio_send_cur_page(struct dio *dio)
{
+ int boundary = dio->boundary;
int ret = 0;
if (dio->bio) {
@@ -627,7 +628,7 @@ static int dio_send_cur_page(struct dio *dio)
* Submit now if the underlying fs is about to perform a
* metadata read
*/
- if (dio->boundary)
+ if (boundary)
dio_bio_submit(dio);
}
@@ -644,6 +645,8 @@ static int dio_send_cur_page(struct dio *dio)
ret = dio_bio_add_page(dio);
BUG_ON(ret != 0);
}
+ } else if (boundary) {
+ dio_bio_submit(dio);
}
out:
return ret;