diff options
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 4ddbfbf1c3ad..281ae95932c9 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c | |||
@@ -533,6 +533,11 @@ bl_write_pagelist(struct nfs_write_data *wdata, int sync) | |||
533 | fill_invalid_ext: | 533 | fill_invalid_ext: |
534 | dprintk("%s need to zero %d pages\n", __func__, npg_zero); | 534 | dprintk("%s need to zero %d pages\n", __func__, npg_zero); |
535 | for (;npg_zero > 0; npg_zero--) { | 535 | for (;npg_zero > 0; npg_zero--) { |
536 | if (bl_is_sector_init(be->be_inval, isect)) { | ||
537 | dprintk("isect %llu already init\n", | ||
538 | (unsigned long long)isect); | ||
539 | goto next_page; | ||
540 | } | ||
536 | /* page ref released in bl_end_io_write_zero */ | 541 | /* page ref released in bl_end_io_write_zero */ |
537 | index = isect >> PAGE_CACHE_SECTOR_SHIFT; | 542 | index = isect >> PAGE_CACHE_SECTOR_SHIFT; |
538 | dprintk("%s zero %dth page: index %lu isect %llu\n", | 543 | dprintk("%s zero %dth page: index %lu isect %llu\n", |
@@ -552,8 +557,7 @@ fill_invalid_ext: | |||
552 | * PageUptodate: It was read before | 557 | * PageUptodate: It was read before |
553 | * sector_initialized: already written out | 558 | * sector_initialized: already written out |
554 | */ | 559 | */ |
555 | if (PageDirty(page) || PageWriteback(page) || | 560 | if (PageDirty(page) || PageWriteback(page)) { |
556 | bl_is_sector_init(be->be_inval, isect)) { | ||
557 | print_page(page); | 561 | print_page(page); |
558 | unlock_page(page); | 562 | unlock_page(page); |
559 | page_cache_release(page); | 563 | page_cache_release(page); |