From e6911ef5e87b0dc788211445f85b5c1dc7bceeac Mon Sep 17 00:00:00 2001 From: Wang Di Date: Thu, 1 Apr 2010 15:40:41 -0700 Subject: [PATCH] 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 --- lustre/obdfilter/filter_io_26.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 1.8.3.1