Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git] / include / linux / pagemap.h
index fb0814c..a6c78e0 100644 (file)
@@ -671,4 +671,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 */