Merge tag 'powerpc-4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[deliverable/linux.git] / fs / ocfs2 / mmap.c
index 9ea081f4e6e4613a18a51c21f95de5a3f14183fb..71545ad4628ce8bc37b377abcf1983d169d38f48 100644 (file)
@@ -65,13 +65,13 @@ static int __ocfs2_page_mkwrite(struct file *file, struct buffer_head *di_bh,
        struct inode *inode = file_inode(file);
        struct address_space *mapping = inode->i_mapping;
        loff_t pos = page_offset(page);
-       unsigned int len = PAGE_CACHE_SIZE;
+       unsigned int len = PAGE_SIZE;
        pgoff_t last_index;
        struct page *locked_page = NULL;
        void *fsdata;
        loff_t size = i_size_read(inode);
 
-       last_index = (size - 1) >> PAGE_CACHE_SHIFT;
+       last_index = (size - 1) >> PAGE_SHIFT;
 
        /*
         * There are cases that lead to the page no longer bebongs to the
@@ -102,7 +102,7 @@ static int __ocfs2_page_mkwrite(struct file *file, struct buffer_head *di_bh,
         * because the "write" would invalidate their data.
         */
        if (page->index == last_index)
-               len = ((size - 1) & ~PAGE_CACHE_MASK) + 1;
+               len = ((size - 1) & ~PAGE_MASK) + 1;
 
        ret = ocfs2_write_begin_nolock(mapping, pos, len, OCFS2_WRITE_MMAP,
                                       &locked_page, &fsdata, di_bh, page);
This page took 0.033768 seconds and 5 git commands to generate.