fs: move inode_dio_done to the end_io handler

For filesystems that delay their end_io processing we should keep our
i_dio_count until the the processing is done.  Enable this by moving
the inode_dio_done call to the end_io handler if one exist.  Note that
the actual move to the workqueue for ext4 and XFS is not done in
this patch yet, but left to the filesystem maintainers.  At least
for XFS it's not needed yet either as XFS has an internal equivalent
to i_dio_count.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Christoph Hellwig
2011-06-24 14:29:48 -04:00
committed by Al Viro
parent aacfc19c62
commit 72c5052ddc
4 changed files with 13 additions and 3 deletions

View File

@ -1339,6 +1339,9 @@ xfs_end_io_direct_write(
} else {
xfs_finish_ioend_sync(ioend);
}
/* XXX: probably should move into the real I/O completion handler */
inode_dio_done(ioend->io_inode);
}
STATIC ssize_t