summaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-03-16 16:27:48 +0000
committerDavid Howells <dhowells@redhat.com>2017-03-16 16:27:48 +0000
commit68ae849d7e674b83610bc7fdf74b21621a09b9ac (patch)
tree9e7f041cd1061781c9271c9a48637a8f6938ad5a /fs/afs
parentab94f5d0dd6fd82e7eeca5e7c8096eaea0a0261f (diff)
downloadlinux-stable-68ae849d7e674b83610bc7fdf74b21621a09b9ac.tar.gz
linux-stable-68ae849d7e674b83610bc7fdf74b21621a09b9ac.tar.bz2
linux-stable-68ae849d7e674b83610bc7fdf74b21621a09b9ac.zip
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>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/file.c12
1 files 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;