mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
pagemap.h: move dir_pages() over there
That function was declared in a lot of filesystems to calculate directory pages. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e5e6e97fe0
commit
b57c2cb9ea
8 changed files with 6 additions and 38 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue