pagemap.h: move dir_pages() over there
[linux-2.6-microblaze.git] / include / linux / pagemap.h
index 4b3736f..808942d 100644 (file)
@@ -670,4 +670,10 @@ static inline int add_to_page_cache(struct page *page,
        return error;
 }
 
+static inline unsigned long dir_pages(struct inode *inode)
+{
+       return (unsigned long)(inode->i_size + PAGE_CACHE_SIZE - 1) >>
+                              PAGE_CACHE_SHIFT;
+}
+
 #endif /* _LINUX_PAGEMAP_H */