iomap: fix a regression for partial write errors
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Jul 2023 15:49:57 +0000 (08:49 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 17 Jul 2023 15:49:57 +0000 (08:49 -0700)
commit20c64ec83a9f779a750bbbcc1d07d065702313a5
treedfa675f384d91df8290bf1627ca603955578aad4
parentfdf0eaf11452d72945af31804e2a1048ee1b574c
iomap: fix a regression for partial write errors

When write* wrote some data it should return the amount of written data
and not the error code that caused it to stop.  Fix a recent regression
in iomap_file_buffered_write that caused it to return the errno instead.

Fixes: 219580eea1ee ("iomap: update ki_pos in iomap_file_buffered_write")
Reported-by: kernel test robot <oliver.sang@intel.com>
Reported-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.harjani@gmail.com>
fs/iomap/buffered-io.c