[PATCH] mm: enable error injection at add_to_page_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Recently I messed up the error handling in filemap_fault() because of an
unexpected ENOMEM (related to cgroup memory limits) in
add_to_page_cache.  Enable error injection at this point so I can add a
testcase to xfstests to verify I don't mess this up again.

Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
---
 mm/filemap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/filemap.c b/mm/filemap.c
index 4157f858a9c6..a0fe0ce7a0df 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -882,6 +882,7 @@ static int __add_to_page_cache_locked(struct page *page,
 	put_page(page);
 	return xas_error(&xas);
 }
+ALLOW_ERROR_INJECTION(__add_to_page_cache_locked, ERRNO);
 
 /**
  * add_to_page_cache_locked - add a locked page to the pagecache
-- 
2.14.3




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux