new helper: file_inode(file)
[linux-2.6-block.git] / fs / ext2 / dir.c
index 0f4f5c92925730558931e2611a48c97f5b8233cd..4237722bfd27173c34c9835cb1e28deeaa2e72f6 100644 (file)
@@ -290,7 +290,7 @@ static int
 ext2_readdir (struct file * filp, void * dirent, filldir_t filldir)
 {
        loff_t pos = filp->f_pos;
-       struct inode *inode = filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(filp);
        struct super_block *sb = inode->i_sb;
        unsigned int offset = pos & ~PAGE_CACHE_MASK;
        unsigned long n = pos >> PAGE_CACHE_SHIFT;