summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ee2e571)
Commit
002fe73409d1e moved the division by o->nr_files outside
of the file loop, so for error cases we could end up with
doing the division without having files defined. Crash ensues.
Signed-off-by: Jens Axboe <axboe@fb.com>
* Calculate per-file size and potential extra size for the
* first files, if needed.
*/
* Calculate per-file size and potential extra size for the
* first files, if needed.
*/
- if (!o->file_size_low) {
+ if (!o->file_size_low && o->nr_files) {
uint64_t all_fs;
fs = o->size / o->nr_files;
uint64_t all_fs;
fs = o->size / o->nr_files;