Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix invalidate_inode_pages2_range() to not clear ret
DIO invalidates page cache through invalidate_inode_pages2_range(). invalidate_inode_pages2_range() sets ret=-EIO when invalidate_complete_page2() fails, but this ret is cleared if do_launder_page() succeed on a page of next index. In this case, dio is carried out even if invalidate_complete_page2() fails on some pages. This can cause inconsistency between memory and blocks on HDD because the page cache still exists. [[email protected]: coding-style fixes] Signed-off-by: Hisashi Hifumi <[email protected]> Cc: Badari Pulavarty <[email protected]> Cc: Ken Chen <[email protected]> Cc: Zach Brown <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: "J. Bruce Fields" <[email protected]> Cc: Chuck Lever <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information