* [PATCH] mm: enable error injection at add_to_page_cache
@ 2019-04-03 15:26 Josef Bacik
2019-04-04 11:41 ` William Kucharski
0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2019-04-03 15:26 UTC (permalink / raw)
To: akpm, kernel-team, linux-mm
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@toxicpanda.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: enable error injection at add_to_page_cache
2019-04-03 15:26 [PATCH] mm: enable error injection at add_to_page_cache Josef Bacik
@ 2019-04-04 11:41 ` William Kucharski
0 siblings, 0 replies; 2+ messages in thread
From: William Kucharski @ 2019-04-04 11:41 UTC (permalink / raw)
To: Josef Bacik; +Cc: akpm, kernel-team, linux-mm
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
> On Apr 3, 2019, at 9:26 AM, Josef Bacik <josef@toxicpanda.com> wrote:
>
> ALLOW_ERROR_INJECTION
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-04 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 15:26 [PATCH] mm: enable error injection at add_to_page_cache Josef Bacik
2019-04-04 11:41 ` William Kucharski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox