diff options
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 01b9cb8ccf68..2e847cdcad0e 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -944,12 +944,26 @@ retry: | |||
944 | } | 944 | } |
945 | 945 | ||
946 | ret = (*writepage)(page, wbc, data); | 946 | ret = (*writepage)(page, wbc, data); |
947 | 947 | if (unlikely(ret)) { | |
948 | if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE)) { | 948 | if (ret == AOP_WRITEPAGE_ACTIVATE) { |
949 | unlock_page(page); | 949 | unlock_page(page); |
950 | ret = 0; | 950 | ret = 0; |
951 | } | 951 | } else { |
952 | if (ret || (--nr_to_write <= 0)) | 952 | /* |
953 | * done_index is set past this page, | ||
954 | * so media errors will not choke | ||
955 | * background writeout for the entire | ||
956 | * file. This has consequences for | ||
957 | * range_cyclic semantics (ie. it may | ||
958 | * not be suitable for data integrity | ||
959 | * writeout). | ||
960 | */ | ||
961 | done = 1; | ||
962 | break; | ||
963 | } | ||
964 | } | ||
965 | |||
966 | if (--nr_to_write <= 0) | ||
953 | done = 1; | 967 | done = 1; |
954 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | 968 | if (wbc->nonblocking && bdi_write_congested(bdi)) { |
955 | wbc->encountered_congestion = 1; | 969 | wbc->encountered_congestion = 1; |