Avoid a possible busywait.


 fs/direct-io.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN fs/direct-io.c~dio-aio-fixes-fixes fs/direct-io.c
--- 25/fs/direct-io.c~dio-aio-fixes-fixes	2003-11-11 21:13:10.000000000 -0800
+++ 25-akpm/fs/direct-io.c	2003-11-11 21:14:42.000000000 -0800
@@ -1005,8 +1005,10 @@ direct_io_worker(int rw, struct kiocb *i
 			 * before returning to fallback on buffered I/O
 			 */
 			set_current_state(TASK_UNINTERRUPTIBLE);
-			while (atomic_read(&dio->bio_count))
+			while (atomic_read(&dio->bio_count)) {
 				io_schedule();
+				set_current_state(TASK_UNINTERRUPTIBLE);
+			}
 			set_current_state(TASK_RUNNING);
 			dio->waiter = NULL;
 		}

_