linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: akpm@linux-foundation.org, kernel-team@fb.com, linux-mm@kvack.org
Subject: [PATCH] mm: enable error injection at add_to_page_cache
Date: Wed,  3 Apr 2019 11:26:04 -0400	[thread overview]
Message-ID: <20190403152604.14008-1-josef@toxicpanda.com> (raw)

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


             reply	other threads:[~2019-04-03 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 15:26 Josef Bacik [this message]
2019-04-04 11:41 ` William Kucharski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190403152604.14008-1-josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-team@fb.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox