When opening a new file, check file limit not total number
authorJens Axboe <jens.axboe@oracle.com>
Wed, 14 Mar 2007 07:50:49 +0000 (08:50 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 14 Mar 2007 07:50:49 +0000 (08:50 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
io_u.c

diff --git a/io_u.c b/io_u.c
index e96d495658c7b127b065f92d934f6b76d01cfa3a..8f0cdff718e70267c5a330b7aba9f439c09847ca 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -481,7 +481,7 @@ set_file:
                 * probably not the right place to do this, but see
                 * if we need to open a new file
                 */
                 * probably not the right place to do this, but see
                 * if we need to open a new file
                 */
-               if (td->nr_open_files < td->nr_files &&
+               if (td->nr_open_files < td->open_files &&
                    td->open_files != td->nr_files) {
                        f = find_next_new_file(td);
 
                    td->open_files != td->nr_files) {
                        f = find_next_new_file(td);