aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bio.h2
-rw-r--r--include/linux/blkdev.h2
-rw-r--r--include/linux/buffer_head.h4
-rw-r--r--include/linux/ceph/libceph.h4
-rw-r--r--include/linux/f2fs_fs.h4
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/nfs_page.h2
-rw-r--r--include/linux/pagemap.h14
-rw-r--r--include/linux/swap.h2
9 files changed, 19 insertions, 19 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 88bc64f00bb5..6b7481f62218 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -41,7 +41,7 @@
41#endif 41#endif
42 42
43#define BIO_MAX_PAGES 256 43#define BIO_MAX_PAGES 256
44#define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_CACHE_SHIFT) 44#define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_SHIFT)
45#define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9) 45#define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9)
46 46
47/* 47/*
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 7e5d7e018bea..669e419d6234 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1372,7 +1372,7 @@ unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *);
1372 1372
1373static inline void put_dev_sector(Sector p) 1373static inline void put_dev_sector(Sector p)
1374{ 1374{
1375 page_cache_release(p.v); 1375 put_page(p.v);
1376} 1376}
1377 1377
1378static inline bool __bvec_gap_to_prev(struct request_queue *q, 1378static inline bool __bvec_gap_to_prev(struct request_queue *q,
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index c67f052cc5e5..d48daa3f6f20 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -43,7 +43,7 @@ enum bh_state_bits {
43 */ 43 */
44}; 44};
45 45
46#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512) 46#define MAX_BUF_PER_PAGE (PAGE_SIZE / 512)
47 47
48struct page; 48struct page;
49struct buffer_head; 49struct buffer_head;
@@ -263,7 +263,7 @@ void buffer_init(void);
263static inline void attach_page_buffers(struct page *page, 263static inline void attach_page_buffers(struct page *page,
264 struct buffer_head *head) 264 struct buffer_head *head)
265{ 265{
266 page_cache_get(page); 266 get_page(page);
267 SetPagePrivate(page); 267 SetPagePrivate(page);
268 set_page_private(page, (unsigned long)head); 268 set_page_private(page, (unsigned long)head);
269} 269}
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index e7975e4681e1..db92a8d4926e 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -176,8 +176,8 @@ extern void ceph_put_snap_context(struct ceph_snap_context *sc);
176 */ 176 */
177static inline int calc_pages_for(u64 off, u64 len) 177static inline int calc_pages_for(u64 off, u64 len)
178{ 178{
179 return ((off+len+PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT) - 179 return ((off+len+PAGE_SIZE-1) >> PAGE_SHIFT) -
180 (off >> PAGE_CACHE_SHIFT); 180 (off >> PAGE_SHIFT);
181} 181}
182 182
183extern struct kmem_cache *ceph_inode_cachep; 183extern struct kmem_cache *ceph_inode_cachep;
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index 9eb215a155e0..b90e9bdbd1dd 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -262,7 +262,7 @@ struct f2fs_node {
262/* 262/*
263 * For NAT entries 263 * For NAT entries
264 */ 264 */
265#define NAT_ENTRY_PER_BLOCK (PAGE_CACHE_SIZE / sizeof(struct f2fs_nat_entry)) 265#define NAT_ENTRY_PER_BLOCK (PAGE_SIZE / sizeof(struct f2fs_nat_entry))
266 266
267struct f2fs_nat_entry { 267struct f2fs_nat_entry {
268 __u8 version; /* latest version of cached nat entry */ 268 __u8 version; /* latest version of cached nat entry */
@@ -282,7 +282,7 @@ struct f2fs_nat_block {
282 * Not allow to change this. 282 * Not allow to change this.
283 */ 283 */
284#define SIT_VBLOCK_MAP_SIZE 64 284#define SIT_VBLOCK_MAP_SIZE 64
285#define SIT_ENTRY_PER_BLOCK (PAGE_CACHE_SIZE / sizeof(struct f2fs_sit_entry)) 285#define SIT_ENTRY_PER_BLOCK (PAGE_SIZE / sizeof(struct f2fs_sit_entry))
286 286
287/* 287/*
288 * Note that f2fs_sit_entry->vblocks has the following bit-field information. 288 * Note that f2fs_sit_entry->vblocks has the following bit-field information.
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 14a97194b34b..304991a80e23 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -929,7 +929,7 @@ static inline struct file *get_file(struct file *f)
929/* Page cache limit. The filesystems should put that into their s_maxbytes 929/* Page cache limit. The filesystems should put that into their s_maxbytes
930 limits, otherwise bad things can happen in VM. */ 930 limits, otherwise bad things can happen in VM. */
931#if BITS_PER_LONG==32 931#if BITS_PER_LONG==32
932#define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) 932#define MAX_LFS_FILESIZE (((loff_t)PAGE_SIZE << (BITS_PER_LONG-1))-1)
933#elif BITS_PER_LONG==64 933#elif BITS_PER_LONG==64
934#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL) 934#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL)
935#endif 935#endif
@@ -2067,7 +2067,7 @@ extern int generic_update_time(struct inode *, struct timespec *, int);
2067/* /sys/fs */ 2067/* /sys/fs */
2068extern struct kobject *fs_kobj; 2068extern struct kobject *fs_kobj;
2069 2069
2070#define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK) 2070#define MAX_RW_COUNT (INT_MAX & PAGE_MASK)
2071 2071
2072#ifdef CONFIG_MANDATORY_FILE_LOCKING 2072#ifdef CONFIG_MANDATORY_FILE_LOCKING
2073extern int locks_mandatory_locked(struct file *); 2073extern int locks_mandatory_locked(struct file *);
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index f2f650f136ee..efada239205e 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -184,7 +184,7 @@ nfs_list_entry(struct list_head *head)
184static inline 184static inline
185loff_t req_offset(struct nfs_page *req) 185loff_t req_offset(struct nfs_page *req)
186{ 186{
187 return (((loff_t)req->wb_index) << PAGE_CACHE_SHIFT) + req->wb_offset; 187 return (((loff_t)req->wb_index) << PAGE_SHIFT) + req->wb_offset;
188} 188}
189 189
190#endif /* _LINUX_NFS_PAGE_H */ 190#endif /* _LINUX_NFS_PAGE_H */
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 1ebd65c91422..f396ccb900cc 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -390,13 +390,13 @@ static inline pgoff_t page_to_pgoff(struct page *page)
390 return page->index << compound_order(page); 390 return page->index << compound_order(page);
391 391
392 if (likely(!PageTransTail(page))) 392 if (likely(!PageTransTail(page)))
393 return page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); 393 return page->index;
394 394
395 /* 395 /*
396 * We don't initialize ->index for tail pages: calculate based on 396 * We don't initialize ->index for tail pages: calculate based on
397 * head page 397 * head page
398 */ 398 */
399 pgoff = compound_head(page)->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); 399 pgoff = compound_head(page)->index;
400 pgoff += page - compound_head(page); 400 pgoff += page - compound_head(page);
401 return pgoff; 401 return pgoff;
402} 402}
@@ -406,12 +406,12 @@ static inline pgoff_t page_to_pgoff(struct page *page)
406 */ 406 */
407static inline loff_t page_offset(struct page *page) 407static inline loff_t page_offset(struct page *page)
408{ 408{
409 return ((loff_t)page->index) << PAGE_CACHE_SHIFT; 409 return ((loff_t)page->index) << PAGE_SHIFT;
410} 410}
411 411
412static inline loff_t page_file_offset(struct page *page) 412static inline loff_t page_file_offset(struct page *page)
413{ 413{
414 return ((loff_t)page_file_index(page)) << PAGE_CACHE_SHIFT; 414 return ((loff_t)page_file_index(page)) << PAGE_SHIFT;
415} 415}
416 416
417extern pgoff_t linear_hugepage_index(struct vm_area_struct *vma, 417extern pgoff_t linear_hugepage_index(struct vm_area_struct *vma,
@@ -425,7 +425,7 @@ static inline pgoff_t linear_page_index(struct vm_area_struct *vma,
425 return linear_hugepage_index(vma, address); 425 return linear_hugepage_index(vma, address);
426 pgoff = (address - vma->vm_start) >> PAGE_SHIFT; 426 pgoff = (address - vma->vm_start) >> PAGE_SHIFT;
427 pgoff += vma->vm_pgoff; 427 pgoff += vma->vm_pgoff;
428 return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT); 428 return pgoff;
429} 429}
430 430
431extern void __lock_page(struct page *page); 431extern void __lock_page(struct page *page);
@@ -671,8 +671,8 @@ static inline int add_to_page_cache(struct page *page,
671 671
672static inline unsigned long dir_pages(struct inode *inode) 672static inline unsigned long dir_pages(struct inode *inode)
673{ 673{
674 return (unsigned long)(inode->i_size + PAGE_CACHE_SIZE - 1) >> 674 return (unsigned long)(inode->i_size + PAGE_SIZE - 1) >>
675 PAGE_CACHE_SHIFT; 675 PAGE_SHIFT;
676} 676}
677 677
678#endif /* _LINUX_PAGEMAP_H */ 678#endif /* _LINUX_PAGEMAP_H */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d18b65c53dbb..3d980ea1c946 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -435,7 +435,7 @@ struct backing_dev_info;
435/* only sparc can not include linux/pagemap.h in this file 435/* only sparc can not include linux/pagemap.h in this file
436 * so leave page_cache_release and release_pages undeclared... */ 436 * so leave page_cache_release and release_pages undeclared... */
437#define free_page_and_swap_cache(page) \ 437#define free_page_and_swap_cache(page) \
438 page_cache_release(page) 438 put_page(page)
439#define free_pages_and_swap_cache(pages, nr) \ 439#define free_pages_and_swap_cache(pages, nr) \
440 release_pages((pages), (nr), false); 440 release_pages((pages), (nr), false);
441 441