]> err.no Git - linux-2.6/blobdiff - fs/direct-io.c
[POWERPC] Copy over headers from arch/ppc to arch/powerpc that we need
[linux-2.6] / fs / direct-io.c
index 8aa2d8b04ef155ea91a718939aa15abe020a845e..6874785bb65a846bafc6eb4242875bac9439ba3c 100644 (file)
@@ -439,7 +439,7 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio)
  * Wait on and process all in-flight BIOs.  This must only be called once
  * all bios have been issued so that the refcount can only decrease.
  * This just waits for all bios to make it through dio_bio_complete.  IO
- * errors are propogated through dio->io_error and should be propogated via
+ * errors are propagated through dio->io_error and should be propagated via
  * dio_complete().
  */
 static void dio_await_completion(struct dio *dio)
@@ -974,6 +974,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
        dio->get_block = get_block;
        dio->end_io = end_io;
        dio->map_bh.b_private = NULL;
+       dio->map_bh.b_state = 0;
        dio->final_block_in_bio = -1;
        dio->next_block_for_io = -1;
 
@@ -1106,7 +1107,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
        spin_lock_irqsave(&dio->bio_lock, flags);
        ret2 = --dio->refcount;
        spin_unlock_irqrestore(&dio->bio_lock, flags);
-       BUG_ON(!dio->is_async && ret2 != 0);
+
        if (ret2 == 0) {
                ret = dio_complete(dio, offset, ret);
                kfree(dio);