]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/btrfs/file.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[mirror_ubuntu-zesty-kernel.git] / fs / btrfs / file.c
index 1be25b92d63c8f283d109fa5ead9e8b80de76d2a..ade03e6f7bd2706bbaac3406f1bcc31cf70cb578 100644 (file)
@@ -1230,7 +1230,7 @@ static noinline int prepare_pages(struct btrfs_root *root, struct file *file,
        struct extent_state *cached_state = NULL;
        int i;
        unsigned long index = pos >> PAGE_CACHE_SHIFT;
-       struct inode *inode = fdentry(file)->d_inode;
+       struct inode *inode = file_inode(file);
        gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping);
        int err = 0;
        int faili = 0;
@@ -1317,7 +1317,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
                                               struct iov_iter *i,
                                               loff_t pos)
 {
-       struct inode *inode = fdentry(file)->d_inode;
+       struct inode *inode = file_inode(file);
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct page **pages = NULL;
        unsigned long first_index;
@@ -1505,7 +1505,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
                                    unsigned long nr_segs, loff_t pos)
 {
        struct file *file = iocb->ki_filp;
-       struct inode *inode = fdentry(file)->d_inode;
+       struct inode *inode = file_inode(file);
        struct btrfs_root *root = BTRFS_I(inode)->root;
        loff_t *ppos = &iocb->ki_pos;
        u64 start_pos;
@@ -2140,7 +2140,7 @@ out:
 static long btrfs_fallocate(struct file *file, int mode,
                            loff_t offset, loff_t len)
 {
-       struct inode *inode = file->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(file);
        struct extent_state *cached_state = NULL;
        struct btrfs_root *root = BTRFS_I(inode)->root;
        u64 cur_offset;