From 99d85c5333a17f04cd600889e9032dce99967824 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 12 Nov 2002 00:01:59 +0000 Subject: [PATCH] 2.5 fixes copied from MDS 2.5 code. --- lustre/obdfilter/filter.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 53d9efb..8f4cec4 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1279,18 +1279,22 @@ err_unlock: return ERR_PTR(rc); } +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) +int waitfor_one_page(struct page *page) +{ + wait_on_page_locked(page); + return 0; +} +#endif + static int lustre_commit_write(struct page *page, unsigned from, unsigned to) { struct inode *inode = page->mapping->host; int err; err = page->mapping->a_ops->commit_write(NULL, page, from, to); -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) if (!err && IS_SYNC(inode)) err = waitfor_one_page(page); -#else -#warning ADD 2.5 waiting code here? -#endif //SetPageUptodate(page); // the client commit_write will do this SetPageReferenced(page); -- 1.8.3.1