-#include <linux/writeback.h>
-
-static inline int cfs_cleanup_group_info(void)
-{
- struct group_info *ginfo;
-
- ginfo = groups_alloc(0);
- if (!ginfo)
- return -ENOMEM;
-
- set_current_groups(ginfo);
- put_group_info(ginfo);
-
- return 0;
-}
-
-#define __set_page_ll_data(page, llap) \
- do { \
- page_cache_get(page); \
- SetPagePrivate(page); \
- set_page_private(page, (unsigned long)llap); \
- } while (0)
-#define __clear_page_ll_data(page) \
- do { \
- ClearPagePrivate(page); \
- set_page_private(page, 0); \
- page_cache_release(page); \
- } while(0)
-
-#define kiobuf bio
-
-#include <linux/proc_fs.h>
-
-#define CheckWriteback(page, cmd) \
- ((!PageWriteback(page) && (cmd & OBD_BRW_READ)) || \
- (PageWriteback(page) && (cmd & OBD_BRW_WRITE)))
-
-#ifdef HAVE_PAGE_LIST
-static inline int mapping_has_pages(struct address_space *mapping)
-{
- int rc = 1;
-
- ll_pgcache_lock(mapping);
- if (cfs_list_empty(&mapping->dirty_pages) &&
- cfs_list_empty(&mapping->clean_pages) &&
- cfs_list_empty(&mapping->locked_pages)) {
- rc = 0;
- }
- ll_pgcache_unlock(mapping);
-
- return rc;
-}
-#else
-static inline int mapping_has_pages(struct address_space *mapping)
-{
- return mapping->nrpages > 0;
-}
-#endif
-