direct-io: move aio_complete into ->end_io
authorChristoph Hellwig <hch@lst.de>
Tue, 27 Jul 2010 15:56:06 +0000 (11:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 27 Jul 2010 15:56:06 +0000 (11:56 -0400)
commit552ef8024f909d9b3a7442d0ab0d48a22de24e9e
tree868af331b76e12c8d17b8449094065a069e0d759
parent5c521830cf3dfcf7638d409d8e02ed21020c064f
direct-io: move aio_complete into ->end_io

Filesystems with unwritten extent support must not complete an AIO request
until the transaction to convert the extent has been commited.  That means
the aio_complete calls needs to be moved into the ->end_io callback so
that the filesystem can control when to call it exactly.

This makes a bit of a mess out of dio_complete and the ->end_io callback
prototype even more complicated.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/direct-io.c
fs/ext4/inode.c
fs/ocfs2/aops.c
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_aops.h
include/linux/fs.h