new helper: file_inode(file)
[deliverable/linux.git] / fs / btrfs / inode.c
index 16d9e8e191e6ac34d92da08fe90b46e2de42ebf8..02d946a61dddb712f23a50c8e634b6e68f5ea5e1 100644 (file)
@@ -4342,7 +4342,7 @@ unsigned char btrfs_filetype_table[] = {
 static int btrfs_real_readdir(struct file *filp, void *dirent,
                              filldir_t filldir)
 {
-       struct inode *inode = filp->f_dentry->d_inode;
+       struct inode *inode = file_inode(filp);
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct btrfs_item *item;
        struct btrfs_dir_item *di;
@@ -6737,7 +6737,7 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset)
 int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
        struct page *page = vmf->page;
-       struct inode *inode = fdentry(vma->vm_file)->d_inode;
+       struct inode *inode = file_inode(vma->vm_file);
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
        struct btrfs_ordered_extent *ordered;
This page took 0.071334 seconds and 5 git commands to generate.