summaryrefslogtreecommitdiffstats
path: root/Kbuild
diff options
context:
space:
mode:
authorXiaoming Ni <nixiaoming@huawei.com>2020-03-20 11:15:11 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-03-24 23:02:30 +0100
commit4e4a9a828af29785fad12ecc11583769e1282024 (patch)
tree9b992e2e78e1ce48d37ff070d14caca0cc248a06 /Kbuild
parentf1ffdbfad00a3c424cadfd307b5bb9c466638532 (diff)
downloadlinux-4e4a9a828af29785fad12ecc11583769e1282024.tar.bz2
mtd: Fix issue where write_cached_data() fails but write() still returns success
The following sequence is problematic: mtdblock_flush() -->write_cached_data() --->erase_write() mtdblock: erase of region [0x40000, 0x20000] on "xxx" failed Problem is: mtdblock_flush() always returns 0. Indeed, even if write_cached_data() fails and data is not written to the device, syscall_write() still returns success. Avoid this situation by actually returning the error coming out of write_cached_data(). Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/1584674111-101462-1-git-send-email-nixiaoming@huawei.com
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions