mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
brd: fix cacheflushing
brd is missing a flush_dcache_page. On 2nd thoughts, perhaps it is the pagecache's responsibility to flush user virtual aliases (the driver of course should flush kernel virtual mappings)... but anyway, there already exists cache flushing for one direction of transfer, so we should add the other. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
dfbc4752ea
commit
c2572f2b4f
1 changed files with 3 additions and 1 deletions
|
@ -275,8 +275,10 @@ static int brd_do_bvec(struct brd_device *brd, struct page *page,
|
|||
if (rw == READ) {
|
||||
copy_from_brd(mem + off, brd, sector, len);
|
||||
flush_dcache_page(page);
|
||||
} else
|
||||
} else {
|
||||
flush_dcache_page(page);
|
||||
copy_to_brd(brd, mem + off, sector, len);
|
||||
}
|
||||
kunmap_atomic(mem, KM_USER0);
|
||||
|
||||
out:
|
||||
|
|
Loading…
Reference in a new issue