[XFS] kill BMAPI_UNWRITTEN
There is no reason to go through xfs_iomap for the BMAPI_UNWRITTEN because it has nothing in common with the other cases. Instead check for the shutdown filesystem in xfs_end_bio_unwritten and perform a direct call to xfs_iomap_write_unwritten (which should be renamed to something more sensible one day) SGI-PV: 970241 SGI-Modid: xfs-linux-melb:xfs-kern:29681a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Donald Douwsma <donaldd@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
This commit is contained in:
committed by
Lachlan McIlroy
parent
6214ed4461
commit
7642861b7e
@@ -238,12 +238,13 @@ xfs_end_bio_unwritten(
|
||||
{
|
||||
xfs_ioend_t *ioend =
|
||||
container_of(work, xfs_ioend_t, io_work);
|
||||
struct xfs_inode *ip = XFS_I(ioend->io_inode);
|
||||
xfs_off_t offset = ioend->io_offset;
|
||||
size_t size = ioend->io_size;
|
||||
|
||||
if (likely(!ioend->io_error)) {
|
||||
xfs_bmap(XFS_I(ioend->io_inode), offset, size,
|
||||
BMAPI_UNWRITTEN, NULL, NULL);
|
||||
if (!XFS_FORCED_SHUTDOWN(ip->i_mount))
|
||||
xfs_iomap_write_unwritten(ip, offset, size);
|
||||
xfs_setfilesize(ioend);
|
||||
}
|
||||
xfs_destroy_ioend(ioend);
|
||||
|
Reference in New Issue
Block a user