Commit 68ae849d authored by David Howells's avatar David Howells

afs: Don't set PG_error on local EINTR or ENOMEM when filling a page

Don't set PG_error on a page if we get local EINTR or ENOMEM when filling a
page for writing.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent ab94f5d0
...@@ -212,7 +212,13 @@ int afs_page_filler(void *data, struct page *page) ...@@ -212,7 +212,13 @@ int afs_page_filler(void *data, struct page *page)
fscache_uncache_page(vnode->cache, page); fscache_uncache_page(vnode->cache, page);
#endif #endif
BUG_ON(PageFsCache(page)); BUG_ON(PageFsCache(page));
if (ret == -EINTR ||
ret == -ENOMEM ||
ret == -ERESTARTSYS ||
ret == -EAGAIN)
goto error; goto error;
goto io_error;
} }
SetPageUptodate(page); SetPageUptodate(page);
...@@ -231,10 +237,12 @@ int afs_page_filler(void *data, struct page *page) ...@@ -231,10 +237,12 @@ int afs_page_filler(void *data, struct page *page)
_leave(" = 0"); _leave(" = 0");
return 0; return 0;
io_error:
SetPageError(page);
goto error;
enomem: enomem:
ret = -ENOMEM; ret = -ENOMEM;
error: error:
SetPageError(page);
unlock_page(page); unlock_page(page);
_leave(" = %d", ret); _leave(" = %d", ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment