diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-21 22:06:24 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-22 08:57:21 +0100 |
commit | 17c4b989a5d00fe5fc84c528bbd59583c45d80d0 (patch) | |
tree | dbe49644ba01922270c74b85df7f9499cdfe9b40 /Makefile | |
parent | cee4c2a064796db730c572bf8973e799c1b89b02 (diff) | |
download | barebox-17c4b989a5d00fe5fc84c528bbd59583c45d80d0.tar.gz barebox-17c4b989a5d00fe5fc84c528bbd59583c45d80d0.tar.xz |
block: Do not write past block device boundary during a flush
When calling I/O functions of underlying block device driver we always
need to make sure that its size is small enough to not go past
device's boundary. Not only in get_chunk() and block_cache(), but in
writebuffer_flush() as well. Since the same code is used in three
different places, move it into a subroutine and adjust all of the
calls to ->write()/->read() accordingly.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions