mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] set_page_dirty() return value fixes
We need set_page_dirty() to return true if it actually transitioned the page from a clean to dirty state. This wasn't right in a couple of places. Do a kernel-wide audit, fix things up. This leaves open the possibility of returning a negative errno from set_page_dirty() sometime in the future. But we don't do that at present. Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fa5a734e40
commit
4741c9fd36
5 changed files with 11 additions and 9 deletions
|
|
@ -186,7 +186,8 @@ static int ramdisk_writepages(struct address_space *mapping,
|
|||
*/
|
||||
static int ramdisk_set_page_dirty(struct page *page)
|
||||
{
|
||||
SetPageDirty(page);
|
||||
if (!TestSetPageDirty(page))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue