new helper: file_inode(file)
[linux-2.6-block.git] / fs / omfs / dir.c
index fb5b3ff79dc6c232161fd89e35d4a23079a62a74..acbaebcad3a860c7c5a1d4a2ceb78ef10be2eae3 100644 (file)
@@ -330,7 +330,7 @@ int omfs_is_bad(struct omfs_sb_info *sbi, struct omfs_header *header,
 static int omfs_fill_chain(struct file *filp, void *dirent, filldir_t filldir,
                u64 fsblock, int hindex)
 {
-       struct inode *dir = filp->f_dentry->d_inode;
+       struct inode *dir = file_inode(filp);
        struct buffer_head *bh;
        struct omfs_inode *oi;
        u64 self;
@@ -405,7 +405,7 @@ out:
 
 static int omfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
-       struct inode *dir = filp->f_dentry->d_inode;
+       struct inode *dir = file_inode(filp);
        struct buffer_head *bh;
        loff_t offset, res;
        unsigned int hchain, hindex;