diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-03 14:33:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-03 14:33:38 -0700 |
commit | 51102ee5b8853d230e534cbcd0d888f0134738a3 (patch) | |
tree | 5a34844b3040dbc099dd0d3ebc2e6fca0bc65855 /fs/ext4/inode.c | |
parent | 54161df1fb1469d66bce3a3b14d8281adbb69263 (diff) | |
parent | 6b0a2996a0c023d84bc27ec7528a6e54cb5ea264 (diff) |
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: (49 commits)
xfs simplify and speed up direct I/O completions
xfs: move aio completion after unwritten extent conversion
direct-io: move aio_complete into ->end_io
xfs: fix big endian build
xfs: clean up xfs_bmap_get_bp
xfs: simplify xfs_truncate_file
xfs: kill the b_strat callback in xfs_buf
xfs: remove obsolete osyncisosync mount option
xfs: clean up filestreams helpers
xfs: fix gcc 4.6 set but not read and unused statement warnings
xfs: Fix build when CONFIG_XFS_POSIX_ACL=n
xfs: fix unsigned underflow in xfs_free_eofblocks
xfs: use GFP_NOFS for page cache allocation
xfs: fix memory reclaim recursion deadlock on locked inode buffer
xfs: fix xfs_trans_add_item() lockdep warnings
xfs: simplify and remove xfs_ireclaim
xfs: don't block on buffer read errors
xfs: move inode shrinker unregister even earlier
xfs: remove a dmapi leftover
xfs: writepage always has buffers
...
Diffstat (limited to 'fs/ext4/inode.c')
-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 42272d67955..0afc8c1d8cf 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) } static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, - ssize_t size, void *private) + ssize_t size, void *private, int ret, + bool is_async) { ext4_io_end_t *io_end = iocb->private; struct workqueue_struct *wq; @@ -3784,7 +3785,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, /* if not async direct IO or dio with 0 bytes write, just return */ if (!io_end || !size) - return; + goto out; ext_debug("ext4_end_io_dio(): io_end 0x%p" "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, if (io_end->flag != EXT4_IO_UNWRITTEN){ ext4_free_io_end(io_end); iocb->private = NULL; - return; + goto out; } io_end->offset = offset; @@ -3812,6 +3813,9 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, list_add_tail(&io_end->list, &ei->i_completed_io_list); spin_unlock_irqrestore(&ei->i_completed_io_lock, flags); iocb->private = NULL; +out: + if (is_async) + aio_complete(iocb, ret, 0); } static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate) |