Skip to content
Snippets Groups Projects
Commit fc45b584 authored by Eric Mei's avatar Eric Mei
Browse files

2.6 compile fix under obdfilter.

parent edab4064
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment