2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-09 10:29:40 -06:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2015-08-18 13:55:40 -06:00
|
|
|
|
2015-02-16 15:58:59 -08:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-01-15 16:56:14 -08:00
|
|
|
|
2016-01-15 16:55:53 -08:00
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-05-12 18:29:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-20 17:03:51 -07:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:16 +02:00
|
|
|
|
|
|
|
|
|
2016-05-11 11:58:47 +02:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-20 17:03:51 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-03 18:06:47 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-03 18:06:47 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-28 20:25:31 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-16 04:33:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-06-01 21:03:32 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-03 18:06:47 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-05-11 11:58:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-18 13:55:40 -06:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2015-08-14 16:15:31 -04:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-05-11 11:58:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-06-23 16:54:46 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
2015-08-18 13:55:40 -06:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-08-18 13:55:40 -06:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-08-18 13:55:41 -06:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-10 19:42:49 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2015-11-10 19:42:49 -07:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-08-18 13:55:40 -06:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-16 04:33:51 -07:00
|
|
|
|
2016-04-07 08:51:58 -07:00
|
|
|
|
2015-03-16 04:33:51 -07:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-07 08:51:58 -07:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:59 -08:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-05-11 11:58:52 +02:00
|
|
|
|
2016-01-22 15:40:57 -05:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
2015-07-03 10:40:42 -04:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2015-03-16 04:33:51 -07:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2015-03-16 04:33:51 -07:00
|
|
|
|
2016-01-22 15:40:57 -05:00
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2016-02-08 14:40:51 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
2015-07-03 10:40:42 -04:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:58:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-08-18 13:55:41 -06:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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.
We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE. And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.
Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.
Let's stop pretending that pages in page cache are special. They are
not.
The changes are pretty straight-forward:
- <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
- page_cache_get() -> get_page();
- page_cache_release() -> put_page();
This patch contains automated changes generated with coccinelle using
script below. For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.
The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.
There are few places in the code where coccinelle didn't reach. I'll
fix them manually in a separate patch. Comments and documentation also
will be addressed with the separate patch.
virtual patch
@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT
@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE
@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK
@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)
@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)
@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)
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>
2016-04-01 15:29:47 +03:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2016-02-05 15:36:55 -08:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-26 15:19:55 -08:00
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-26 15:19:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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.
We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE. And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.
Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.
Let's stop pretending that pages in page cache are special. They are
not.
The changes are pretty straight-forward:
- <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
- page_cache_get() -> get_page();
- page_cache_release() -> put_page();
This patch contains automated changes generated with coccinelle using
script below. For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.
The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.
There are few places in the code where coccinelle didn't reach. I'll
fix them manually in a separate patch. Comments and documentation also
will be addressed with the separate patch.
virtual patch
@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT
@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE
@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK
@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)
@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)
@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)
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>
2016-04-01 15:29:47 +03:00
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-05-12 18:29:20 +02:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2016-05-12 18:29:20 +02:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2016-05-12 18:29:20 +02:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
2015-06-04 09:18:18 +10:00
|
|
|
|
2016-07-26 15:21:05 -07:00
|
|
|
|
2015-06-04 09:18:18 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-26 15:21:05 -07:00
|
|
|
|
2015-06-04 09:18:18 +10:00
|
|
|
|
|
|
|
|
|
2016-07-26 15:21:05 -07:00
|
|
|
|
2016-05-11 11:58:48 +02:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:59 -08:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:19 +02:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2016-05-12 18:29:19 +02:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
2016-05-11 11:58:48 +02:00
|
|
|
|
2016-05-11 11:58:50 +02:00
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
dax: Make huge page handling depend of CONFIG_BROKEN
Currently the handling of huge pages for DAX is racy. For example the
following can happen:
CPU0 (THP write fault) CPU1 (normal read fault)
__dax_pmd_fault() __dax_fault()
get_block(inode, block, &bh, 0) -> not mapped
get_block(inode, block, &bh, 0)
-> not mapped
if (!buffer_mapped(&bh) && write)
get_block(inode, block, &bh, 1) -> allocates blocks
truncate_pagecache_range(inode, lstart, lend);
dax_load_hole();
This results in data corruption since process on CPU1 won't see changes
into the file done by CPU0.
The race can happen even if two normal faults race however with THP the
situation is even worse because the two faults don't operate on the same
entries in the radix tree and we want to use these entries for
serialization. So make THP support in DAX code depend on CONFIG_BROKEN
for now.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
2016-05-12 18:29:15 +02:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-26 15:21:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-11 11:58:48 +02:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:57:01 -08:00
|
|
|
|
2015-11-15 16:06:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:05 -08:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:05 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2015-09-08 14:59:39 -07:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:31 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-11 11:58:50 +02:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-05-12 18:29:14 +02:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2015-09-08 14:59:34 -07:00
|
|
|
|
2016-10-07 17:00:08 -07:00
|
|
|
|
2015-09-08 14:59:34 -07:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2015-09-08 14:59:34 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
2015-09-08 14:59:34 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 14:59:34 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2015-09-08 14:59:34 -07:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-02-24 14:02:06 -08:00
|
|
|
|
|
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2016-01-15 16:57:01 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
2015-11-12 18:33:54 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
|
|
|
|
|
2015-10-15 15:28:32 -07:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-26 15:21:05 -07:00
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:58 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 16:56:14 -08:00
|
|
|
|
2016-01-15 16:56:43 -08:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 14:59:09 -07:00
|
|
|
|
2015-09-08 14:58:57 -07:00
|
|
|
|
2015-04-15 16:15:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:47 -08:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-15 16:15:14 -07:00
|
|
|
|
2016-05-12 18:29:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-15 16:15:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-21 15:13:46 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-09 10:47:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-21 15:13:46 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-09 10:47:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
2015-02-16 15:59:35 -08:00
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:35 -08:00
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
2015-02-16 15:59:35 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
|
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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.
We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE. And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.
Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.
Let's stop pretending that pages in page cache are special. They are
not.
The changes are pretty straight-forward:
- <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
- page_cache_get() -> get_page();
- page_cache_release() -> put_page();
This patch contains automated changes generated with coccinelle using
script below. For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.
The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.
There are few places in the code where coccinelle didn't reach. I'll
fix them manually in a separate patch. Comments and documentation also
will be addressed with the separate patch.
virtual patch
@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT
@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE
@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK
@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)
@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)
@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)
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>
2016-04-01 15:29:47 +03:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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.
We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE. And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.
Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.
Let's stop pretending that pages in page cache are special. They are
not.
The changes are pretty straight-forward:
- <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
- page_cache_get() -> get_page();
- page_cache_release() -> put_page();
This patch contains automated changes generated with coccinelle using
script below. For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.
The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.
There are few places in the code where coccinelle didn't reach. I'll
fix them manually in a separate patch. Comments and documentation also
will be addressed with the separate patch.
virtual patch
@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT
@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE
@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK
@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)
@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)
@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)
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>
2016-04-01 15:29:47 +03:00
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
|
|
|
|
|
2016-01-22 15:10:59 -08:00
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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.
We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE. And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.
Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.
Let's stop pretending that pages in page cache are special. They are
not.
The changes are pretty straight-forward:
- <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
- page_cache_get() -> get_page();
- page_cache_release() -> put_page();
This patch contains automated changes generated with coccinelle using
script below. For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.
The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.
There are few places in the code where coccinelle didn't reach. I'll
fix them manually in a separate patch. Comments and documentation also
will be addressed with the separate patch.
virtual patch
@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT
@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE
@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK
@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)
@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)
@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)
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>
2016-04-01 15:29:47 +03:00
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
2016-05-09 10:47:04 +02:00
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
2016-01-15 16:55:59 -08:00
|
|
|
|
2016-05-09 10:47:04 +02:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
2015-02-16 15:59:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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.
We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE. And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.
Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.
Let's stop pretending that pages in page cache are special. They are
not.
The changes are pretty straight-forward:
- <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
- PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
- page_cache_get() -> get_page();
- page_cache_release() -> put_page();
This patch contains automated changes generated with coccinelle using
script below. For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.
The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.
There are few places in the code where coccinelle didn't reach. I'll
fix them manually in a separate patch. Comments and documentation also
will be addressed with the separate patch.
virtual patch
@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E
@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT
@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE
@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK
@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)
@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)
@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)
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>
2016-04-01 15:29:47 +03:00
|
|
|
|
2015-02-16 15:59:35 -08:00
|
|
|
|
|
|
|
|
|
2015-02-16 15:59:06 -08:00
|
|
|
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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