mm: set both AS_EIO/AS_ENOSPC and errseq_t in mapping_set_error
authorJeff Layton <jlayton@redhat.com>
Thu, 6 Jul 2017 11:02:26 +0000 (07:02 -0400)
committerJeff Layton <jlayton@redhat.com>
Thu, 6 Jul 2017 11:02:26 +0000 (07:02 -0400)
commit8ed1e46aaf1bec6a12f4c89637f2c3ef4c70f18e
treee1e19a94e9209b44c06886c31f4d8678d89bd402
parent5660e13d2fd6af1903d4b0b98020af95ca2d638a
mm: set both AS_EIO/AS_ENOSPC and errseq_t in mapping_set_error

When a writeback error occurs, we want later callers to be able to pick
up that fact when they go to wait on that writeback to complete.
Traditionally, we've used AS_EIO/AS_ENOSPC flags to track that, but
that's problematic since only one "checker" will be informed when an
error occurs.

In later patches, we're going to want to convert many of these callers
to check for errors since a well-defined point in time. For now, ensure
that we can handle both sorts of checks by both setting errors in both
places when there is a writeback failure.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
include/linux/pagemap.h