diff options
Diffstat (limited to 'fs/afs/write.c')
-rw-r--r-- | fs/afs/write.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c index 722743b152d8..15690bb1d3b5 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c | |||
@@ -438,7 +438,6 @@ no_more: | |||
438 | */ | 438 | */ |
439 | int afs_writepage(struct page *page, struct writeback_control *wbc) | 439 | int afs_writepage(struct page *page, struct writeback_control *wbc) |
440 | { | 440 | { |
441 | struct backing_dev_info *bdi = page->mapping->backing_dev_info; | ||
442 | struct afs_writeback *wb; | 441 | struct afs_writeback *wb; |
443 | int ret; | 442 | int ret; |
444 | 443 | ||
@@ -455,8 +454,6 @@ int afs_writepage(struct page *page, struct writeback_control *wbc) | |||
455 | } | 454 | } |
456 | 455 | ||
457 | wbc->nr_to_write -= ret; | 456 | wbc->nr_to_write -= ret; |
458 | if (wbc->nonblocking && bdi_write_congested(bdi)) | ||
459 | wbc->encountered_congestion = 1; | ||
460 | 457 | ||
461 | _leave(" = 0"); | 458 | _leave(" = 0"); |
462 | return 0; | 459 | return 0; |
@@ -469,7 +466,6 @@ static int afs_writepages_region(struct address_space *mapping, | |||
469 | struct writeback_control *wbc, | 466 | struct writeback_control *wbc, |
470 | pgoff_t index, pgoff_t end, pgoff_t *_next) | 467 | pgoff_t index, pgoff_t end, pgoff_t *_next) |
471 | { | 468 | { |
472 | struct backing_dev_info *bdi = mapping->backing_dev_info; | ||
473 | struct afs_writeback *wb; | 469 | struct afs_writeback *wb; |
474 | struct page *page; | 470 | struct page *page; |
475 | int ret, n; | 471 | int ret, n; |
@@ -529,11 +525,6 @@ static int afs_writepages_region(struct address_space *mapping, | |||
529 | 525 | ||
530 | wbc->nr_to_write -= ret; | 526 | wbc->nr_to_write -= ret; |
531 | 527 | ||
532 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | ||
533 | wbc->encountered_congestion = 1; | ||
534 | break; | ||
535 | } | ||
536 | |||
537 | cond_resched(); | 528 | cond_resched(); |
538 | } while (index < end && wbc->nr_to_write > 0); | 529 | } while (index < end && wbc->nr_to_write > 0); |
539 | 530 | ||
@@ -548,24 +539,16 @@ static int afs_writepages_region(struct address_space *mapping, | |||
548 | int afs_writepages(struct address_space *mapping, | 539 | int afs_writepages(struct address_space *mapping, |
549 | struct writeback_control *wbc) | 540 | struct writeback_control *wbc) |
550 | { | 541 | { |
551 | struct backing_dev_info *bdi = mapping->backing_dev_info; | ||
552 | pgoff_t start, end, next; | 542 | pgoff_t start, end, next; |
553 | int ret; | 543 | int ret; |
554 | 544 | ||
555 | _enter(""); | 545 | _enter(""); |
556 | 546 | ||
557 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | ||
558 | wbc->encountered_congestion = 1; | ||
559 | _leave(" = 0 [congest]"); | ||
560 | return 0; | ||
561 | } | ||
562 | |||
563 | if (wbc->range_cyclic) { | 547 | if (wbc->range_cyclic) { |
564 | start = mapping->writeback_index; | 548 | start = mapping->writeback_index; |
565 | end = -1; | 549 | end = -1; |
566 | ret = afs_writepages_region(mapping, wbc, start, end, &next); | 550 | ret = afs_writepages_region(mapping, wbc, start, end, &next); |
567 | if (start > 0 && wbc->nr_to_write > 0 && ret == 0 && | 551 | if (start > 0 && wbc->nr_to_write > 0 && ret == 0) |
568 | !(wbc->nonblocking && wbc->encountered_congestion)) | ||
569 | ret = afs_writepages_region(mapping, wbc, 0, start, | 552 | ret = afs_writepages_region(mapping, wbc, 0, start, |
570 | &next); | 553 | &next); |
571 | mapping->writeback_index = next; | 554 | mapping->writeback_index = next; |