From 2a26db3d685de460491361e03f466878c25262af Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Thu, 22 Sep 2011 21:50:17 -0400 Subject: [PATCH] --- yaml --- r: 267217 b: refs/heads/master c: 7542274519b3ba87555410c66e8356ac1e3bc9b3 h: refs/heads/master i: 267215: b940cf1fc8ccb72dac559d9bfa77cedbc49707d7 v: v3 --- [refs] | 2 +- trunk/fs/nfs/blocklayout/blocklayout.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 87676b9aa172..f4693c5bff45 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e6d05a757c314ad88d0649d3835a8a1daa964236 +refs/heads/master: 7542274519b3ba87555410c66e8356ac1e3bc9b3 diff --git a/trunk/fs/nfs/blocklayout/blocklayout.c b/trunk/fs/nfs/blocklayout/blocklayout.c index 4ddbfbf1c3ad..281ae95932c9 100644 --- a/trunk/fs/nfs/blocklayout/blocklayout.c +++ b/trunk/fs/nfs/blocklayout/blocklayout.c @@ -533,6 +533,11 @@ bl_write_pagelist(struct nfs_write_data *wdata, int sync) fill_invalid_ext: dprintk("%s need to zero %d pages\n", __func__, npg_zero); for (;npg_zero > 0; npg_zero--) { + if (bl_is_sector_init(be->be_inval, isect)) { + dprintk("isect %llu already init\n", + (unsigned long long)isect); + goto next_page; + } /* page ref released in bl_end_io_write_zero */ index = isect >> PAGE_CACHE_SECTOR_SHIFT; dprintk("%s zero %dth page: index %lu isect %llu\n", @@ -552,8 +557,7 @@ bl_write_pagelist(struct nfs_write_data *wdata, int sync) * PageUptodate: It was read before * sector_initialized: already written out */ - if (PageDirty(page) || PageWriteback(page) || - bl_is_sector_init(be->be_inval, isect)) { + if (PageDirty(page) || PageWriteback(page)) { print_page(page); unlock_page(page); page_cache_release(page);