]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/logfs/dev_mtd.c
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
[mirror_ubuntu-bionic-kernel.git] / fs / logfs / dev_mtd.c
index 9c501449450dc9be6891e5d9c1a035ca31b5687b..b76a62b1978fd699bcf139ef1500720ae7e19cfa 100644 (file)
@@ -46,9 +46,9 @@ static int loffs_mtd_write(struct super_block *sb, loff_t ofs, size_t len,
 
        BUG_ON((ofs >= mtd->size) || (len > mtd->size - ofs));
        BUG_ON(ofs != (ofs >> super->s_writeshift) << super->s_writeshift);
-       BUG_ON(len > PAGE_CACHE_SIZE);
-       page_start = ofs & PAGE_CACHE_MASK;
-       page_end = PAGE_CACHE_ALIGN(ofs + len) - 1;
+       BUG_ON(len > PAGE_SIZE);
+       page_start = ofs & PAGE_MASK;
+       page_end = PAGE_ALIGN(ofs + len) - 1;
        ret = mtd_write(mtd, ofs, len, &retlen, buf);
        if (ret || (retlen != len))
                return -EIO;
@@ -82,7 +82,7 @@ static int logfs_mtd_erase_mapping(struct super_block *sb, loff_t ofs,
                if (!page)
                        continue;
                memset(page_address(page), 0xFF, PAGE_SIZE);
-               page_cache_release(page);
+               put_page(page);
        }
        return 0;
 }
@@ -195,7 +195,7 @@ static int __logfs_mtd_writeseg(struct super_block *sb, u64 ofs, pgoff_t index,
                err = loffs_mtd_write(sb, page->index << PAGE_SHIFT, PAGE_SIZE,
                                        page_address(page));
                unlock_page(page);
-               page_cache_release(page);
+               put_page(page);
                if (err)
                        return err;
        }