diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index c2867b5bc6b3ca61c78712adbbac9fd1013a654a..b77a4015ee3662c83b0a07f8071570f03c7fe8e0 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -685,8 +685,13 @@ static int filter_commitrw_read(struct obd_export *exp, struct obdo *oa, continue; /* drop from cache like truncate_list_pages() */ if (drop && !TryLockPage(lnb->page)) { - if (lnb->page->mapping) + if (lnb->page->mapping) { +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) truncate_complete_page(lnb->page); +#else + truncate_complete_page(lnb->page->mapping, lnb->page); +#endif + } unlock_page(lnb->page); } page_cache_release(lnb->page); diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index fb4370230c1273e7fc5f9a8d377fa13d62fe1c1a..e5ee2456fc6ef5d7ca4556f01c34fbdaaf48502a 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -134,7 +134,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount, push_ctxt(&saved, &obd->obd_ctxt, NULL); cleanup_phase = 2; - oti->oti_handle = fsfilt_brw_start(obd, objcount, &fso, niocount, oti); + oti->oti_handle = fsfilt_brw_start(obd, objcount, &fso, niocount, res, oti); if (IS_ERR(oti->oti_handle)) { rc = PTR_ERR(oti->oti_handle); CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR,