diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-08-04 09:14:38 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-04 09:14:38 -0400 |
commit | d790d4d583aeaed9fc6f8a9f4d9f8ce6b1c15c7f (patch) | |
tree | 854ab394486288d40fa8179cbfaf66e8bdc44b0f /fs/ext4 | |
parent | 73b2c7165b76b20eb1290e7efebc33cfd21db1ca (diff) | |
parent | 3a09b1be53d23df780a0cd0e4087a05e2ca4a00c (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 42272d67955a..0afc8c1d8cf3 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3775,7 +3775,8 @@ static ext4_io_end_t *ext4_init_io_end (struct inode *inode, gfp_t flags) | |||
3775 | } | 3775 | } |
3776 | 3776 | ||
3777 | static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, | 3777 | static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, |
3778 | ssize_t size, void *private) | 3778 | ssize_t size, void *private, int ret, |
3779 | bool is_async) | ||
3779 | { | 3780 | { |
3780 | ext4_io_end_t *io_end = iocb->private; | 3781 | ext4_io_end_t *io_end = iocb->private; |
3781 | struct workqueue_struct *wq; | 3782 | struct workqueue_struct *wq; |
@@ -3784,7 +3785,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, | |||
3784 | 3785 | ||
3785 | /* if not async direct IO or dio with 0 bytes write, just return */ | 3786 | /* if not async direct IO or dio with 0 bytes write, just return */ |
3786 | if (!io_end || !size) | 3787 | if (!io_end || !size) |
3787 | return; | 3788 | goto out; |
3788 | 3789 | ||
3789 | ext_debug("ext4_end_io_dio(): io_end 0x%p" | 3790 | ext_debug("ext4_end_io_dio(): io_end 0x%p" |
3790 | "for inode %lu, iocb 0x%p, offset %llu, size %llu\n", | 3791 | "for inode %lu, iocb 0x%p, offset %llu, size %llu\n", |
@@ -3795,7 +3796,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, | |||
3795 | if (io_end->flag != EXT4_IO_UNWRITTEN){ | 3796 | if (io_end->flag != EXT4_IO_UNWRITTEN){ |
3796 | ext4_free_io_end(io_end); | 3797 | ext4_free_io_end(io_end); |
3797 | iocb->private = NULL; | 3798 | iocb->private = NULL; |
3798 | return; | 3799 | goto out; |
3799 | } | 3800 | } |
3800 | 3801 | ||
3801 | io_end->offset = offset; | 3802 | io_end->offset = offset; |
@@ -3812,6 +3813,9 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, | |||
3812 | list_add_tail(&io_end->list, &ei->i_completed_io_list); | 3813 | list_add_tail(&io_end->list, &ei->i_completed_io_list); |
3813 | spin_unlock_irqrestore(&ei->i_completed_io_lock, flags); | 3814 | spin_unlock_irqrestore(&ei->i_completed_io_lock, flags); |
3814 | iocb->private = NULL; | 3815 | iocb->private = NULL; |
3816 | out: | ||
3817 | if (is_async) | ||
3818 | aio_complete(iocb, ret, 0); | ||
3815 | } | 3819 | } |
3816 | 3820 | ||
3817 | static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate) | 3821 | static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate) |