]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nilfs2/dir.c
pagemap.h: move dir_pages() over there
[karo-tx-linux.git] / fs / nilfs2 / dir.c
index 197a63e9d10215b54e28179b7976e6c0b56b5384..6b8b92b19cec9c868992fd089a00fc74f669fbdc 100644 (file)
@@ -61,11 +61,6 @@ static inline void nilfs_put_page(struct page *page)
        page_cache_release(page);
 }
 
-static inline unsigned long dir_pages(struct inode *inode)
-{
-       return (inode->i_size+PAGE_CACHE_SIZE-1)>>PAGE_CACHE_SHIFT;
-}
-
 /*
  * Return the offset into page `page_nr' of the last valid
  * byte in that page, plus one.
@@ -435,7 +430,7 @@ void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
  */
 int nilfs_add_link(struct dentry *dentry, struct inode *inode)
 {
-       struct inode *dir = dentry->d_parent->d_inode;
+       struct inode *dir = d_inode(dentry->d_parent);
        const unsigned char *name = dentry->d_name.name;
        int namelen = dentry->d_name.len;
        unsigned chunk_size = nilfs_chunk_size(dir);