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: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells 2017-03-16 16:27:48 +00:00
Родитель ab94f5d0dd
Коммит 68ae849d7e
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -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;