hrev46509 adds 1 changeset to branch 'master' old head: 664e3fba9b2888c414e7bf9feca22bf71c716194 new head: e36ad522d60cd032a1ab15229b1a56bd7288c348 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=e36ad52+%5E664e3fb ---------------------------------------------------------------------------- e36ad52: Fix 24d0e21f51e88ab35cc3f1c1750741dfeb40933d correctly CreateSubRequest() could still return an error and break out of the while loop without exiting the outer for loop. Instead we reset the error code before entering the for loop. [ François Revol <revol@xxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev46509 Commit: e36ad522d60cd032a1ab15229b1a56bd7288c348 URL: http://cgit.haiku-os.org/haiku/commit/?id=e36ad52 Author: François Revol <revol@xxxxxxx> Date: Sun Dec 8 10:34:07 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 6 insertions(+), 1 deletion(-) src/system/kernel/fs/vfs_request_io.cpp | 7 ++++++- ---------------------------------------------------------------------------- diff --git a/src/system/kernel/fs/vfs_request_io.cpp b/src/system/kernel/fs/vfs_request_io.cpp index 1aefcc3..ffd05a7 100644 --- a/src/system/kernel/fs/vfs_request_io.cpp +++ b/src/system/kernel/fs/vfs_request_io.cpp @@ -163,9 +163,14 @@ do_iterative_fd_io_iterate(void* _cookie, io_request* request, } TRACE_RIO("[%ld] got %zu file vecs\n", find_thread(NULL), vecCount); + // Reset the error code for the loop below + error = B_OK; + // create subrequests for the file vecs we've got size_t subRequestCount = 0; - for (size_t i = 0; i < vecCount && subRequestCount < kMaxSubRequests; i++) { + for (size_t i = 0; + i < vecCount && subRequestCount < kMaxSubRequests && error == B_OK; + i++) { off_t vecOffset = vecs[i].offset; off_t vecLength = min_c(vecs[i].length, (off_t)requestLength); TRACE_RIO("[%ld] vec %lu offset: %lld, length: %lld\n",