]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 21 Jun 2016 06:36:30 +0000 (16:36 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 21 Jun 2016 06:36:30 +0000 (16:36 +1000)
Source kernel commit 09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a

PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized.  And unlikely will.

[....]

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/libxfs_priv.h
libxfs/xfs_bmap.c

index 2c5aba0c879c8384b455a5331261ed7f260b5ae3..c14faca002cba36e3660aaa55567d3427751b440 100644 (file)
@@ -195,7 +195,7 @@ enum ce { CE_DEBUG, CE_CONT, CE_NOTE, CE_WARN, CE_ALERT, CE_PANIC };
  */
 #define prandom_u32()          0
 
-#define PAGE_CACHE_SIZE                getpagesize()
+#define PAGE_SIZE              getpagesize()
 
 static inline int __do_div(unsigned long long *n, unsigned base)
 {
index 49e2913c07749bab0686b1a80e19e8d2ae640bbb..cbcfd72f771e0bd450a04a7f875ef005ae7802d0 100644 (file)
@@ -3734,11 +3734,11 @@ xfs_bmap_btalloc(
                args.prod = align;
                if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod)))
                        args.mod = (xfs_extlen_t)(args.prod - args.mod);
-       } else if (mp->m_sb.sb_blocksize >= PAGE_CACHE_SIZE) {
+       } else if (mp->m_sb.sb_blocksize >= PAGE_SIZE) {
                args.prod = 1;
                args.mod = 0;
        } else {
-               args.prod = PAGE_CACHE_SIZE >> mp->m_sb.sb_blocklog;
+               args.prod = PAGE_SIZE >> mp->m_sb.sb_blocklog;
                if ((args.mod = (xfs_extlen_t)(do_mod(ap->offset, args.prod))))
                        args.mod = (xfs_extlen_t)(args.prod - args.mod);
        }