Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44006
b: refs/heads/master
c: 17a7b1d
h: refs/heads/master
v: v3
  • Loading branch information
Zach Brown authored and Linus Torvalds committed Dec 10, 2006
1 parent 81d2b60 commit d3e4362
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d544bb4d9019c3a0d7ee4af1e4bbbd61a6e16dc
refs/heads/master: 17a7b1d74b1207f8f1af40b5d184989076d08f8b
8 changes: 3 additions & 5 deletions trunk/fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ static struct bio *dio_await_one(struct dio *dio)
if (dio->bio_list == NULL) {
dio->waiter = current;
spin_unlock_irqrestore(&dio->bio_lock, flags);
blk_run_address_space(dio->inode->i_mapping);
io_schedule();
spin_lock_irqsave(&dio->bio_lock, flags);
dio->waiter = NULL;
Expand Down Expand Up @@ -450,9 +449,6 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio)
*/
static void dio_await_completion(struct dio *dio)
{
if (dio->bio)
dio_bio_submit(dio);

/*
* The bio_lock is not held for the read of bio_count.
* This is ok since it is the dio_bio_complete() that changes
Expand Down Expand Up @@ -1085,6 +1081,9 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
if (dio->bio)
dio_bio_submit(dio);

/* All IO is now issued, send it on its way */
blk_run_address_space(inode->i_mapping);

/*
* It is possible that, we return short IO due to end of file.
* In that case, we need to release all the pages we got hold on.
Expand Down Expand Up @@ -1113,7 +1112,6 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
if (ret == 0)
ret = dio->result;
finished_one_bio(dio); /* This can free the dio */
blk_run_address_space(inode->i_mapping);
if (should_wait) {
unsigned long flags;
/*
Expand Down

0 comments on commit d3e4362

Please sign in to comment.