From: Eryu Guan Date: Mon, 18 Sep 2017 18:39:23 +0000 (-0700) Subject: xfs: report zeroed or not correctly in xfs_zero_range() X-Git-Tag: Ubuntu-4.13.0-18.21~147 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f16078e07a62ea8aa4aeb1c365463f8e0de745be;p=mirror_ubuntu-artful-kernel.git xfs: report zeroed or not correctly in xfs_zero_range() BugLink: http://bugs.launchpad.net/bugs/1731951 commit d20a5e3851969fa685f118a80e4df670255a4e8d upstream. The 'did_zero' param of xfs_zero_range() was not passed to iomap_zero_range() correctly. This was introduced by commit 7bb41db3ea16 ("xfs: handle 64-bit length in xfs_iozero"), and found by code inspection. Signed-off-by: Eryu Guan Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Greg Kroah-Hartman Signed-off-by: Stefan Bader Signed-off-by: Thadeu Lima de Souza Cascardo --- diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 62db8ffa83b9..77a2024ea672 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -58,7 +58,7 @@ xfs_zero_range( xfs_off_t count, bool *did_zero) { - return iomap_zero_range(VFS_I(ip), pos, count, NULL, &xfs_iomap_ops); + return iomap_zero_range(VFS_I(ip), pos, count, did_zero, &xfs_iomap_ops); } int