[Intel-gfx] [PATCH 2/5] shmemfs: Use redirty_page_for_writepage()

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 5 12:44:35 CET 2014


"When we cannot write a page we should use redirty_page_for_writepage()
instead of plain set_page_dirty(). That tells writeback code we have
problems, redirties only the page (redirtying buffers is not needed),
and updates mm accounting of failed page writes."

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Hugh Dickins <hughd at google.com>
---
 mm/shmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/shmem.c b/mm/shmem.c
index 142b0bc085e1..18aa88eff8e3 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -872,7 +872,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
 	mutex_unlock(&shmem_swaplist_mutex);
 	swapcache_free(swap, NULL);
 redirty:
-	set_page_dirty(page);
+	redirty_page_for_writepage(wbc, page);
 	if (wbc->for_reclaim)
 		return AOP_WRITEPAGE_ACTIVATE;	/* Return with page locked */
 	unlock_page(page);
-- 
1.9.0




More information about the Intel-gfx mailing list