Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1596340 > unrolled thread

[PATCH 22/27] afs: Don't set PG_error on local EINTR or ENOMEM when filling a page

Started byDavid Howells <dhowells@redhat.com>
First post2017-03-09 20:00 +0100
Last post2017-03-09 20:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 22/27] afs: Don't set PG_error on local EINTR or ENOMEM when  filling a page David Howells <dhowells@redhat.com> - 2017-03-09 20:00 +0100

#1596340 — [PATCH 22/27] afs: Don't set PG_error on local EINTR or ENOMEM when filling a page

FromDavid Howells <dhowells@redhat.com>
Date2017-03-09 20:00 +0100
Subject[PATCH 22/27] afs: Don't set PG_error on local EINTR or ENOMEM when filling a page
Message-ID<tjbs8-I0-81@gated-at.bofh.it>
Don't set PG_error on a page if we get local EINTR or ENOMEM when filling a
page for writing.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 fs/afs/file.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/fs/afs/file.c b/fs/afs/file.c
index b5829443ff69..0d5b8508869b 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -212,7 +212,13 @@ int afs_page_filler(void *data, struct page *page)
 			fscache_uncache_page(vnode->cache, page);
 #endif
 			BUG_ON(PageFsCache(page));
-			goto error;
+
+			if (ret == -EINTR ||
+			    ret == -ENOMEM ||
+			    ret == -ERESTARTSYS ||
+			    ret == -EAGAIN)
+				goto error;
+			goto io_error;
 		}
 
 		SetPageUptodate(page);
@@ -231,10 +237,12 @@ int afs_page_filler(void *data, struct page *page)
 	_leave(" = 0");
 	return 0;
 
+io_error:
+	SetPageError(page);
+	goto error;
 enomem:
 	ret = -ENOMEM;
 error:
-	SetPageError(page);
 	unlock_page(page);
 	_leave(" = %d", ret);
 	return ret;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web