Be safe and re-prep requeue io_u's
authorJens Axboe <jens.axboe@oracle.com>
Mon, 19 Feb 2007 19:13:09 +0000 (20:13 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 19 Feb 2007 19:13:09 +0000 (20:13 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
io_u.c

diff --git a/io_u.c b/io_u.c
index 7e5bfcc190585362a075d47b1134fbb049d5f1d2..4f4865b206cabcad74037d06675aaf82445add1a 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -379,7 +379,7 @@ struct io_u *get_io_u(struct thread_data *td)
         * from a requeue, io_u already setup
         */
        if (io_u->file)
         * from a requeue, io_u already setup
         */
        if (io_u->file)
-               return io_u;
+               goto out;
 
        f = get_next_file(td);
        if (!f) {
 
        f = get_next_file(td);
        if (!f) {
@@ -423,6 +423,7 @@ struct io_u *get_io_u(struct thread_data *td)
        /*
         * Set io data pointers.
         */
        /*
         * Set io data pointers.
         */
+out:
        io_u->xfer_buf = io_u->buf;
        io_u->xfer_buflen = io_u->buflen;
 
        io_u->xfer_buf = io_u->buf;
        io_u->xfer_buflen = io_u->buflen;