Currently we do break out of the for() loop, but we also need to
break out of the enclosing do {} while()...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Fred Isaman <iisaman@netapp.com>
pos += req_len;
count -= req_len;
}
- } while (count != 0);
+ } while (count != 0 && result >= 0);
kfree(pagevec);
nfs_release_request(req);
nfs_direct_release_pages(pagevec + i,
npages - i);
+ break;
}
pgbase = 0;
bytes -= req_len;
pos += req_len;
count -= req_len;
}
- } while (count != 0);
+ } while (count != 0 && result >= 0);
kfree(pagevec);