Whamcloud - gitweb
b=21406 remove call to clear_page_dirty_for_io()
authorWang Di <Tom.Wang@sun.com>
Thu, 1 Apr 2010 22:40:41 +0000 (15:40 -0700)
committerRobert Read <rread@sun.com>
Thu, 1 Apr 2010 22:40:41 +0000 (15:40 -0700)
 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

index dd51251..f45c9a8 100644 (file)
@@ -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);