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


Groups > linux.kernel > #1622061 > unrolled thread

[PATCH v2 16/17] cifs: set mapping error when page writeback fails in writepage or launder_pages

Started byJeff Layton <jlayton@redhat.com>
First post2017-04-12 14:10 +0200
Last post2017-04-12 14:10 +0200
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 v2 16/17] cifs: set mapping error when page writeback fails in writepage or launder_pages Jeff Layton <jlayton@redhat.com> - 2017-04-12 14:10 +0200

#1622061 — [PATCH v2 16/17] cifs: set mapping error when page writeback fails in writepage or launder_pages

FromJeff Layton <jlayton@redhat.com>
Date2017-04-12 14:10 +0200
Subject[PATCH v2 16/17] cifs: set mapping error when page writeback fails in writepage or launder_pages
Message-ID<tvpfZ-4hS-47@gated-at.bofh.it>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/cifs/file.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index aa3debbba826..d9a3657b8d43 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2234,14 +2234,16 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc)
 	set_page_writeback(page);
 retry_write:
 	rc = cifs_partialpagewrite(page, 0, PAGE_SIZE);
-	if (rc == -EAGAIN && wbc->sync_mode == WB_SYNC_ALL)
+	if (rc == -EAGAIN && wbc->sync_mode == WB_SYNC_ALL) {
 		goto retry_write;
-	else if (rc == -EAGAIN)
+	} else if (rc == -EAGAIN) {
 		redirty_page_for_writepage(wbc, page);
-	else if (rc != 0)
+	} else if (rc != 0) {
 		SetPageError(page);
-	else
+		mapping_set_error(page->mapping, rc);
+	} else {
 		SetPageUptodate(page);
+	}
 	end_page_writeback(page);
 	put_page(page);
 	free_xid(xid);
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web