Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1622053
| From | Jeff Layton <jlayton@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 12/17] mm: ensure that we set mapping error if writeout() fails |
| Date | 2017-04-12 14:10 +0200 |
| Message-ID | <tvpfY-4hS-27@gated-at.bofh.it> (permalink) |
| References | <tvpfY-4hS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If writepage fails during a page migration, then we need to ensure that
fsync will see it by flagging the mapping.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
mm/migrate.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index ed97c2c14fa8..a77b9e769d0b 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -792,7 +792,11 @@ static int writeout(struct address_space *mapping, struct page *page)
/* unlocked. Relock */
lock_page(page);
- return (rc < 0) ? -EIO : -EAGAIN;
+ if (rc < 0) {
+ mapping_set_error(mapping, rc);
+ return -EIO;
+ }
+ return -EAGAIN;
}
/*
--
2.9.3
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v2 12/17] mm: ensure that we set mapping error if writeout() fails Jeff Layton <jlayton@redhat.com> - 2017-04-12 14:10 +0200
csiph-web