Whamcloud - gitweb
LU-14677 llite: move env contexts to ll_inode_info level
[fs/lustre-release.git] / lustre / llite / rw26.c
index 6fb6d53..e959e6b 100644 (file)
@@ -463,7 +463,7 @@ ll_direct_IO_impl(struct kiocb *iocb, struct iov_iter *iter, int rw)
        if (ll_iov_iter_alignment(iter) & ~PAGE_MASK)
                RETURN(-EINVAL);
 
-       lcc = ll_cl_find(file);
+       lcc = ll_cl_find(inode);
        if (lcc == NULL)
                RETURN(-EIO);
 
@@ -661,7 +661,7 @@ static int ll_write_begin(struct file *file, struct address_space *mapping,
        const struct lu_env  *env = NULL;
        struct cl_io   *io = NULL;
        struct cl_page *page = NULL;
-
+       struct inode *inode = file_inode(file);
        struct cl_object *clob = ll_i2info(mapping->host)->lli_clob;
        pgoff_t index = pos >> PAGE_SHIFT;
        struct page *vmpage = NULL;
@@ -672,7 +672,7 @@ static int ll_write_begin(struct file *file, struct address_space *mapping,
 
        CDEBUG(D_VFSTRACE, "Writing %lu of %d to %d bytes\n", index, from, len);
 
-       lcc = ll_cl_find(file);
+       lcc = ll_cl_find(inode);
        if (lcc == NULL) {
                vmpage = grab_cache_page_nowait(mapping, index);
                result = ll_tiny_write_begin(vmpage, mapping);