|
@@ -2796,9 +2796,6 @@ out:
|
|
|
|
|
|
/* queue the work to convert unwritten extents to written */
|
|
|
queue_work(wq, &io_end->work);
|
|
|
-
|
|
|
- /* XXX: probably should move into the real I/O completion handler */
|
|
|
- inode_dio_done(inode);
|
|
|
}
|
|
|
|
|
|
static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate)
|
|
@@ -2922,9 +2919,12 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
|
|
|
iocb->private = NULL;
|
|
|
EXT4_I(inode)->cur_aio_dio = NULL;
|
|
|
if (!is_sync_kiocb(iocb)) {
|
|
|
- iocb->private = ext4_init_io_end(inode, GFP_NOFS);
|
|
|
- if (!iocb->private)
|
|
|
+ ext4_io_end_t *io_end =
|
|
|
+ ext4_init_io_end(inode, GFP_NOFS);
|
|
|
+ if (!io_end)
|
|
|
return -ENOMEM;
|
|
|
+ io_end->flag |= EXT4_IO_END_DIRECT;
|
|
|
+ iocb->private = io_end;
|
|
|
/*
|
|
|
* we save the io structure for current async
|
|
|
* direct IO, so that later ext4_map_blocks()
|