mm: enable error injection at add_to_page_cache
Subsystems (2)
PATCH 1/1 mm: enable error injection at add_to_page_cache
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 <[email protected]>
--- mm/filemap.c | 1 + 1 file changed, 1 insertion(+)
mm/filemap.c +1 -0
@@ -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
Signature · 1 line
2.14.3
Reviewed-by William Kucharski <[email protected]>
Quoted 3 lines · Josef Bacik
ALLOW_ERROR_INJECTION