Fix crash in setup_files() if no files are defined
authorJens Axboe <axboe@fb.com>
Sun, 6 Apr 2014 15:56:10 +0000 (09:56 -0600)
committerJens Axboe <axboe@fb.com>
Sun, 6 Apr 2014 15:56:10 +0000 (09:56 -0600)
commitd1e78e6b0429bac92794fb6f1c24b5078c68da6d
tree0d7b772b74fc577df9e68affeed5d73aca75d030
parentee2e5717d1df0c37279eb94876777ee43d403e58
Fix crash in setup_files() if no files are defined

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>
filesetup.c