mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
block_invalidatepage(): only release page if the full page was invalidated
Prior to commitd47992f86b("mm: change invalidatepage prototype to accept length"), an offset of 0 meant that the full page was being invalidated. After that commit, we need to instead check the length. Jan said: : : The only possible issue is that try_to_release_page() was called more : often than necessary. Otherwise the issue is harmless but still it's good : to have this fixed. Link: http://lkml.kernel.org/r/[email protected] Fixes:d47992f86b("mm: change invalidatepage prototype to accept length") Signed-off-by: Jeff Moyer <[email protected]> Reviewed-by: Jan Kara <[email protected]> Cc: Lukas Czerner <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e8b098fc57
commit
3172485f4f
1 changed files with 1 additions and 1 deletions
|
|
@ -1511,7 +1511,7 @@ void block_invalidatepage(struct page *page, unsigned int offset,
|
|||
* The get_block cached value has been unconditionally invalidated,
|
||||
* so real IO is not possible anymore.
|
||||
*/
|
||||
if (offset == 0)
|
||||
if (length == PAGE_SIZE)
|
||||
try_to_release_page(page, 0);
|
||||
out:
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue