]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/squashfs/cache.c
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
[mirror_ubuntu-zesty-kernel.git] / fs / squashfs / cache.c
index 1cb70a0b216844a136bf3b47ee6534d22496bb1c..27e501af0e8b3c0260bb6eacf0488c2cf244f020 100644 (file)
@@ -255,7 +255,7 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries,
        cache->unused = entries;
        cache->entries = entries;
        cache->block_size = block_size;
-       cache->pages = block_size >> PAGE_CACHE_SHIFT;
+       cache->pages = block_size >> PAGE_SHIFT;
        cache->pages = cache->pages ? cache->pages : 1;
        cache->name = name;
        cache->num_waiters = 0;
@@ -275,7 +275,7 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries,
                }
 
                for (j = 0; j < cache->pages; j++) {
-                       entry->data[j] = kmalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
+                       entry->data[j] = kmalloc(PAGE_SIZE, GFP_KERNEL);
                        if (entry->data[j] == NULL) {
                                ERROR("Failed to allocate %s buffer\n", name);
                                goto cleanup;
@@ -314,10 +314,10 @@ int squashfs_copy_data(void *buffer, struct squashfs_cache_entry *entry,
                return min(length, entry->length - offset);
 
        while (offset < entry->length) {
-               void *buff = entry->data[offset / PAGE_CACHE_SIZE]
-                               + (offset % PAGE_CACHE_SIZE);
+               void *buff = entry->data[offset / PAGE_SIZE]
+                               + (offset % PAGE_SIZE);
                int bytes = min_t(int, entry->length - offset,
-                               PAGE_CACHE_SIZE - (offset % PAGE_CACHE_SIZE));
+                               PAGE_SIZE - (offset % PAGE_SIZE));
 
                if (bytes >= remaining) {
                        memcpy(buffer, buff, remaining);
@@ -415,7 +415,7 @@ struct squashfs_cache_entry *squashfs_get_datablock(struct super_block *sb,
  */
 void *squashfs_read_table(struct super_block *sb, u64 block, int length)
 {
-       int pages = (length + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
+       int pages = (length + PAGE_SIZE - 1) >> PAGE_SHIFT;
        int i, res;
        void *table, *buffer, **data;
        struct squashfs_page_actor *actor;
@@ -436,7 +436,7 @@ void *squashfs_read_table(struct super_block *sb, u64 block, int length)
                goto failed2;
        }
 
-       for (i = 0; i < pages; i++, buffer += PAGE_CACHE_SIZE)
+       for (i = 0; i < pages; i++, buffer += PAGE_SIZE)
                data[i] = buffer;
 
        res = squashfs_read_data(sb, block, length |