iomap: iomap_write_failed fix
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 6 May 2022 01:19:13 +0000 (18:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:55 +0000 (10:22 +0200)
commit76f5bd1eed01d4f87768ecd11c5a3e1788997be4
tree279a09abb6a43306845eb9bd9b23360fb1259861
parente7308391df97c1891b642cfb4b9be8a9a0a4ff26
iomap: iomap_write_failed fix

[ Upstream commit b71450e2cc4b3c79f33c5bd276d152af9bd54f79 ]

The @lend parameter of truncate_pagecache_range() should be the offset
of the last byte of the hole, not the first byte beyond it.

Fixes: ae259a9c8593 ("fs: introduce iomap infrastructure")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/iomap/buffered-io.c