*
*/
+
+
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/locks.h>
#include <linux/unistd.h>
+#include <linux/version.h>
#include <asm/system.h>
#include <asm/uaccess.h>
if (!mapping)
return;
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,9))
spin_lock(&pagecache_lock);
+#endif
+
list_del(&page->list);
list_add(&page->list, &mapping->clean_pages);
CDEBUG(D_INODE, "inode clean\n");
inode->i_state &= ~I_DIRTY_PAGES;
}
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,10))
spin_unlock(&pagecache_lock);
+#endif
EXIT;
}
lock_page(page);
err = page->mapping->a_ops->prepare_write(NULL, page, from, to);
if (err) {
- unlock_page(page);
+ UnlockPage(page);
CERROR("page index %ld from %d to %d err %d\n",
page->index, from, to, err);
BUG();