From fc45b584cce84c67c14d374a9357a9781f5ff92e Mon Sep 17 00:00:00 2001 From: ericm <ericm> Date: Mon, 23 Feb 2004 14:14:50 +0000 Subject: [PATCH] 2.6 compile fix under obdfilter. --- lustre/obdfilter/filter_io.c | 7 ++++++- lustre/obdfilter/filter_io_26.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index c2867b5bc6..b77a4015ee 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 fb4370230c..e5ee2456fc 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, -- GitLab