From: Wang Di Date: Thu, 1 Apr 2010 22:40:41 +0000 (-0700) Subject: b=21406 remove call to clear_page_dirty_for_io() X-Git-Tag: 1.10.0.39~5 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e6911ef5e87b0dc788211445f85b5c1dc7bceeac b=21406 remove call to clear_page_dirty_for_io() fix deadlock between kjournald2 trying to acquire the page lock owned by an ost_io thread waiting for journal commit. o=johann i=adiger i=girish --- diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index dd51251..f45c9a8 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -628,9 +628,9 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, LASSERT(PageLocked(lnb->page)); LASSERT(!PageWriteback(lnb->page)); - /* preceding filemap_write_and_wait() should have clean pages */ - if (fo->fo_writethrough_cache) - clear_page_dirty_for_io(lnb->page); + /* since write & truncate are serialized by the i_alloc_sem, + * even partial truncate should not leave dirty pages in + * the page cache */ LASSERT(!PageDirty(lnb->page)); SetPageUptodate(lnb->page);