History

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)

Kirill A. Shutemov committed 10 years ago

Commit 09cbfea1 parent c05c2ec381 files · +2722 −2721Browse files

Unified · Split

381 files
  1. arch/arc/mm/cache.c +1 −1
  2. arch/arm/mm/flush.c +2 −2
  3. arch/parisc/kernel/cache.c +1 −1
  4. arch/powerpc/platforms/cell/spufs/inode.c +2 −2
  5. arch/s390/hypfs/inode.c +2 −2
  6. block/bio.c +4 −4
  7. block/blk-core.c +1 −1
  8. block/blk-settings.c +6 −6
  9. block/blk-sysfs.c +4 −4
  10. block/cfq-iosched.c +1 −1
  11. block/compat_ioctl.c +2 −2
  12. block/ioctl.c +2 −2
  13. block/partition-generic.c +4 −4
  14. drivers/block/aoe/aoeblk.c +1 −1
  15. drivers/block/brd.c +1 −1
  16. drivers/block/drbd/drbd_nl.c +1 −1
  17. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 −1
  18. drivers/gpu/drm/armada/armada_gem.c +2 −2
  19. drivers/gpu/drm/drm_gem.c +2 −2
  20. drivers/gpu/drm/i915/i915_gem.c +4 −4
  21. drivers/gpu/drm/i915/i915_gem_userptr.c +1 −1
  22. drivers/gpu/drm/radeon/radeon_ttm.c +1 −1
  23. drivers/gpu/drm/ttm/ttm_tt.c +2 −2
  24. drivers/gpu/drm/via/via_dmablit.c +1 −1
  25. drivers/md/bitmap.c +1 −1
  26. drivers/media/v4l2-core/videobuf-dma-sg.c +1 −1
  27. drivers/misc/ibmasm/ibmasmfs.c +2 −2
  28. drivers/misc/vmw_vmci/vmci_queue_pair.c +1 −1
  29. drivers/mmc/core/host.c +3 −3
  30. drivers/mmc/host/sh_mmcif.c +1 −1
  31. drivers/mmc/host/tmio_mmc_dma.c +2 −2
  32. drivers/mmc/host/tmio_mmc_pio.c +1 −1
  33. drivers/mmc/host/usdhi6rol0.c +1 −1
  34. drivers/mtd/devices/block2mtd.c +3 −3
  35. drivers/mtd/nand/nandsim.c +3 −3
  36. drivers/nvdimm/btt.c +1 −1
  37. drivers/nvdimm/pmem.c +1 −1
  38. drivers/oprofile/oprofilefs.c +2 −2
  39. drivers/scsi/sd.c +1 −1
  40. drivers/scsi/st.c +2 −2
  41. drivers/staging/lustre/include/linux/libcfs/libcfs_private.h +1 −1
  42. drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h +2 −2
  43. drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +1 −1
  44. drivers/staging/lustre/lnet/libcfs/debug.c +1 −1
  45. drivers/staging/lustre/lnet/libcfs/tracefile.c +8 −8
  46. drivers/staging/lustre/lnet/libcfs/tracefile.h +3 −3
  47. drivers/staging/lustre/lnet/lnet/lib-md.c +1 −1
  48. drivers/staging/lustre/lnet/lnet/lib-move.c +3 −3
  49. drivers/staging/lustre/lnet/lnet/lib-socket.c +2 −2
  50. drivers/staging/lustre/lnet/lnet/router.c +3 −3
  51. drivers/staging/lustre/lnet/selftest/brw_test.c +10 −10
  52. drivers/staging/lustre/lnet/selftest/conctl.c +2 −2
  53. drivers/staging/lustre/lnet/selftest/conrpc.c +5 −5
  54. drivers/staging/lustre/lnet/selftest/framework.c +1 −1
  55. drivers/staging/lustre/lnet/selftest/rpc.c +1 −1
  56. drivers/staging/lustre/lnet/selftest/selftest.h +1 −1
  57. drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h +1 −1
  58. drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +1 −1
  59. drivers/staging/lustre/lustre/include/lustre_mdc.h +2 −2
  60. drivers/staging/lustre/lustre/include/lustre_net.h +3 −3
  61. drivers/staging/lustre/lustre/include/obd.h +1 −1
  62. drivers/staging/lustre/lustre/include/obd_support.h +1 −1
  63. drivers/staging/lustre/lustre/lclient/lcommon_cl.c +2 −2
  64. drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +6 −6
  65. drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +1 −1
  66. drivers/staging/lustre/lustre/ldlm/ldlm_request.c +1 −1
  67. drivers/staging/lustre/lustre/llite/dir.c +9 −9
  68. drivers/staging/lustre/lustre/llite/llite_internal.h +4 −4
  69. drivers/staging/lustre/lustre/llite/llite_lib.c +4 −4
  70. drivers/staging/lustre/lustre/llite/llite_mmap.c +4 −4
  71. drivers/staging/lustre/lustre/llite/lloop.c +6 −6
  72. drivers/staging/lustre/lustre/llite/lproc_llite.c +9 −9
  73. drivers/staging/lustre/lustre/llite/rw.c +11 −11
  74. drivers/staging/lustre/lustre/llite/rw26.c +14 −14
  75. drivers/staging/lustre/lustre/llite/vvp_io.c +4 −4
  76. drivers/staging/lustre/lustre/llite/vvp_page.c +4 −4
  77. drivers/staging/lustre/lustre/lmv/lmv_obd.c +2 −2
  78. drivers/staging/lustre/lustre/mdc/mdc_request.c +3 −3
  79. drivers/staging/lustre/lustre/mgc/mgc_request.c +11 −11
  80. drivers/staging/lustre/lustre/obdclass/cl_page.c +3 −3
  81. drivers/staging/lustre/lustre/obdclass/class_obd.c +3 −3
  82. drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c +2 −2
  83. drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +3 −3
  84. drivers/staging/lustre/lustre/obdclass/lu_object.c +3 −3
  85. drivers/staging/lustre/lustre/obdecho/echo_client.c +15 −15
  86. drivers/staging/lustre/lustre/osc/lproc_osc.c +8 −8
  87. drivers/staging/lustre/lustre/osc/osc_cache.c +21 −21
  88. drivers/staging/lustre/lustre/osc/osc_page.c +3 −3
  89. drivers/staging/lustre/lustre/osc/osc_request.c +13 −13
  90. drivers/staging/lustre/lustre/ptlrpc/client.c +3 −3
  91. drivers/staging/lustre/lustre/ptlrpc/import.c +1 −1
  92. drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +2 −2
  93. drivers/staging/lustre/lustre/ptlrpc/recover.c +1 −1
  94. drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +1 −1
  95. drivers/usb/gadget/function/f_fs.c +2 −2
  96. drivers/usb/gadget/legacy/inode.c +2 −2
  97. drivers/usb/storage/scsiglue.c +1 −1
  98. drivers/video/fbdev/pvr2fb.c +1 −1
  99. fs/9p/vfs_addr.c +9 −9
  100. fs/9p/vfs_file.c +2 −2
  101. fs/9p/vfs_super.c +1 −1
  102. fs/affs/file.c +13 −13
  103. fs/afs/dir.c +1 −1
  104. fs/afs/file.c +2 −2
  105. fs/afs/mntpt.c +3 −3
  106. fs/afs/super.c +2 −2
  107. fs/afs/write.c +13 −13
  108. fs/binfmt_elf.c +1 −1
  109. fs/binfmt_elf_fdpic.c +1 −1
  110. fs/block_dev.c +2 −2
  111. fs/btrfs/check-integrity.c +30 −30
  112. fs/btrfs/compression.c +42 −42
  113. fs/btrfs/disk-io.c +7 −7
  114. fs/btrfs/extent-tree.c +2 −2
  115. fs/btrfs/extent_io.c +131 −131
  116. fs/btrfs/extent_io.h +3 −3
  117. fs/btrfs/file-item.c +2 −2
  118. fs/btrfs/file.c +20 −20
  119. fs/btrfs/free-space-cache.c +15 −15
  120. fs/btrfs/inode-map.c +5 −5
  121. fs/btrfs/inode.c +52 −52
  122. fs/btrfs/ioctl.c +42 −42
  123. fs/btrfs/lzo.c +16 −16
  124. fs/btrfs/raid56.c +14 −14
  125. fs/btrfs/reada.c +15 −15
  126. fs/btrfs/relocation.c +8 −8
  127. fs/btrfs/scrub.c +12 −12
  128. fs/btrfs/send.c +8 −8
  129. fs/btrfs/tests/extent-io-tests.c +21 −21
  130. fs/btrfs/tests/free-space-tests.c +1 −1
  131. fs/btrfs/volumes.c +7 −7
  132. fs/btrfs/zlib.c +19 −19
  133. fs/buffer.c +50 −50
  134. fs/cachefiles/rdwr.c +19 −19
  135. fs/ceph/addr.c +57 −57
  136. fs/ceph/caps.c +1 −1
  137. fs/ceph/dir.c +2 −2
  138. fs/ceph/file.c +16 −16
  139. fs/ceph/inode.c +3 −3
  140. fs/ceph/mds_client.c +1 −1
  141. fs/ceph/mds_client.h +1 −1
  142. fs/ceph/super.c +4 −4
  143. fs/cifs/cifsfs.c +1 −1
  144. fs/cifs/cifssmb.c +8 −8
  145. fs/cifs/connect.c +1 −1
  146. fs/cifs/file.c +47 −47
  147. fs/cifs/inode.c +5 −5
  148. fs/configfs/mount.c +2 −2
  149. fs/cramfs/inode.c +15 −15
  150. fs/crypto/crypto.c +4 −4
  151. fs/dax.c +15 −15
  152. fs/direct-io.c +13 −13
  153. fs/dlm/lowcomms.c +4 −4
  154. fs/ecryptfs/crypto.c +11 −11
  155. fs/ecryptfs/inode.c +2 −2
  156. fs/ecryptfs/keystore.c +1 −1
  157. fs/ecryptfs/main.c +4 −4
  158. fs/ecryptfs/mmap.c +22 −22
  159. fs/ecryptfs/read_write.c +7 −7
  160. fs/efivarfs/super.c +2 −2
  161. fs/exofs/dir.c +15 −15
  162. fs/exofs/inode.c +17 −17
  163. fs/exofs/namei.c +2 −2
  164. fs/ext2/dir.c +16 −16
  165. fs/ext2/namei.c +3 −3
  166. fs/ext4/crypto.c +4 −4
  167. fs/ext4/dir.c +2 −2
  168. fs/ext4/file.c +2 −2
  169. fs/ext4/inline.c +9 −9
  170. fs/ext4/inode.c +58 −58
  171. fs/ext4/mballoc.c +18 −18
  172. fs/ext4/move_extent.c +8 −8
  173. fs/ext4/page-io.c +2 −2
  174. fs/ext4/readpage.c +5 −5
  175. fs/ext4/super.c +2 −2
  176. fs/ext4/symlink.c +2 −2
  177. fs/f2fs/data.c +26 −26
  178. fs/f2fs/debug.c +3 −3
  179. fs/f2fs/dir.c +2 −2
  180. fs/f2fs/f2fs.h +1 −1
  181. fs/f2fs/file.c +37 −37
  182. fs/f2fs/inline.c +5 −5
  183. fs/f2fs/namei.c +2 −2
  184. fs/f2fs/node.c +5 −5
  185. fs/f2fs/recovery.c +1 −1
  186. fs/f2fs/segment.c +8 −8
  187. fs/f2fs/super.c +2 −2
  188. fs/freevxfs/vxfs_immed.c +2 −2
  189. fs/freevxfs/vxfs_lookup.c +6 −6
  190. fs/freevxfs/vxfs_subr.c +1 −1
  191. fs/fs-writeback.c +1 −1
  192. fs/fscache/page.c +5 −5
  193. fs/fuse/dev.c +13 −13
  194. fs/fuse/file.c +36 −36
  195. fs/fuse/inode.c +8 −8
  196. fs/gfs2/aops.c +22 −22
  197. fs/gfs2/bmap.c +6 −6
  198. fs/gfs2/file.c +8 −8
  199. fs/gfs2/meta_io.c +2 −2
  200. fs/gfs2/quota.c +7 −7
  201. fs/gfs2/rgrp.c +2 −3
  202. fs/hfs/bnode.c +6 −6
  203. fs/hfs/btree.c +10 −10
  204. fs/hfs/inode.c +4 −4
  205. fs/hfsplus/bitmap.c +1 −1
  206. fs/hfsplus/bnode.c +45 −45
  207. fs/hfsplus/btree.c +11 −11
  208. fs/hfsplus/inode.c +4 −4
  209. fs/hfsplus/super.c +1 −1
  210. fs/hfsplus/xattr.c +3 −3
  211. fs/hostfs/hostfs_kern.c +9 −9
  212. fs/hugetlbfs/inode.c +4 −4
  213. fs/isofs/compress.c +18 −18
  214. fs/isofs/inode.c +1 −1
  215. fs/jbd2/commit.c +2 −2
  216. fs/jbd2/journal.c +1 −1
  217. fs/jbd2/transaction.c +2 −2
  218. fs/jffs2/debug.c +4 −4
  219. fs/jffs2/file.c +12 −11
  220. fs/jffs2/fs.c +4 −4
  221. fs/jffs2/gc.c +4 −4
  222. fs/jffs2/nodelist.c +4 −4
  223. fs/jffs2/write.c +4 −3
  224. fs/jfs/jfs_metapage.c +21 −21
  225. fs/jfs/jfs_metapage.h +2 −2
  226. fs/jfs/super.c +1 −1
  227. fs/kernfs/mount.c +2 −2
  228. fs/libfs.c +12 −12
  229. fs/logfs/dev_bdev.c +1 −1
  230. fs/logfs/dev_mtd.c +5 −5
  231. fs/logfs/dir.c +6 −6
  232. fs/logfs/file.c +13 −13
  233. fs/logfs/readwrite.c +10 −10
  234. fs/logfs/segment.c +14 −14
  235. fs/logfs/super.c +8 −8
  236. fs/minix/dir.c +9 −9
  237. fs/minix/namei.c +2 −2
  238. fs/mpage.c +10 −10
  239. fs/ncpfs/dir.c +5 −5
  240. fs/ncpfs/ncplib_kernel.h +1 −1
  241. fs/nfs/blocklayout/blocklayout.c +12 −12
  242. fs/nfs/blocklayout/blocklayout.h +2 −2
  243. fs/nfs/client.c +4 −4
  244. fs/nfs/dir.c +2 −2
  245. fs/nfs/direct.c +4 −4
  246. fs/nfs/file.c +10 −10
  247. fs/nfs/internal.h +3 −3
  248. fs/nfs/nfs4xdr.c +1 −1
  249. fs/nfs/objlayout/objio_osd.c +1 −1
  250. fs/nfs/pagelist.c +3 −3
  251. fs/nfs/pnfs.c +3 −3
  252. fs/nfs/read.c +8 −8
  253. fs/nfs/write.c +2 −2
  254. fs/nilfs2/bmap.c +1 −1
  255. fs/nilfs2/btnode.c +5 −5
  256. fs/nilfs2/dir.c +16 −16
  257. fs/nilfs2/gcinode.c +1 −1
  258. fs/nilfs2/inode.c +2 −2
  259. fs/nilfs2/mdt.c +7 −7
  260. fs/nilfs2/namei.c +2 −2
  261. fs/nilfs2/page.c +9 −9
  262. fs/nilfs2/recovery.c +2 −2
  263. fs/nilfs2/segment.c +1 −1
  264. fs/ntfs/aops.c +24 −24
  265. fs/ntfs/aops.h +1 −1
  266. fs/ntfs/attrib.c +14 −14
  267. fs/ntfs/bitmap.c +5 −5
  268. fs/ntfs/compress.c +28 −28
  269. fs/ntfs/dir.c +20 −20
  270. fs/ntfs/file.c +27 −27
  271. fs/ntfs/index.c +6 −6
  272. fs/ntfs/inode.c +4 −4
  273. fs/ntfs/lcnalloc.c +3 −3
  274. fs/ntfs/logfile.c +8 −8
  275. fs/ntfs/mft.c +17 −17
  276. fs/ntfs/ntfs.h +1 −1
  277. fs/ntfs/super.c +29 −29
  278. fs/ocfs2/alloc.c +14 −14
  279. fs/ocfs2/aops.c +24 −24
  280. fs/ocfs2/cluster/heartbeat.c +5 −5
  281. fs/ocfs2/dlmfs/dlmfs.c +2 −2
  282. fs/ocfs2/file.c +7 −7
  283. fs/ocfs2/mmap.c +3 −3
  284. fs/ocfs2/ocfs2.h +10 −10
  285. fs/ocfs2/refcounttree.c +11 −11
  286. fs/ocfs2/super.c +2 −2
  287. fs/orangefs/inode.c +5 −5
  288. fs/orangefs/orangefs-bufmap.c +2 −2
  289. fs/orangefs/orangefs-utils.c +1 −1
  290. fs/pipe.c +3 −3
  291. fs/proc/task_mmu.c +1 −1
  292. fs/proc/vmcore.c +2 −2
  293. fs/pstore/inode.c +2 −2
  294. fs/qnx6/dir.c +8 −8
  295. fs/qnx6/inode.c +2 −2
  296. fs/qnx6/qnx6.h +1 −1
  297. fs/ramfs/inode.c +2 −2
  298. fs/reiserfs/file.c +2 −2
  299. fs/reiserfs/inode.c +22 −22
  300. fs/reiserfs/ioctl.c +2 −2
  301. fs/reiserfs/journal.c +2 −2
  302. fs/reiserfs/stree.c +2 −2
  303. fs/reiserfs/tail_conversion.c +2 −2
  304. fs/reiserfs/xattr.c +9 −9
  305. fs/splice.c +16 −16
  306. fs/squashfs/block.c +2 −2
  307. fs/squashfs/cache.c +7 −7
  308. fs/squashfs/decompressor.c +1 −1
  309. fs/squashfs/file.c +11 −11
  310. fs/squashfs/file_direct.c +11 −11
  311. fs/squashfs/lz4_wrapper.c +4 −4
  312. fs/squashfs/lzo_wrapper.c +4 −4
  313. fs/squashfs/page_actor.c +2 −2
  314. fs/squashfs/page_actor.h +1 −1
  315. fs/squashfs/super.c +1 −1
  316. fs/squashfs/symlink.c +3 −3
  317. fs/squashfs/xz_wrapper.c +2 −2
  318. fs/squashfs/zlib_wrapper.c +2 −2
  319. fs/sync.c +2 −2
  320. fs/sysv/dir.c +9 −9
  321. fs/sysv/namei.c +2 −2
  322. fs/ubifs/file.c +26 −26
  323. fs/ubifs/super.c +2 −2
  324. fs/ubifs/ubifs.h +2 −2
  325. fs/udf/file.c +3 −3
  326. fs/udf/inode.c +2 −2
  327. fs/ufs/balloc.c +3 −3
  328. fs/ufs/dir.c +16 −16
  329. fs/ufs/inode.c +2 −2
  330. fs/ufs/namei.c +3 −3
  331. fs/ufs/util.c +2 −2
  332. fs/ufs/util.h +1 −1
  333. fs/xfs/libxfs/xfs_bmap.c +2 −2
  334. fs/xfs/xfs_aops.c +9 −9
  335. fs/xfs/xfs_bmap_util.c +2 −2
  336. fs/xfs/xfs_file.c +6 −6
  337. fs/xfs/xfs_linux.h +1 −1
  338. fs/xfs/xfs_mount.c +1 −1
  339. fs/xfs/xfs_mount.h +2 −2
  340. fs/xfs/xfs_pnfs.c +2 −2
  341. fs/xfs/xfs_super.c +2 −2
  342. include/linux/bio.h +1 −1
  343. include/linux/blkdev.h +1 −1
  344. include/linux/buffer_head.h +2 −2
  345. include/linux/ceph/libceph.h +2 −2
  346. include/linux/f2fs_fs.h +2 −2
  347. include/linux/fs.h +2 −2
  348. include/linux/nfs_page.h +1 −1
  349. include/linux/pagemap.h +7 −7
  350. include/linux/swap.h +1 −1
  351. ipc/mqueue.c +2 −2
  352. kernel/events/uprobes.c +4 −4
  353. mm/fadvise.c +4 −4
  354. mm/filemap.c +63 −63
  355. mm/hugetlb.c +4 −4
  356. mm/madvise.c +3 −3
  357. mm/memory-failure.c +1 −1
  358. mm/memory.c +27 −27
  359. mm/mincore.c +2 −2
  360. mm/nommu.c +1 −1
  361. mm/page-writeback.c +6 −6
  362. mm/page_io.c +1 −1
  363. mm/readahead.c +10 −10
  364. mm/rmap.c +1 −1
  365. mm/shmem.c +65 −65
  366. mm/swap.c +6 −6
  367. mm/swap_state.c +6 −6
  368. mm/swapfile.c +6 −6
  369. mm/truncate.c +20 −20
  370. mm/userfaultfd.c +2 −2
  371. mm/zswap.c +2 −2
  372. net/ceph/messenger.c +3 −3
  373. net/ceph/pagelist.c +2 −2
  374. net/ceph/pagevec.c +15 −15
  375. net/sunrpc/auth_gss/auth_gss.c +4 −4
  376. net/sunrpc/auth_gss/gss_krb5_crypto.c +1 −1
  377. net/sunrpc/auth_gss/gss_krb5_wrap.c +2 −2
  378. net/sunrpc/cache.c +2 −2
  379. net/sunrpc/rpc_pipe.c +2 −2
  380. net/sunrpc/socklib.c +3 −3
  381. net/sunrpc/xdr.c +24 −24
arch/arc/mm/cache.c+1−1
@@ -628,7 +628,7 @@ void flush_dcache_page(struct page *page) · 627 unmodified lines
628628
629629 /* kernel reading from page with U-mapping */
630630 phys_addr_t paddr = (unsigned long)page_address(page);
631− unsigned long vaddr = page->index << PAGE_CACHE_SHIFT;
631+ unsigned long vaddr = page->index << PAGE_SHIFT;
632632
633633 if (addr_not_cache_congruent(paddr, vaddr))
634634 __flush_dcache_page(paddr, vaddr);
arch/arm/mm/flush.c+2−2
@@ -235,7 +235,7 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page) · 234 unmodified lines
235235 */
236236 if (mapping && cache_is_vipt_aliasing())
237237 flush_pfn_alias(page_to_pfn(page),
238− page->index << PAGE_CACHE_SHIFT);
238+ page->index << PAGE_SHIFT);
239239 }
240240
241241 static void __flush_dcache_aliases(struct address_space *mapping, struct page *page)
@@ -250,7 +250,7 @@ static void __flush_dcache_aliases(struct address_space *mapping, struct page *p · 8 unmodified lines
250250 * data in the current VM view associated with this page.
251251 * - aliasing VIPT: we only need to find one mapping of this page.
252252 */
253− pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
253+ pgoff = page->index;
254254
255255 flush_dcache_mmap_lock(mapping);
256256 vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) {
arch/parisc/kernel/cache.c+1−1
@@ -319,7 +319,7 @@ void flush_dcache_page(struct page *page) · 318 unmodified lines
319319 if (!mapping)
320320 return;
321321
322− pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
322+ pgoff = page->index;
323323
324324 /* We have carefully arranged in arch_get_unmapped_area() that
325325 * *any* mappings of a file are always congruently mapped (whether
arch/powerpc/platforms/cell/spufs/inode.c+2−2
@@ -732,8 +732,8 @@ spufs_fill_super(struct super_block *sb, void *data, int silent) · 731 unmodified lines
732732 return -ENOMEM;
733733
734734 sb->s_maxbytes = MAX_LFS_FILESIZE;
735− sb->s_blocksize = PAGE_CACHE_SIZE;
736− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
735+ sb->s_blocksize = PAGE_SIZE;
736+ sb->s_blocksize_bits = PAGE_SHIFT;
737737 sb->s_magic = SPUFS_MAGIC;
738738 sb->s_op = &s_ops;
739739 sb->s_fs_info = info;
arch/s390/hypfs/inode.c+2−2
@@ -278,8 +278,8 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent) · 277 unmodified lines
278278 sbi->uid = current_uid();
279279 sbi->gid = current_gid();
280280 sb->s_fs_info = sbi;
281− sb->s_blocksize = PAGE_CACHE_SIZE;
282− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
281+ sb->s_blocksize = PAGE_SIZE;
282+ sb->s_blocksize_bits = PAGE_SHIFT;
283283 sb->s_magic = HYPFS_MAGIC;
284284 sb->s_op = &hypfs_s_ops;
285285 if (hypfs_parse_options(data, sb))
block/bio.c+4−4
@@ -1339,7 +1339,7 @@ struct bio *bio_map_user_iov(struct request_queue *q, · 1338 unmodified lines
13391339 * release the pages we didn't map into the bio, if any
13401340 */
13411341 while (j < page_limit)
1342− page_cache_release(pages[j++]);
1342+ put_page(pages[j++]);
13431343 }
13441344
13451345 kfree(pages);
@@ -1365,7 +1365,7 @@ struct bio *bio_map_user_iov(struct request_queue *q, · 19 unmodified lines
13651365 for (j = 0; j < nr_pages; j++) {
13661366 if (!pages[j])
13671367 break;
1368− page_cache_release(pages[j]);
1368+ put_page(pages[j]);
13691369 }
13701370 out:
13711371 kfree(pages);
@@ -1385,7 +1385,7 @@ static void __bio_unmap_user(struct bio *bio) · 13 unmodified lines
13851385 if (bio_data_dir(bio) == READ)
13861386 set_page_dirty_lock(bvec->bv_page);
13871387
1388− page_cache_release(bvec->bv_page);
1388+ put_page(bvec->bv_page);
13891389 }
13901390
13911391 bio_put(bio);
@@ -1658,7 +1658,7 @@ void bio_check_pages_dirty(struct bio *bio) · 266 unmodified lines
16581658 struct page *page = bvec->bv_page;
16591659
16601660 if (PageDirty(page) || PageCompound(page)) {
1661− page_cache_release(page);
1661+ put_page(page);
16621662 bvec->bv_page = NULL;
16631663 } else {
16641664 nr_clean_pages++;
block/blk-core.c+1−1
@@ -706,7 +706,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) · 705 unmodified lines
706706 goto fail_id;
707707
708708 q->backing_dev_info.ra_pages =
709− (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
709+ (VM_MAX_READAHEAD * 1024) / PAGE_SIZE;
710710 q->backing_dev_info.capabilities = BDI_CAP_CGROUP_WRITEBACK;
711711 q->backing_dev_info.name = "block";
712712 q->node = node_id;
block/blk-settings.c+6−6
@@ -239,8 +239,8 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto · 238 unmodified lines
239239 struct queue_limits *limits = &q->limits;
240240 unsigned int max_sectors;
241241
242− if ((max_hw_sectors << 9) < PAGE_CACHE_SIZE) {
243− max_hw_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
242+ if ((max_hw_sectors << 9) < PAGE_SIZE) {
243+ max_hw_sectors = 1 << (PAGE_SHIFT - 9);
244244 printk(KERN_INFO "%s: set to minimum %d\n",
245245 __func__, max_hw_sectors);
246246 }
@@ -329,8 +329,8 @@ EXPORT_SYMBOL(blk_queue_max_segments); · 82 unmodified lines
329329 **/
330330 void blk_queue_max_segment_size(struct request_queue *q, unsigned int max_size)
331331 {
332− if (max_size < PAGE_CACHE_SIZE) {
333− max_size = PAGE_CACHE_SIZE;
332+ if (max_size < PAGE_SIZE) {
333+ max_size = PAGE_SIZE;
334334 printk(KERN_INFO "%s: set to minimum %d\n",
335335 __func__, max_size);
336336 }
@@ -760,8 +760,8 @@ EXPORT_SYMBOL_GPL(blk_queue_dma_drain); · 423 unmodified lines
760760 **/
761761 void blk_queue_segment_boundary(struct request_queue *q, unsigned long mask)
762762 {
763− if (mask < PAGE_CACHE_SIZE - 1) {
764− mask = PAGE_CACHE_SIZE - 1;
763+ if (mask < PAGE_SIZE - 1) {
764+ mask = PAGE_SIZE - 1;
765765 printk(KERN_INFO "%s: set to minimum %lx\n",
766766 __func__, mask);
767767 }
block/blk-sysfs.c+4−4
@@ -76,7 +76,7 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count) · 75 unmodified lines
7676 static ssize_t queue_ra_show(struct request_queue *q, char *page)
7777 {
7878 unsigned long ra_kb = q->backing_dev_info.ra_pages <<
79− (PAGE_CACHE_SHIFT - 10);
79+ (PAGE_SHIFT - 10);
8080
8181 return queue_var_show(ra_kb, (page));
8282 }
@@ -90,7 +90,7 @@ queue_ra_store(struct request_queue *q, const char *page, size_t count) · 7 unmodified lines
9090 if (ret < 0)
9191 return ret;
9292
93− q->backing_dev_info.ra_pages = ra_kb >> (PAGE_CACHE_SHIFT - 10);
93+ q->backing_dev_info.ra_pages = ra_kb >> (PAGE_SHIFT - 10);
9494
9595 return ret;
9696 }
@@ -117,7 +117,7 @@ static ssize_t queue_max_segment_size_show(struct request_queue *q, char *page) · 20 unmodified lines
117117 if (blk_queue_cluster(q))
118118 return queue_var_show(queue_max_segment_size(q), (page));
119119
120− return queue_var_show(PAGE_CACHE_SIZE, (page));
120+ return queue_var_show(PAGE_SIZE, (page));
121121 }
122122
123123 static ssize_t queue_logical_block_size_show(struct request_queue *q, char *page)
@@ -198,7 +198,7 @@ queue_max_sectors_store(struct request_queue *q, const char *page, size_t count) · 74 unmodified lines
198198 {
199199 unsigned long max_sectors_kb,
200200 max_hw_sectors_kb = queue_max_hw_sectors(q) >> 1,
201− page_kb = 1 << (PAGE_CACHE_SHIFT - 10);
201+ page_kb = 1 << (PAGE_SHIFT - 10);
202202 ssize_t ret = queue_var_store(&max_sectors_kb, page, count);
203203
204204 if (ret < 0)
block/cfq-iosched.c+1−1
@@ -4075,7 +4075,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, · 4074 unmodified lines
40754075 * idle timer unplug to continue working.
40764076 */
40774077 if (cfq_cfqq_wait_request(cfqq)) {
4078− if (blk_rq_bytes(rq) > PAGE_CACHE_SIZE ||
4078+ if (blk_rq_bytes(rq) > PAGE_SIZE ||
40794079 cfqd->busy_queues > 1) {
40804080 cfq_del_timer(cfqd, cfqq);
40814081 cfq_clear_cfqq_wait_request(cfqq);
block/compat_ioctl.c+2−2
@@ -710,7 +710,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) · 709 unmodified lines
710710 return -EINVAL;
711711 bdi = blk_get_backing_dev_info(bdev);
712712 return compat_put_long(arg,
713− (bdi->ra_pages * PAGE_CACHE_SIZE) / 512);
713+ (bdi->ra_pages * PAGE_SIZE) / 512);
714714 case BLKROGET: /* compatible */
715715 return compat_put_int(arg, bdev_read_only(bdev) != 0);
716716 case BLKBSZGET_32: /* get the logical block size (cf. BLKSSZGET) */
@@ -729,7 +729,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) · 12 unmodified lines
729729 if (!capable(CAP_SYS_ADMIN))
730730 return -EACCES;
731731 bdi = blk_get_backing_dev_info(bdev);
732− bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE;
732+ bdi->ra_pages = (arg * 512) / PAGE_SIZE;
733733 return 0;
734734 case BLKGETSIZE:
735735 size = i_size_read(bdev->bd_inode);
block/ioctl.c+2−2
@@ -550,7 +550,7 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, · 549 unmodified lines
550550 if (!arg)
551551 return -EINVAL;
552552 bdi = blk_get_backing_dev_info(bdev);
553− return put_long(arg, (bdi->ra_pages * PAGE_CACHE_SIZE) / 512);
553+ return put_long(arg, (bdi->ra_pages * PAGE_SIZE) / 512);
554554 case BLKROGET:
555555 return put_int(arg, bdev_read_only(bdev) != 0);
556556 case BLKBSZGET: /* get block device soft block size (cf. BLKSSZGET) */
@@ -578,7 +578,7 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, · 21 unmodified lines
578578 if(!capable(CAP_SYS_ADMIN))
579579 return -EACCES;
580580 bdi = blk_get_backing_dev_info(bdev);
581− bdi->ra_pages = (arg * 512) / PAGE_CACHE_SIZE;
581+ bdi->ra_pages = (arg * 512) / PAGE_SIZE;
582582 return 0;
583583 case BLKBSZSET:
584584 return blkdev_bszset(bdev, mode, argp);
block/partition-generic.c+4−4
@@ -566,8 +566,8 @@ static struct page *read_pagecache_sector(struct block_device *bdev, sector_t n) · 565 unmodified lines
566566 {
567567 struct address_space *mapping = bdev->bd_inode->i_mapping;
568568
569− return read_mapping_page(mapping, (pgoff_t)(n >> (PAGE_CACHE_SHIFT-9)),
570− NULL);
569+ return read_mapping_page(mapping, (pgoff_t)(n >> (PAGE_SHIFT-9)),
570+ NULL);
571571 }
572572
573573 unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p)
@@ -584,9 +584,9 @@ unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p) · 10 unmodified lines
584584 if (PageError(page))
585585 goto fail;
586586 p->v = page;
587− return (unsigned char *)page_address(page) + ((n & ((1 << (PAGE_CACHE_SHIFT - 9)) - 1)) << 9);
587+ return (unsigned char *)page_address(page) + ((n & ((1 << (PAGE_SHIFT - 9)) - 1)) << 9);
588588 fail:
589− page_cache_release(page);
589+ put_page(page);
590590 }
591591 p->v = NULL;
592592 return NULL;
drivers/block/aoe/aoeblk.c+1−1
@@ -397,7 +397,7 @@ aoeblk_gdalloc(void *vp) · 396 unmodified lines
397397 WARN_ON(d->flags & DEVFL_UP);
398398 blk_queue_max_hw_sectors(q, BLK_DEF_MAX_SECTORS);
399399 q->backing_dev_info.name = "aoe";
400− q->backing_dev_info.ra_pages = READ_AHEAD / PAGE_CACHE_SIZE;
400+ q->backing_dev_info.ra_pages = READ_AHEAD / PAGE_SIZE;
401401 d->bufpool = mp;
402402 d->blkq = gd->queue = q;
403403 q->queuedata = d;
drivers/block/brd.c+1−1
@@ -374,7 +374,7 @@ static int brd_rw_page(struct block_device *bdev, sector_t sector, · 373 unmodified lines
374374 struct page *page, int rw)
375375 {
376376 struct brd_device *brd = bdev->bd_disk->private_data;
377− int err = brd_do_bvec(brd, page, PAGE_CACHE_SIZE, 0, rw, sector);
377+ int err = brd_do_bvec(brd, page, PAGE_SIZE, 0, rw, sector);
378378 page_endio(page, rw & WRITE, err);
379379 return err;
380380 }
drivers/block/drbd/drbd_nl.c+1−1
@@ -1178,7 +1178,7 @@ static void drbd_setup_queue_param(struct drbd_device *device, struct drbd_backi · 1177 unmodified lines
11781178 blk_queue_max_hw_sectors(q, max_hw_sectors);
11791179 /* This is the workaround for "bio would need to, but cannot, be split" */
11801180 blk_queue_max_segments(q, max_segments ? max_segments : BLK_MAX_SEGMENTS);
1181− blk_queue_segment_boundary(q, PAGE_CACHE_SIZE-1);
1181+ blk_queue_segment_boundary(q, PAGE_SIZE-1);
11821182
11831183 if (b) {
11841184 struct drbd_connection *connection = first_peer_device(device)->connection;
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+1−1
@@ -616,7 +616,7 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm) · 615 unmodified lines
616616 set_page_dirty(page);
617617
618618 mark_page_accessed(page);
619− page_cache_release(page);
619+ put_page(page);
620620 }
621621
622622 sg_free_table(ttm->sg);
drivers/gpu/drm/armada/armada_gem.c+2−2
@@ -481,7 +481,7 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, · 480 unmodified lines
481481
482482 release:
483483 for_each_sg(sgt->sgl, sg, num, i)
484− page_cache_release(sg_page(sg));
484+ put_page(sg_page(sg));
485485 free_table:
486486 sg_free_table(sgt);
487487 free_sgt:
@@ -502,7 +502,7 @@ static void armada_gem_prime_unmap_dma_buf(struct dma_buf_attachment *attach, · 14 unmodified lines
502502 if (dobj->obj.filp) {
503503 struct scatterlist *sg;
504504 for_each_sg(sgt->sgl, sg, sgt->nents, i)
505− page_cache_release(sg_page(sg));
505+ put_page(sg_page(sg));
506506 }
507507
508508 sg_free_table(sgt);
drivers/gpu/drm/drm_gem.c+2−2
@@ -534,7 +534,7 @@ struct page **drm_gem_get_pages(struct drm_gem_object *obj) · 533 unmodified lines
534534
535535 fail:
536536 while (i--)
537− page_cache_release(pages[i]);
537+ put_page(pages[i]);
538538
539539 drm_free_large(pages);
540540 return ERR_CAST(p);
@@ -569,7 +569,7 @@ void drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages, · 28 unmodified lines
569569 mark_page_accessed(pages[i]);
570570
571571 /* Undo the reference we took when populating the table */
572− page_cache_release(pages[i]);
572+ put_page(pages[i]);
573573 }
574574
575575 drm_free_large(pages);
drivers/gpu/drm/i915/i915_gem.c+4−4
@@ -177,7 +177,7 @@ i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj) · 176 unmodified lines
177177 drm_clflush_virt_range(vaddr, PAGE_SIZE);
178178 kunmap_atomic(src);
179179
180− page_cache_release(page);
180+ put_page(page);
181181 vaddr += PAGE_SIZE;
182182 }
183183
@@ -243,7 +243,7 @@ i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj) · 59 unmodified lines
243243 set_page_dirty(page);
244244 if (obj->madv == I915_MADV_WILLNEED)
245245 mark_page_accessed(page);
246− page_cache_release(page);
246+ put_page(page);
247247 vaddr += PAGE_SIZE;
248248 }
249249 obj->dirty = 0;
@@ -2206,7 +2206,7 @@ i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj) · 1956 unmodified lines
22062206 if (obj->madv == I915_MADV_WILLNEED)
22072207 mark_page_accessed(page);
22082208
2209− page_cache_release(page);
2209+ put_page(page);
22102210 }
22112211 obj->dirty = 0;
22122212
@@ -2346,7 +2346,7 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) · 133 unmodified lines
23462346 err_pages:
23472347 sg_mark_end(sg);
23482348 for_each_sg_page(st->sgl, &sg_iter, st->nents, 0)
2349− page_cache_release(sg_page_iter_page(&sg_iter));
2349+ put_page(sg_page_iter_page(&sg_iter));
23502350 sg_free_table(st);
23512351 kfree(st);
23522352
drivers/gpu/drm/i915/i915_gem_userptr.c+1−1
@@ -683,7 +683,7 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj) · 682 unmodified lines
683683 set_page_dirty(page);
684684
685685 mark_page_accessed(page);
686− page_cache_release(page);
686+ put_page(page);
687687 }
688688 obj->dirty = 0;
689689
drivers/gpu/drm/radeon/radeon_ttm.c+1−1
@@ -609,7 +609,7 @@ static void radeon_ttm_tt_unpin_userptr(struct ttm_tt *ttm) · 608 unmodified lines
609609 set_page_dirty(page);
610610
611611 mark_page_accessed(page);
612− page_cache_release(page);
612+ put_page(page);
613613 }
614614
615615 sg_free_table(ttm->sg);
drivers/gpu/drm/ttm/ttm_tt.c+2−2
@@ -311,7 +311,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm) · 310 unmodified lines
311311 goto out_err;
312312
313313 copy_highpage(to_page, from_page);
314− page_cache_release(from_page);
314+ put_page(from_page);
315315 }
316316
317317 if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP))
@@ -361,7 +361,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) · 43 unmodified lines
361361 copy_highpage(to_page, from_page);
362362 set_page_dirty(to_page);
363363 mark_page_accessed(to_page);
364− page_cache_release(to_page);
364+ put_page(to_page);
365365 }
366366
367367 ttm_tt_unpopulate(ttm);
drivers/gpu/drm/via/via_dmablit.c+1−1
@@ -188,7 +188,7 @@ via_free_sg_info(struct pci_dev *pdev, drm_via_sg_info_t *vsg) · 187 unmodified lines
188188 if (NULL != (page = vsg->pages[i])) {
189189 if (!PageReserved(page) && (DMA_FROM_DEVICE == vsg->direction))
190190 SetPageDirty(page);
191− page_cache_release(page);
191+ put_page(page);
192192 }
193193 }
194194 case dr_via_pages_alloc:
drivers/md/bitmap.c+1−1
@@ -322,7 +322,7 @@ __clear_page_buffers(struct page *page) · 321 unmodified lines
322322 {
323323 ClearPagePrivate(page);
324324 set_page_private(page, 0);
325− page_cache_release(page);
325+ put_page(page);
326326 }
327327 static void free_buffers(struct page *page)
328328 {
drivers/media/v4l2-core/videobuf-dma-sg.c+1−1
@@ -349,7 +349,7 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma) · 348 unmodified lines
349349
350350 if (dma->pages) {
351351 for (i = 0; i < dma->nr_pages; i++)
352− page_cache_release(dma->pages[i]);
352+ put_page(dma->pages[i]);
353353 kfree(dma->pages);
354354 dma->pages = NULL;
355355 }
drivers/misc/ibmasm/ibmasmfs.c+2−2
@@ -116,8 +116,8 @@ static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent) · 115 unmodified lines
116116 {
117117 struct inode *root;
118118
119− sb->s_blocksize = PAGE_CACHE_SIZE;
120− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
119+ sb->s_blocksize = PAGE_SIZE;
120+ sb->s_blocksize_bits = PAGE_SHIFT;
121121 sb->s_magic = IBMASMFS_MAGIC;
122122 sb->s_op = &ibmasmfs_s_ops;
123123 sb->s_time_gran = 1;
drivers/misc/vmw_vmci/vmci_queue_pair.c+1−1
@@ -728,7 +728,7 @@ static void qp_release_pages(struct page **pages, · 727 unmodified lines
728728 if (dirty)
729729 set_page_dirty(pages[i]);
730730
731− page_cache_release(pages[i]);
731+ put_page(pages[i]);
732732 pages[i] = NULL;
733733 }
734734 }
drivers/mmc/core/host.c+3−3
@@ -356,11 +356,11 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) · 355 unmodified lines
356356 * They have to set these according to their abilities.
357357 */
358358 host->max_segs = 1;
359− host->max_seg_size = PAGE_CACHE_SIZE;
359+ host->max_seg_size = PAGE_SIZE;
360360
361− host->max_req_size = PAGE_CACHE_SIZE;
361+ host->max_req_size = PAGE_SIZE;
362362 host->max_blk_size = 512;
363− host->max_blk_count = PAGE_CACHE_SIZE / 512;
363+ host->max_blk_count = PAGE_SIZE / 512;
364364
365365 return host;
366366 }
drivers/mmc/host/sh_mmcif.c+1−1
@@ -1513,7 +1513,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) · 1512 unmodified lines
15131513 mmc->caps |= pd->caps;
15141514 mmc->max_segs = 32;
15151515 mmc->max_blk_size = 512;
1516− mmc->max_req_size = PAGE_CACHE_SIZE * mmc->max_segs;
1516+ mmc->max_req_size = PAGE_SIZE * mmc->max_segs;
15171517 mmc->max_blk_count = mmc->max_req_size / mmc->max_blk_size;
15181518 mmc->max_seg_size = mmc->max_req_size;
15191519
drivers/mmc/host/tmio_mmc_dma.c+2−2
@@ -63,7 +63,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) · 62 unmodified lines
6363 }
6464 }
6565
66− if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE ||
66+ if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_SIZE ||
6767 (align & PAGE_MASK))) || !multiple) {
6868 ret = -EINVAL;
6969 goto pio;
@@ -133,7 +133,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) · 63 unmodified lines
133133 }
134134 }
135135
136− if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE ||
136+ if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_SIZE ||
137137 (align & PAGE_MASK))) || !multiple) {
138138 ret = -EINVAL;
139139 goto pio;
drivers/mmc/host/tmio_mmc_pio.c+1−1
@@ -1125,7 +1125,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, · 1124 unmodified lines
11251125 mmc->caps2 |= pdata->capabilities2;
11261126 mmc->max_segs = 32;
11271127 mmc->max_blk_size = 512;
1128− mmc->max_blk_count = (PAGE_CACHE_SIZE / mmc->max_blk_size) *
1128+ mmc->max_blk_count = (PAGE_SIZE / mmc->max_blk_size) *
11291129 mmc->max_segs;
11301130 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
11311131 mmc->max_seg_size = mmc->max_req_size;
drivers/mmc/host/usdhi6rol0.c+1−1
@@ -1789,7 +1789,7 @@ static int usdhi6_probe(struct platform_device *pdev) · 1788 unmodified lines
17891789 /* Set .max_segs to some random number. Feel free to adjust. */
17901790 mmc->max_segs = 32;
17911791 mmc->max_blk_size = 512;
1792− mmc->max_req_size = PAGE_CACHE_SIZE * mmc->max_segs;
1792+ mmc->max_req_size = PAGE_SIZE * mmc->max_segs;
17931793 mmc->max_blk_count = mmc->max_req_size / mmc->max_blk_size;
17941794 /*
17951795 * Setting .max_seg_size to 1 page would simplify our page-mapping code,
drivers/mtd/devices/block2mtd.c+3−3
@@ -75,7 +75,7 @@ static int _block2mtd_erase(struct block2mtd_dev *dev, loff_t to, size_t len) · 74 unmodified lines
7575 break;
7676 }
7777
78− page_cache_release(page);
78+ put_page(page);
7979 pages--;
8080 index++;
8181 }
@@ -124,7 +124,7 @@ static int block2mtd_read(struct mtd_info *mtd, loff_t from, size_t len, · 42 unmodified lines
124124 return PTR_ERR(page);
125125
126126 memcpy(buf, page_address(page) + offset, cpylen);
127− page_cache_release(page);
127+ put_page(page);
128128
129129 if (retlen)
130130 *retlen += cpylen;
@@ -164,7 +164,7 @@ static int _block2mtd_write(struct block2mtd_dev *dev, const u_char *buf, · 33 unmodified lines
164164 unlock_page(page);
165165 balance_dirty_pages_ratelimited(mapping);
166166 }
167− page_cache_release(page);
167+ put_page(page);
168168
169169 if (retlen)
170170 *retlen += cpylen;
drivers/mtd/nand/nandsim.c+3−3
@@ -1339,7 +1339,7 @@ static void put_pages(struct nandsim *ns) · 1338 unmodified lines
13391339 int i;
13401340
13411341 for (i = 0; i < ns->held_cnt; i++)
1342− page_cache_release(ns->held_pages[i]);
1342+ put_page(ns->held_pages[i]);
13431343 }
13441344
13451345 /* Get page cache pages in advance to provide NOFS memory allocation */
@@ -1349,8 +1349,8 @@ static int get_pages(struct nandsim *ns, struct file *file, size_t count, loff_t · 3 unmodified lines
13491349 struct page *page;
13501350 struct address_space *mapping = file->f_mapping;
13511351
1352− start_index = pos >> PAGE_CACHE_SHIFT;
1353− end_index = (pos + count - 1) >> PAGE_CACHE_SHIFT;
1352+ start_index = pos >> PAGE_SHIFT;
1353+ end_index = (pos + count - 1) >> PAGE_SHIFT;
13541354 if (end_index - start_index + 1 > NS_MAX_HELD_PAGES)
13551355 return -EINVAL;
13561356 ns->held_cnt = 0;
drivers/nvdimm/btt.c+1−1
@@ -1204,7 +1204,7 @@ static int btt_rw_page(struct block_device *bdev, sector_t sector, · 1203 unmodified lines
12041204 {
12051205 struct btt *btt = bdev->bd_disk->private_data;
12061206
1207− btt_do_bvec(btt, NULL, page, PAGE_CACHE_SIZE, 0, rw, sector);
1207+ btt_do_bvec(btt, NULL, page, PAGE_SIZE, 0, rw, sector);
12081208 page_endio(page, rw & WRITE, 0);
12091209 return 0;
12101210 }
drivers/nvdimm/pmem.c+1−1
@@ -151,7 +151,7 @@ static int pmem_rw_page(struct block_device *bdev, sector_t sector, · 150 unmodified lines
151151 struct pmem_device *pmem = bdev->bd_disk->private_data;
152152 int rc;
153153
154− rc = pmem_do_bvec(pmem, page, PAGE_CACHE_SIZE, 0, rw, sector);
154+ rc = pmem_do_bvec(pmem, page, PAGE_SIZE, 0, rw, sector);
155155 if (rw & WRITE)
156156 wmb_pmem();
157157
drivers/oprofile/oprofilefs.c+2−2
@@ -239,8 +239,8 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) · 238 unmodified lines
239239 {
240240 struct inode *root_inode;
241241
242− sb->s_blocksize = PAGE_CACHE_SIZE;
243− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
242+ sb->s_blocksize = PAGE_SIZE;
243+ sb->s_blocksize_bits = PAGE_SHIFT;
244244 sb->s_magic = OPROFILEFS_MAGIC;
245245 sb->s_op = &s_ops;
246246 sb->s_time_gran = 1;
drivers/scsi/sd.c+1−1
@@ -2891,7 +2891,7 @@ static int sd_revalidate_disk(struct gendisk *disk) · 2890 unmodified lines
28912891 if (sdkp->opt_xfer_blocks &&
28922892 sdkp->opt_xfer_blocks <= dev_max &&
28932893 sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS &&
2894− sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_CACHE_SIZE)
2894+ sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_SIZE)
28952895 rw_max = q->limits.io_opt =
28962896 sdkp->opt_xfer_blocks * sdp->sector_size;
28972897 else
drivers/scsi/st.c+2−2
@@ -4941,7 +4941,7 @@ static int sgl_map_user_pages(struct st_buffer *STbp, · 4940 unmodified lines
49414941 out_unmap:
49424942 if (res > 0) {
49434943 for (j=0; j < res; j++)
4944− page_cache_release(pages[j]);
4944+ put_page(pages[j]);
49454945 res = 0;
49464946 }
49474947 kfree(pages);
@@ -4963,7 +4963,7 @@ static int sgl_unmap_user_pages(struct st_buffer *STbp, · 15 unmodified lines
49634963 /* FIXME: cache flush missing for rw==READ
49644964 * FIXME: call the correct reference counting function
49654965 */
4966− page_cache_release(page);
4966+ put_page(page);
49674967 }
49684968 kfree(STbp->mapped_pages);
49694969 STbp->mapped_pages = NULL;
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h+1−1
@@ -88,7 +88,7 @@ do { \ · 87 unmodified lines
8888 } while (0)
8989
9090 #ifndef LIBCFS_VMALLOC_SIZE
91−#define LIBCFS_VMALLOC_SIZE (2 << PAGE_CACHE_SHIFT) /* 2 pages */
91+#define LIBCFS_VMALLOC_SIZE (2 << PAGE_SHIFT) /* 2 pages */
9292 #endif
9393
9494 #define LIBCFS_ALLOC_PRE(size, mask) \
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h+2−2
@@ -57,7 +57,7 @@ · 56 unmodified lines
5757 #include "../libcfs_cpu.h"
5858 #endif
5959
60−#define CFS_PAGE_MASK (~((__u64)PAGE_CACHE_SIZE-1))
60+#define CFS_PAGE_MASK (~((__u64)PAGE_SIZE-1))
6161 #define page_index(p) ((p)->index)
6262
6363 #define memory_pressure_get() (current->flags & PF_MEMALLOC)
@@ -67,7 +67,7 @@ · 3 unmodified lines
6767 #if BITS_PER_LONG == 32
6868 /* limit to lowmem on 32-bit systems */
6969 #define NUM_CACHEPAGES \
70− min(totalram_pages, 1UL << (30 - PAGE_CACHE_SHIFT) * 3 / 4)
70+ min(totalram_pages, 1UL << (30 - PAGE_SHIFT) * 3 / 4)
7171 #else
7272 #define NUM_CACHEPAGES totalram_pages
7373 #endif
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c+1−1
@@ -291,7 +291,7 @@ ksocknal_lib_kiov_vmap(lnet_kiov_t *kiov, int niov, · 290 unmodified lines
291291
292292 for (nob = i = 0; i < niov; i++) {
293293 if ((kiov[i].kiov_offset && i > 0) ||
294− (kiov[i].kiov_offset + kiov[i].kiov_len != PAGE_CACHE_SIZE && i < niov - 1))
294+ (kiov[i].kiov_offset + kiov[i].kiov_len != PAGE_SIZE && i < niov - 1))
295295 return NULL;
296296
297297 pages[i] = kiov[i].kiov_page;
drivers/staging/lustre/lnet/libcfs/debug.c+1−1
@@ -517,7 +517,7 @@ int libcfs_debug_init(unsigned long bufsize) · 516 unmodified lines
517517 max = TCD_MAX_PAGES;
518518 } else {
519519 max = max / num_possible_cpus();
520− max <<= (20 - PAGE_CACHE_SHIFT);
520+ max <<= (20 - PAGE_SHIFT);
521521 }
522522 rc = cfs_tracefile_init(max);
523523
drivers/staging/lustre/lnet/libcfs/tracefile.c+8−8
@@ -182,7 +182,7 @@ cfs_trace_get_tage_try(struct cfs_trace_cpu_data *tcd, unsigned long len) · 181 unmodified lines
182182 if (tcd->tcd_cur_pages > 0) {
183183 __LASSERT(!list_empty(&tcd->tcd_pages));
184184 tage = cfs_tage_from_list(tcd->tcd_pages.prev);
185− if (tage->used + len <= PAGE_CACHE_SIZE)
185+ if (tage->used + len <= PAGE_SIZE)
186186 return tage;
187187 }
188188
@@ -260,7 +260,7 @@ static struct cfs_trace_page *cfs_trace_get_tage(struct cfs_trace_cpu_data *tcd, · 71 unmodified lines
260260 * from here: this will lead to infinite recursion.
261261 */
262262
263− if (len > PAGE_CACHE_SIZE) {
263+ if (len > PAGE_SIZE) {
264264 pr_err("cowardly refusing to write %lu bytes in a page\n", len);
265265 return NULL;
266266 }
@@ -349,7 +349,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, · 82 unmodified lines
349349 for (i = 0; i < 2; i++) {
350350 tage = cfs_trace_get_tage(tcd, needed + known_size + 1);
351351 if (!tage) {
352− if (needed + known_size > PAGE_CACHE_SIZE)
352+ if (needed + known_size > PAGE_SIZE)
353353 mask |= D_ERROR;
354354
355355 cfs_trace_put_tcd(tcd);
@@ -360,7 +360,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, · 4 unmodified lines
360360 string_buf = (char *)page_address(tage->page) +
361361 tage->used + known_size;
362362
363− max_nob = PAGE_CACHE_SIZE - tage->used - known_size;
363+ max_nob = PAGE_SIZE - tage->used - known_size;
364364 if (max_nob <= 0) {
365365 printk(KERN_EMERG "negative max_nob: %d\n",
366366 max_nob);
@@ -424,7 +424,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, · 57 unmodified lines
424424 __LASSERT(debug_buf == string_buf);
425425
426426 tage->used += needed;
427− __LASSERT(tage->used <= PAGE_CACHE_SIZE);
427+ __LASSERT(tage->used <= PAGE_SIZE);
428428
429429 console:
430430 if ((mask & libcfs_printk) == 0) {
@@ -835,7 +835,7 @@ EXPORT_SYMBOL(cfs_trace_copyout_string); · 404 unmodified lines
835835
836836 int cfs_trace_allocate_string_buffer(char **str, int nob)
837837 {
838− if (nob > 2 * PAGE_CACHE_SIZE) /* string must be "sensible" */
838+ if (nob > 2 * PAGE_SIZE) /* string must be "sensible" */
839839 return -EINVAL;
840840
841841 *str = kmalloc(nob, GFP_KERNEL | __GFP_ZERO);
@@ -951,7 +951,7 @@ int cfs_trace_set_debug_mb(int mb) · 109 unmodified lines
951951 }
952952
953953 mb /= num_possible_cpus();
954− pages = mb << (20 - PAGE_CACHE_SHIFT);
954+ pages = mb << (20 - PAGE_SHIFT);
955955
956956 cfs_tracefile_write_lock();
957957
@@ -977,7 +977,7 @@ int cfs_trace_get_debug_mb(void) · 19 unmodified lines
977977
978978 cfs_tracefile_read_unlock();
979979
980− return (total_pages >> (20 - PAGE_CACHE_SHIFT)) + 1;
980+ return (total_pages >> (20 - PAGE_SHIFT)) + 1;
981981 }
982982
983983 static int tracefiled(void *arg)
drivers/staging/lustre/lnet/libcfs/tracefile.h+3−3
@@ -87,7 +87,7 @@ void libcfs_unregister_panic_notifier(void); · 86 unmodified lines
8787 extern int libcfs_panic_in_progress;
8888 int cfs_trace_max_debug_mb(void);
8989
90−#define TCD_MAX_PAGES (5 << (20 - PAGE_CACHE_SHIFT))
90+#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT))
9191 #define TCD_STOCK_PAGES (TCD_MAX_PAGES)
9292 #define CFS_TRACEFILE_SIZE (500 << 20)
9393
@@ -96,7 +96,7 @@ int cfs_trace_max_debug_mb(void); · 2 unmodified lines
9696 /*
9797 * Private declare for tracefile
9898 */
99−#define TCD_MAX_PAGES (5 << (20 - PAGE_CACHE_SHIFT))
99+#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT))
100100 #define TCD_STOCK_PAGES (TCD_MAX_PAGES)
101101
102102 #define CFS_TRACEFILE_SIZE (500 << 20)
@@ -257,7 +257,7 @@ do { \ · 154 unmodified lines
257257 do { \
258258 __LASSERT(tage); \
259259 __LASSERT(tage->page); \
260− __LASSERT(tage->used <= PAGE_CACHE_SIZE); \
260+ __LASSERT(tage->used <= PAGE_SIZE); \
261261 __LASSERT(page_count(tage->page) > 0); \
262262 } while (0)
263263
drivers/staging/lustre/lnet/lnet/lib-md.c+1−1
@@ -139,7 +139,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink) · 138 unmodified lines
139139 for (i = 0; i < (int)niov; i++) {
140140 /* We take the page pointer on trust */
141141 if (lmd->md_iov.kiov[i].kiov_offset +
142− lmd->md_iov.kiov[i].kiov_len > PAGE_CACHE_SIZE)
142+ lmd->md_iov.kiov[i].kiov_len > PAGE_SIZE)
143143 return -EINVAL; /* invalid length */
144144
145145 total_length += lmd->md_iov.kiov[i].kiov_len;
drivers/staging/lustre/lnet/lnet/lib-move.c+3−3
@@ -549,12 +549,12 @@ lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst, · 548 unmodified lines
549549 if (len <= frag_len) {
550550 dst->kiov_len = len;
551551 LASSERT(dst->kiov_offset + dst->kiov_len
552− <= PAGE_CACHE_SIZE);
552+ <= PAGE_SIZE);
553553 return niov;
554554 }
555555
556556 dst->kiov_len = frag_len;
557− LASSERT(dst->kiov_offset + dst->kiov_len <= PAGE_CACHE_SIZE);
557+ LASSERT(dst->kiov_offset + dst->kiov_len <= PAGE_SIZE);
558558
559559 len -= frag_len;
560560 dst++;
@@ -887,7 +887,7 @@ lnet_msg2bufpool(lnet_msg_t *msg) · 326 unmodified lines
887887 rbp = &the_lnet.ln_rtrpools[cpt][0];
888888
889889 LASSERT(msg->msg_len <= LNET_MTU);
890− while (msg->msg_len > (unsigned int)rbp->rbp_npages * PAGE_CACHE_SIZE) {
890+ while (msg->msg_len > (unsigned int)rbp->rbp_npages * PAGE_SIZE) {
891891 rbp++;
892892 LASSERT(rbp < &the_lnet.ln_rtrpools[cpt][LNET_NRBPOOLS]);
893893 }
drivers/staging/lustre/lnet/lnet/lib-socket.c+2−2
@@ -166,9 +166,9 @@ lnet_ipif_enumerate(char ***namesp) · 165 unmodified lines
166166 nalloc = 16; /* first guess at max interfaces */
167167 toobig = 0;
168168 for (;;) {
169− if (nalloc * sizeof(*ifr) > PAGE_CACHE_SIZE) {
169+ if (nalloc * sizeof(*ifr) > PAGE_SIZE) {
170170 toobig = 1;
171− nalloc = PAGE_CACHE_SIZE / sizeof(*ifr);
171+ nalloc = PAGE_SIZE / sizeof(*ifr);
172172 CWARN("Too many interfaces: only enumerating first %d\n",
173173 nalloc);
174174 }
drivers/staging/lustre/lnet/lnet/router.c+3−3
@@ -27,8 +27,8 @@ · 26 unmodified lines
2727 #define LNET_NRB_SMALL_PAGES 1
2828 #define LNET_NRB_LARGE_MIN 256 /* min value for each CPT */
2929 #define LNET_NRB_LARGE (LNET_NRB_LARGE_MIN * 4)
30−#define LNET_NRB_LARGE_PAGES ((LNET_MTU + PAGE_CACHE_SIZE - 1) >> \
31− PAGE_CACHE_SHIFT)
30+#define LNET_NRB_LARGE_PAGES ((LNET_MTU + PAGE_SIZE - 1) >> \
31+ PAGE_SHIFT)
3232
3333 static char *forwarding = "";
3434 module_param(forwarding, charp, 0444);
@@ -1338,7 +1338,7 @@ lnet_new_rtrbuf(lnet_rtrbufpool_t *rbp, int cpt) · 1303 unmodified lines
13381338 return NULL;
13391339 }
13401340
1341− rb->rb_kiov[i].kiov_len = PAGE_CACHE_SIZE;
1341+ rb->rb_kiov[i].kiov_len = PAGE_SIZE;
13421342 rb->rb_kiov[i].kiov_offset = 0;
13431343 rb->rb_kiov[i].kiov_page = page;
13441344 }
drivers/staging/lustre/lnet/selftest/brw_test.c+10−10
@@ -90,7 +90,7 @@ brw_client_init(sfw_test_instance_t *tsi) · 89 unmodified lines
9090 * NB: this is not going to work for variable page size,
9191 * but we have to keep it for compatibility
9292 */
93− len = npg * PAGE_CACHE_SIZE;
93+ len = npg * PAGE_SIZE;
9494
9595 } else {
9696 test_bulk_req_v1_t *breq = &tsi->tsi_u.bulk_v1;
@@ -104,7 +104,7 @@ brw_client_init(sfw_test_instance_t *tsi) · 7 unmodified lines
104104 opc = breq->blk_opc;
105105 flags = breq->blk_flags;
106106 len = breq->blk_len;
107− npg = (len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
107+ npg = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
108108 }
109109
110110 if (npg > LNET_MAX_IOV || npg <= 0)
@@ -167,13 +167,13 @@ brw_fill_page(struct page *pg, int pattern, __u64 magic) · 56 unmodified lines
167167
168168 if (pattern == LST_BRW_CHECK_SIMPLE) {
169169 memcpy(addr, &magic, BRW_MSIZE);
170− addr += PAGE_CACHE_SIZE - BRW_MSIZE;
170+ addr += PAGE_SIZE - BRW_MSIZE;
171171 memcpy(addr, &magic, BRW_MSIZE);
172172 return;
173173 }
174174
175175 if (pattern == LST_BRW_CHECK_FULL) {
176− for (i = 0; i < PAGE_CACHE_SIZE / BRW_MSIZE; i++)
176+ for (i = 0; i < PAGE_SIZE / BRW_MSIZE; i++)
177177 memcpy(addr + i * BRW_MSIZE, &magic, BRW_MSIZE);
178178 return;
179179 }
@@ -198,7 +198,7 @@ brw_check_page(struct page *pg, int pattern, __u64 magic) · 18 unmodified lines
198198 if (data != magic)
199199 goto bad_data;
200200
201− addr += PAGE_CACHE_SIZE - BRW_MSIZE;
201+ addr += PAGE_SIZE - BRW_MSIZE;
202202 data = *((__u64 *)addr);
203203 if (data != magic)
204204 goto bad_data;
@@ -207,7 +207,7 @@ brw_check_page(struct page *pg, int pattern, __u64 magic) · 2 unmodified lines
207207 }
208208
209209 if (pattern == LST_BRW_CHECK_FULL) {
210− for (i = 0; i < PAGE_CACHE_SIZE / BRW_MSIZE; i++) {
210+ for (i = 0; i < PAGE_SIZE / BRW_MSIZE; i++) {
211211 data = *(((__u64 *)addr) + i);
212212 if (data != magic)
213213 goto bad_data;
@@ -278,7 +278,7 @@ brw_client_prep_rpc(sfw_test_unit_t *tsu, · 64 unmodified lines
278278 opc = breq->blk_opc;
279279 flags = breq->blk_flags;
280280 npg = breq->blk_npg;
281− len = npg * PAGE_CACHE_SIZE;
281+ len = npg * PAGE_SIZE;
282282
283283 } else {
284284 test_bulk_req_v1_t *breq = &tsi->tsi_u.bulk_v1;
@@ -292,7 +292,7 @@ brw_client_prep_rpc(sfw_test_unit_t *tsu, · 7 unmodified lines
292292 opc = breq->blk_opc;
293293 flags = breq->blk_flags;
294294 len = breq->blk_len;
295− npg = (len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
295+ npg = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
296296 }
297297
298298 rc = sfw_create_test_rpc(tsu, dest, sn->sn_features, npg, len, &rpc);
@@ -463,10 +463,10 @@ brw_server_handle(struct srpc_server_rpc *rpc) · 164 unmodified lines
463463 reply->brw_status = EINVAL;
464464 return 0;
465465 }
466− npg = reqst->brw_len >> PAGE_CACHE_SHIFT;
466+ npg = reqst->brw_len >> PAGE_SHIFT;
467467
468468 } else {
469− npg = (reqst->brw_len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
469+ npg = (reqst->brw_len + PAGE_SIZE - 1) >> PAGE_SHIFT;
470470 }
471471
472472 replymsg->msg_ses_feats = reqstmsg->msg_ses_feats;
drivers/staging/lustre/lnet/selftest/conctl.c+2−2
@@ -743,7 +743,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args) · 742 unmodified lines
743743 if (args->lstio_tes_param &&
744744 (args->lstio_tes_param_len <= 0 ||
745745 args->lstio_tes_param_len >
746− PAGE_CACHE_SIZE - sizeof(lstcon_test_t)))
746+ PAGE_SIZE - sizeof(lstcon_test_t)))
747747 return -EINVAL;
748748
749749 LIBCFS_ALLOC(batch_name, args->lstio_tes_bat_nmlen + 1);
@@ -819,7 +819,7 @@ lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr) · 69 unmodified lines
819819
820820 opc = data->ioc_u32[0];
821821
822− if (data->ioc_plen1 > PAGE_CACHE_SIZE)
822+ if (data->ioc_plen1 > PAGE_SIZE)
823823 return -EINVAL;
824824
825825 LIBCFS_ALLOC(buf, data->ioc_plen1);
drivers/staging/lustre/lnet/selftest/conrpc.c+5−5
@@ -786,8 +786,8 @@ lstcon_bulkrpc_v0_prep(lst_test_bulk_param_t *param, srpc_test_reqst_t *req) · 785 unmodified lines
786786 test_bulk_req_t *brq = &req->tsr_u.bulk_v0;
787787
788788 brq->blk_opc = param->blk_opc;
789− brq->blk_npg = (param->blk_size + PAGE_CACHE_SIZE - 1) /
790− PAGE_CACHE_SIZE;
789+ brq->blk_npg = (param->blk_size + PAGE_SIZE - 1) /
790+ PAGE_SIZE;
791791 brq->blk_flags = param->blk_flags;
792792
793793 return 0;
@@ -822,7 +822,7 @@ lstcon_testrpc_prep(lstcon_node_t *nd, int transop, unsigned feats, · 28 unmodified lines
822822 if (transop == LST_TRANS_TSBCLIADD) {
823823 npg = sfw_id_pages(test->tes_span);
824824 nob = !(feats & LST_FEAT_BULK_LEN) ?
825− npg * PAGE_CACHE_SIZE :
825+ npg * PAGE_SIZE :
826826 sizeof(lnet_process_id_packed_t) * test->tes_span;
827827 }
828828
@@ -851,8 +851,8 @@ lstcon_testrpc_prep(lstcon_node_t *nd, int transop, unsigned feats, · 22 unmodified lines
851851 LASSERT(nob > 0);
852852
853853 len = !(feats & LST_FEAT_BULK_LEN) ?
854− PAGE_CACHE_SIZE :
855− min_t(int, nob, PAGE_CACHE_SIZE);
854+ PAGE_SIZE :
855+ min_t(int, nob, PAGE_SIZE);
856856 nob -= len;
857857
858858 bulk->bk_iovs[i].kiov_offset = 0;
drivers/staging/lustre/lnet/selftest/framework.c+1−1
@@ -1161,7 +1161,7 @@ sfw_add_test(struct srpc_server_rpc *rpc) · 1160 unmodified lines
11611161 int len;
11621162
11631163 if (!(sn->sn_features & LST_FEAT_BULK_LEN)) {
1164− len = npg * PAGE_CACHE_SIZE;
1164+ len = npg * PAGE_SIZE;
11651165
11661166 } else {
11671167 len = sizeof(lnet_process_id_packed_t) *
drivers/staging/lustre/lnet/selftest/rpc.c+1−1
@@ -90,7 +90,7 @@ void srpc_set_counters(const srpc_counters_t *cnt) · 89 unmodified lines
9090 static int
9191 srpc_add_bulk_page(srpc_bulk_t *bk, struct page *pg, int i, int nob)
9292 {
93− nob = min_t(int, nob, PAGE_CACHE_SIZE);
93+ nob = min_t(int, nob, PAGE_SIZE);
9494
9595 LASSERT(nob > 0);
9696 LASSERT(i >= 0 && i < bk->bk_niov);
drivers/staging/lustre/lnet/selftest/selftest.h+1−1
@@ -393,7 +393,7 @@ typedef struct sfw_test_instance { · 392 unmodified lines
393393 /* XXX: trailing (PAGE_CACHE_SIZE % sizeof(lnet_process_id_t)) bytes at
394394 * the end of pages are not used */
395395 #define SFW_MAX_CONCUR LST_MAX_CONCUR
396−#define SFW_ID_PER_PAGE (PAGE_CACHE_SIZE / sizeof(lnet_process_id_packed_t))
396+#define SFW_ID_PER_PAGE (PAGE_SIZE / sizeof(lnet_process_id_packed_t))
397397 #define SFW_MAX_NDESTS (LNET_MAX_IOV * SFW_ID_PER_PAGE)
398398 #define sfw_id_pages(n) (((n) + SFW_ID_PER_PAGE - 1) / SFW_ID_PER_PAGE)
399399
drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h+1−1
@@ -52,7 +52,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page) · 51 unmodified lines
5252 return;
5353
5454 if (PagePrivate(page))
55− page->mapping->a_ops->invalidatepage(page, 0, PAGE_CACHE_SIZE);
55+ page->mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
5656
5757 cancel_dirty_page(page);
5858 ClearPageMappedToDisk(page);
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h+1−1
@@ -1031,7 +1031,7 @@ static inline int lu_dirent_size(struct lu_dirent *ent) · 1030 unmodified lines
10311031 #define LU_PAGE_SIZE (1UL << LU_PAGE_SHIFT)
10321032 #define LU_PAGE_MASK (~(LU_PAGE_SIZE - 1))
10331033
1034−#define LU_PAGE_COUNT (1 << (PAGE_CACHE_SHIFT - LU_PAGE_SHIFT))
1034+#define LU_PAGE_COUNT (1 << (PAGE_SHIFT - LU_PAGE_SHIFT))
10351035
10361036 /** @} lu_dir */
10371037
drivers/staging/lustre/lustre/include/lustre_mdc.h+2−2
@@ -155,12 +155,12 @@ static inline void mdc_update_max_ea_from_body(struct obd_export *exp, · 154 unmodified lines
155155 if (cli->cl_max_mds_easize < body->max_mdsize) {
156156 cli->cl_max_mds_easize = body->max_mdsize;
157157 cli->cl_default_mds_easize =
158− min_t(__u32, body->max_mdsize, PAGE_CACHE_SIZE);
158+ min_t(__u32, body->max_mdsize, PAGE_SIZE);
159159 }
160160 if (cli->cl_max_mds_cookiesize < body->max_cookiesize) {
161161 cli->cl_max_mds_cookiesize = body->max_cookiesize;
162162 cli->cl_default_mds_cookiesize =
163− min_t(__u32, body->max_cookiesize, PAGE_CACHE_SIZE);
163+ min_t(__u32, body->max_cookiesize, PAGE_SIZE);
164164 }
165165 }
166166 }
drivers/staging/lustre/lustre/include/lustre_net.h+3−3
@@ -99,13 +99,13 @@ · 98 unmodified lines
9999 */
100100 #define PTLRPC_MAX_BRW_BITS (LNET_MTU_BITS + PTLRPC_BULK_OPS_BITS)
101101 #define PTLRPC_MAX_BRW_SIZE (1 << PTLRPC_MAX_BRW_BITS)
102−#define PTLRPC_MAX_BRW_PAGES (PTLRPC_MAX_BRW_SIZE >> PAGE_CACHE_SHIFT)
102+#define PTLRPC_MAX_BRW_PAGES (PTLRPC_MAX_BRW_SIZE >> PAGE_SHIFT)
103103
104104 #define ONE_MB_BRW_SIZE (1 << LNET_MTU_BITS)
105105 #define MD_MAX_BRW_SIZE (1 << LNET_MTU_BITS)
106−#define MD_MAX_BRW_PAGES (MD_MAX_BRW_SIZE >> PAGE_CACHE_SHIFT)
106+#define MD_MAX_BRW_PAGES (MD_MAX_BRW_SIZE >> PAGE_SHIFT)
107107 #define DT_MAX_BRW_SIZE PTLRPC_MAX_BRW_SIZE
108−#define DT_MAX_BRW_PAGES (DT_MAX_BRW_SIZE >> PAGE_CACHE_SHIFT)
108+#define DT_MAX_BRW_PAGES (DT_MAX_BRW_SIZE >> PAGE_SHIFT)
109109 #define OFD_MAX_BRW_SIZE (1 << LNET_MTU_BITS)
110110
111111 /* When PAGE_SIZE is a constant, we can check our arithmetic here with cpp! */
drivers/staging/lustre/lustre/include/obd.h+1−1
@@ -1318,7 +1318,7 @@ bad_format: · 1317 unmodified lines
13181318
13191319 static inline int cli_brw_size(struct obd_device *obd)
13201320 {
1321− return obd->u.cli.cl_max_pages_per_rpc << PAGE_CACHE_SHIFT;
1321+ return obd->u.cli.cl_max_pages_per_rpc << PAGE_SHIFT;
13221322 }
13231323
13241324 #endif /* __OBD_H */
drivers/staging/lustre/lustre/include/obd_support.h+1−1
@@ -500,7 +500,7 @@ extern char obd_jobid_var[]; · 499 unmodified lines
500500
501501 #ifdef POISON_BULK
502502 #define POISON_PAGE(page, val) do { \
503− memset(kmap(page), val, PAGE_CACHE_SIZE); \
503+ memset(kmap(page), val, PAGE_SIZE); \
504504 kunmap(page); \
505505 } while (0)
506506 #else
drivers/staging/lustre/lustre/lclient/lcommon_cl.c+2−2
@@ -758,9 +758,9 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, · 757 unmodified lines
758758 * --bug 17336
759759 */
760760 loff_t size = cl_isize_read(inode);
761− loff_t cur_index = start >> PAGE_CACHE_SHIFT;
761+ loff_t cur_index = start >> PAGE_SHIFT;
762762 loff_t size_index = (size - 1) >>
763− PAGE_CACHE_SHIFT;
763+ PAGE_SHIFT;
764764
765765 if ((size == 0 && cur_index != 0) ||
766766 size_index < cur_index)
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c+6−6
@@ -307,8 +307,8 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) · 306 unmodified lines
307307 cli->cl_avail_grant = 0;
308308 /* FIXME: Should limit this for the sum of all cl_dirty_max. */
309309 cli->cl_dirty_max = OSC_MAX_DIRTY_DEFAULT * 1024 * 1024;
310− if (cli->cl_dirty_max >> PAGE_CACHE_SHIFT > totalram_pages / 8)
311− cli->cl_dirty_max = totalram_pages << (PAGE_CACHE_SHIFT - 3);
310+ if (cli->cl_dirty_max >> PAGE_SHIFT > totalram_pages / 8)
311+ cli->cl_dirty_max = totalram_pages << (PAGE_SHIFT - 3);
312312 INIT_LIST_HEAD(&cli->cl_cache_waiters);
313313 INIT_LIST_HEAD(&cli->cl_loi_ready_list);
314314 INIT_LIST_HEAD(&cli->cl_loi_hp_ready_list);
@@ -353,15 +353,15 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) · 38 unmodified lines
353353 * In the future this should likely be increased. LU-1431
354354 */
355355 cli->cl_max_pages_per_rpc = min_t(int, PTLRPC_MAX_BRW_PAGES,
356− LNET_MTU >> PAGE_CACHE_SHIFT);
356+ LNET_MTU >> PAGE_SHIFT);
357357
358358 if (!strcmp(name, LUSTRE_MDC_NAME)) {
359359 cli->cl_max_rpcs_in_flight = MDC_MAX_RIF_DEFAULT;
360− } else if (totalram_pages >> (20 - PAGE_CACHE_SHIFT) <= 128 /* MB */) {
360+ } else if (totalram_pages >> (20 - PAGE_SHIFT) <= 128 /* MB */) {
361361 cli->cl_max_rpcs_in_flight = 2;
362− } else if (totalram_pages >> (20 - PAGE_CACHE_SHIFT) <= 256 /* MB */) {
362+ } else if (totalram_pages >> (20 - PAGE_SHIFT) <= 256 /* MB */) {
363363 cli->cl_max_rpcs_in_flight = 3;
364− } else if (totalram_pages >> (20 - PAGE_CACHE_SHIFT) <= 512 /* MB */) {
364+ } else if (totalram_pages >> (20 - PAGE_SHIFT) <= 512 /* MB */) {
365365 cli->cl_max_rpcs_in_flight = 4;
366366 } else {
367367 cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT;
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c+1−1
@@ -107,7 +107,7 @@ · 106 unmodified lines
107107 /*
108108 * 50 ldlm locks for 1MB of RAM.
109109 */
110−#define LDLM_POOL_HOST_L ((NUM_CACHEPAGES >> (20 - PAGE_CACHE_SHIFT)) * 50)
110+#define LDLM_POOL_HOST_L ((NUM_CACHEPAGES >> (20 - PAGE_SHIFT)) * 50)
111111
112112 /*
113113 * Maximal possible grant step plan in %.
drivers/staging/lustre/lustre/ldlm/ldlm_request.c+1−1
@@ -546,7 +546,7 @@ static inline int ldlm_req_handles_avail(int req_size, int off) · 545 unmodified lines
546546 {
547547 int avail;
548548
549− avail = min_t(int, LDLM_MAXREQSIZE, PAGE_CACHE_SIZE - 512) - req_size;
549+ avail = min_t(int, LDLM_MAXREQSIZE, PAGE_SIZE - 512) - req_size;
550550 if (likely(avail >= 0))
551551 avail /= (int)sizeof(struct lustre_handle);
552552 else
drivers/staging/lustre/lustre/llite/dir.c+9−9
@@ -153,7 +153,7 @@ static int ll_dir_filler(void *_hash, struct page *page0) · 152 unmodified lines
153153 struct page **page_pool;
154154 struct page *page;
155155 struct lu_dirpage *dp;
156− int max_pages = ll_i2sbi(inode)->ll_md_brw_size >> PAGE_CACHE_SHIFT;
156+ int max_pages = ll_i2sbi(inode)->ll_md_brw_size >> PAGE_SHIFT;
157157 int nrdpgs = 0; /* number of pages read actually */
158158 int npages;
159159 int i;
@@ -193,8 +193,8 @@ static int ll_dir_filler(void *_hash, struct page *page0) · 33 unmodified lines
193193 if (body->valid & OBD_MD_FLSIZE)
194194 cl_isize_write(inode, body->size);
195195
196− nrdpgs = (request->rq_bulk->bd_nob_transferred+PAGE_CACHE_SIZE-1)
197− >> PAGE_CACHE_SHIFT;
196+ nrdpgs = (request->rq_bulk->bd_nob_transferred+PAGE_SIZE-1)
197+ >> PAGE_SHIFT;
198198 SetPageUptodate(page0);
199199 }
200200 unlock_page(page0);
@@ -209,7 +209,7 @@ static int ll_dir_filler(void *_hash, struct page *page0) · 8 unmodified lines
209209 page = page_pool[i];
210210
211211 if (rc < 0 || i >= nrdpgs) {
212− page_cache_release(page);
212+ put_page(page);
213213 continue;
214214 }
215215
@@ -230,7 +230,7 @@ static int ll_dir_filler(void *_hash, struct page *page0) · 14 unmodified lines
230230 CDEBUG(D_VFSTRACE, "page %lu add to page cache failed: %d\n",
231231 offset, ret);
232232 }
233− page_cache_release(page);
233+ put_page(page);
234234 }
235235
236236 if (page_pool != &page0)
@@ -247,7 +247,7 @@ void ll_release_page(struct page *page, int remove) · 10 unmodified lines
247247 truncate_complete_page(page->mapping, page);
248248 unlock_page(page);
249249 }
250− page_cache_release(page);
250+ put_page(page);
251251 }
252252
253253 /*
@@ -273,7 +273,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash, · 19 unmodified lines
273273 if (found > 0 && !radix_tree_exceptional_entry(page)) {
274274 struct lu_dirpage *dp;
275275
276− page_cache_get(page);
276+ get_page(page);
277277 spin_unlock_irq(&mapping->tree_lock);
278278 /*
279279 * In contrast to find_lock_page() we are sure that directory
@@ -313,7 +313,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash, · 33 unmodified lines
313313 page = NULL;
314314 }
315315 } else {
316− page_cache_release(page);
316+ put_page(page);
317317 page = ERR_PTR(-EIO);
318318 }
319319
@@ -1507,7 +1507,7 @@ skip_lmm: · 1187 unmodified lines
15071507 st.st_gid = body->gid;
15081508 st.st_rdev = body->rdev;
15091509 st.st_size = body->size;
1510− st.st_blksize = PAGE_CACHE_SIZE;
1510+ st.st_blksize = PAGE_SIZE;
15111511 st.st_blocks = body->blocks;
15121512 st.st_atime = body->atime;
15131513 st.st_mtime = body->mtime;
drivers/staging/lustre/lustre/llite/llite_internal.h+4−4
@@ -310,10 +310,10 @@ static inline struct ll_inode_info *ll_i2info(struct inode *inode) · 309 unmodified lines
310310 /* default to about 40meg of readahead on a given system. That much tied
311311 * up in 512k readahead requests serviced at 40ms each is about 1GB/s.
312312 */
313−#define SBI_DEFAULT_READAHEAD_MAX (40UL << (20 - PAGE_CACHE_SHIFT))
313+#define SBI_DEFAULT_READAHEAD_MAX (40UL << (20 - PAGE_SHIFT))
314314
315315 /* default to read-ahead full files smaller than 2MB on the second read */
316−#define SBI_DEFAULT_READAHEAD_WHOLE_MAX (2UL << (20 - PAGE_CACHE_SHIFT))
316+#define SBI_DEFAULT_READAHEAD_WHOLE_MAX (2UL << (20 - PAGE_SHIFT))
317317
318318 enum ra_stat {
319319 RA_STAT_HIT = 0,
@@ -975,13 +975,13 @@ struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr, · 655 unmodified lines
975975 static inline void ll_invalidate_page(struct page *vmpage)
976976 {
977977 struct address_space *mapping = vmpage->mapping;
978− loff_t offset = vmpage->index << PAGE_CACHE_SHIFT;
978+ loff_t offset = vmpage->index << PAGE_SHIFT;
979979
980980 LASSERT(PageLocked(vmpage));
981981 if (!mapping)
982982 return;
983983
984− ll_teardown_mmaps(mapping, offset, offset + PAGE_CACHE_SIZE);
984+ ll_teardown_mmaps(mapping, offset, offset + PAGE_SIZE);
985985 truncate_complete_page(mapping, vmpage);
986986 }
987987
drivers/staging/lustre/lustre/llite/llite_lib.c+4−4
@@ -85,7 +85,7 @@ static struct ll_sb_info *ll_init_sbi(struct super_block *sb) · 84 unmodified lines
8585
8686 si_meminfo(&si);
8787 pages = si.totalram - si.totalhigh;
88− if (pages >> (20 - PAGE_CACHE_SHIFT) < 512)
88+ if (pages >> (20 - PAGE_SHIFT) < 512)
8989 lru_page_max = pages / 2;
9090 else
9191 lru_page_max = (pages / 4) * 3;
@@ -272,12 +272,12 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, · 180 unmodified lines
272272 valid != CLIENT_CONNECT_MDT_REQD) {
273273 char *buf;
274274
275− buf = kzalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
275+ buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
276276 if (!buf) {
277277 err = -ENOMEM;
278278 goto out_md_fid;
279279 }
280− obd_connect_flags2str(buf, PAGE_CACHE_SIZE,
280+ obd_connect_flags2str(buf, PAGE_SIZE,
281281 valid ^ CLIENT_CONNECT_MDT_REQD, ",");
282282 LCONSOLE_ERROR_MSG(0x170, "Server %s does not support feature(s) needed for correct operation of this client (%s). Please upgrade server or downgrade client.\n",
283283 sbi->ll_md_exp->exp_obd->obd_name, buf);
@@ -335,7 +335,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, · 51 unmodified lines
335335 if (data->ocd_connect_flags & OBD_CONNECT_BRW_SIZE)
336336 sbi->ll_md_brw_size = data->ocd_brw_size;
337337 else
338− sbi->ll_md_brw_size = PAGE_CACHE_SIZE;
338+ sbi->ll_md_brw_size = PAGE_SIZE;
339339
340340 if (data->ocd_connect_flags & OBD_CONNECT_LAYOUTLOCK) {
341341 LCONSOLE_INFO("Layout lock feature supported.\n");
drivers/staging/lustre/lustre/llite/llite_mmap.c+4−4
@@ -58,7 +58,7 @@ void policy_from_vma(ldlm_policy_data_t *policy, · 57 unmodified lines
5858 size_t count)
5959 {
6060 policy->l_extent.start = ((addr - vma->vm_start) & CFS_PAGE_MASK) +
61− (vma->vm_pgoff << PAGE_CACHE_SHIFT);
61+ (vma->vm_pgoff << PAGE_SHIFT);
6262 policy->l_extent.end = (policy->l_extent.start + count - 1) |
6363 ~CFS_PAGE_MASK;
6464 }
@@ -321,7 +321,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) · 256 unmodified lines
321321
322322 vmpage = vio->u.fault.ft_vmpage;
323323 if (result != 0 && vmpage) {
324− page_cache_release(vmpage);
324+ put_page(vmpage);
325325 vmf->page = NULL;
326326 }
327327 }
@@ -360,7 +360,7 @@ restart: · 32 unmodified lines
360360 lock_page(vmpage);
361361 if (unlikely(!vmpage->mapping)) { /* unlucky */
362362 unlock_page(vmpage);
363− page_cache_release(vmpage);
363+ put_page(vmpage);
364364 vmf->page = NULL;
365365
366366 if (!printed && ++count > 16) {
@@ -457,7 +457,7 @@ int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last) · 90 unmodified lines
457457 LASSERTF(last > first, "last %llu first %llu\n", last, first);
458458 if (mapping_mapped(mapping)) {
459459 rc = 0;
460− unmap_mapping_range(mapping, first + PAGE_CACHE_SIZE - 1,
460+ unmap_mapping_range(mapping, first + PAGE_SIZE - 1,
461461 last - first + 1, 0);
462462 }
463463
drivers/staging/lustre/lustre/llite/lloop.c+6−6
@@ -218,7 +218,7 @@ static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head) · 217 unmodified lines
218218 offset = (pgoff_t)(bio->bi_iter.bi_sector << 9) + lo->lo_offset;
219219 bio_for_each_segment(bvec, bio, iter) {
220220 BUG_ON(bvec.bv_offset != 0);
221− BUG_ON(bvec.bv_len != PAGE_CACHE_SIZE);
221+ BUG_ON(bvec.bv_len != PAGE_SIZE);
222222
223223 pages[page_count] = bvec.bv_page;
224224 offsets[page_count] = offset;
@@ -232,7 +232,7 @@ static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head) · 7 unmodified lines
232232 (rw == WRITE) ? LPROC_LL_BRW_WRITE : LPROC_LL_BRW_READ,
233233 page_count);
234234
235− pvec->ldp_size = page_count << PAGE_CACHE_SHIFT;
235+ pvec->ldp_size = page_count << PAGE_SHIFT;
236236 pvec->ldp_nr = page_count;
237237
238238 /* FIXME: in ll_direct_rw_pages, it has to allocate many cl_page{}s to
@@ -507,7 +507,7 @@ static int loop_set_fd(struct lloop_device *lo, struct file *unused, · 268 unmodified lines
507507
508508 set_device_ro(bdev, (lo_flags & LO_FLAGS_READ_ONLY) != 0);
509509
510− lo->lo_blocksize = PAGE_CACHE_SIZE;
510+ lo->lo_blocksize = PAGE_SIZE;
511511 lo->lo_device = bdev;
512512 lo->lo_flags = lo_flags;
513513 lo->lo_backing_file = file;
@@ -525,11 +525,11 @@ static int loop_set_fd(struct lloop_device *lo, struct file *unused, · 11 unmodified lines
525525 lo->lo_queue->queuedata = lo;
526526
527527 /* queue parameters */
528− CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));
528+ CLASSERT(PAGE_SIZE < (1 << (sizeof(unsigned short) * 8)));
529529 blk_queue_logical_block_size(lo->lo_queue,
530− (unsigned short)PAGE_CACHE_SIZE);
530+ (unsigned short)PAGE_SIZE);
531531 blk_queue_max_hw_sectors(lo->lo_queue,
532− LLOOP_MAX_SEGMENTS << (PAGE_CACHE_SHIFT - 9));
532+ LLOOP_MAX_SEGMENTS << (PAGE_SHIFT - 9));
533533 blk_queue_max_segments(lo->lo_queue, LLOOP_MAX_SEGMENTS);
534534
535535 set_capacity(disks[lo->lo_number], size);
drivers/staging/lustre/lustre/llite/lproc_llite.c+9−9
@@ -233,7 +233,7 @@ static ssize_t max_read_ahead_mb_show(struct kobject *kobj, · 232 unmodified lines
233233 pages_number = sbi->ll_ra_info.ra_max_pages;
234234 spin_unlock(&sbi->ll_lock);
235235
236− mult = 1 << (20 - PAGE_CACHE_SHIFT);
236+ mult = 1 << (20 - PAGE_SHIFT);
237237 return lprocfs_read_frac_helper(buf, PAGE_SIZE, pages_number, mult);
238238 }
239239
@@ -251,12 +251,12 @@ static ssize_t max_read_ahead_mb_store(struct kobject *kobj, · 11 unmodified lines
251251 if (rc)
252252 return rc;
253253
254− pages_number *= 1 << (20 - PAGE_CACHE_SHIFT); /* MB -> pages */
254+ pages_number *= 1 << (20 - PAGE_SHIFT); /* MB -> pages */
255255
256256 if (pages_number > totalram_pages / 2) {
257257
258258 CERROR("can't set file readahead more than %lu MB\n",
259− totalram_pages >> (20 - PAGE_CACHE_SHIFT + 1)); /*1/2 of RAM*/
259+ totalram_pages >> (20 - PAGE_SHIFT + 1)); /*1/2 of RAM*/
260260 return -ERANGE;
261261 }
262262
@@ -281,7 +281,7 @@ static ssize_t max_read_ahead_per_file_mb_show(struct kobject *kobj, · 18 unmodified lines
281281 pages_number = sbi->ll_ra_info.ra_max_pages_per_file;
282282 spin_unlock(&sbi->ll_lock);
283283
284− mult = 1 << (20 - PAGE_CACHE_SHIFT);
284+ mult = 1 << (20 - PAGE_SHIFT);
285285 return lprocfs_read_frac_helper(buf, PAGE_SIZE, pages_number, mult);
286286 }
287287
@@ -326,7 +326,7 @@ static ssize_t max_read_ahead_whole_mb_show(struct kobject *kobj, · 38 unmodified lines
326326 pages_number = sbi->ll_ra_info.ra_max_read_ahead_whole_pages;
327327 spin_unlock(&sbi->ll_lock);
328328
329− mult = 1 << (20 - PAGE_CACHE_SHIFT);
329+ mult = 1 << (20 - PAGE_SHIFT);
330330 return lprocfs_read_frac_helper(buf, PAGE_SIZE, pages_number, mult);
331331 }
332332
@@ -349,7 +349,7 @@ static ssize_t max_read_ahead_whole_mb_store(struct kobject *kobj, · 16 unmodified lines
349349 */
350350 if (pages_number > sbi->ll_ra_info.ra_max_pages_per_file) {
351351 CERROR("can't set max_read_ahead_whole_mb more than max_read_ahead_per_file_mb: %lu\n",
352− sbi->ll_ra_info.ra_max_pages_per_file >> (20 - PAGE_CACHE_SHIFT));
352+ sbi->ll_ra_info.ra_max_pages_per_file >> (20 - PAGE_SHIFT));
353353 return -ERANGE;
354354 }
355355
@@ -366,7 +366,7 @@ static int ll_max_cached_mb_seq_show(struct seq_file *m, void *v) · 10 unmodified lines
366366 struct super_block *sb = m->private;
367367 struct ll_sb_info *sbi = ll_s2sbi(sb);
368368 struct cl_client_cache *cache = &sbi->ll_cache;
369− int shift = 20 - PAGE_CACHE_SHIFT;
369+ int shift = 20 - PAGE_SHIFT;
370370 int max_cached_mb;
371371 int unused_mb;
372372
@@ -405,7 +405,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, · 32 unmodified lines
405405 return -EFAULT;
406406 kernbuf[count] = 0;
407407
408− mult = 1 << (20 - PAGE_CACHE_SHIFT);
408+ mult = 1 << (20 - PAGE_SHIFT);
409409 buffer += lprocfs_find_named_value(kernbuf, "max_cached_mb:", &count) -
410410 kernbuf;
411411 rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult);
@@ -415,7 +415,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, · 3 unmodified lines
415415 if (pages_number < 0 || pages_number > totalram_pages) {
416416 CERROR("%s: can't set max cache more than %lu MB\n",
417417 ll_get_fsname(sb, NULL, 0),
418− totalram_pages >> (20 - PAGE_CACHE_SHIFT));
418+ totalram_pages >> (20 - PAGE_SHIFT));
419419 return -ERANGE;
420420 }
421421
drivers/staging/lustre/lustre/llite/rw.c+11−11
@@ -146,10 +146,10 @@ static struct ll_cl_context *ll_cl_init(struct file *file, · 145 unmodified lines
146146 */
147147 io->ci_lockreq = CILR_NEVER;
148148
149− pos = vmpage->index << PAGE_CACHE_SHIFT;
149+ pos = vmpage->index << PAGE_SHIFT;
150150
151151 /* Create a temp IO to serve write. */
152− result = cl_io_rw_init(env, io, CIT_WRITE, pos, PAGE_CACHE_SIZE);
152+ result = cl_io_rw_init(env, io, CIT_WRITE, pos, PAGE_SIZE);
153153 if (result == 0) {
154154 cio->cui_fd = LUSTRE_FPRIVATE(file);
155155 cio->cui_iter = NULL;
@@ -498,7 +498,7 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io, · 342 unmodified lines
498498 }
499499 if (rc != 1)
500500 unlock_page(vmpage);
501− page_cache_release(vmpage);
501+ put_page(vmpage);
502502 } else {
503503 which = RA_STAT_FAILED_GRAB_PAGE;
504504 msg = "g_c_p_n failed";
@@ -527,7 +527,7 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io, · 22 unmodified lines
527527 * and max_read_ahead_per_file_mb otherwise the readahead budget can be used
528528 * up quickly which will affect read performance significantly. See LU-2816
529529 */
530−#define RAS_INCREASE_STEP(inode) (ONE_MB_BRW_SIZE >> PAGE_CACHE_SHIFT)
530+#define RAS_INCREASE_STEP(inode) (ONE_MB_BRW_SIZE >> PAGE_SHIFT)
531531
532532 static inline int stride_io_mode(struct ll_readahead_state *ras)
533533 {
@@ -739,7 +739,7 @@ int ll_readahead(const struct lu_env *env, struct cl_io *io, · 205 unmodified lines
739739 end = rpc_boundary;
740740
741741 /* Truncate RA window to end of file */
742− end = min(end, (unsigned long)((kms - 1) >> PAGE_CACHE_SHIFT));
742+ end = min(end, (unsigned long)((kms - 1) >> PAGE_SHIFT));
743743
744744 ras->ras_next_readahead = max(end, end + 1);
745745 RAS_CDEBUG(ras);
@@ -776,7 +776,7 @@ int ll_readahead(const struct lu_env *env, struct cl_io *io, · 30 unmodified lines
776776 if (reserved != 0)
777777 ll_ra_count_put(ll_i2sbi(inode), reserved);
778778
779− if (ra_end == end + 1 && ra_end == (kms >> PAGE_CACHE_SHIFT))
779+ if (ra_end == end + 1 && ra_end == (kms >> PAGE_SHIFT))
780780 ll_ra_stats_inc(mapping, RA_STAT_EOF);
781781
782782 /* if we didn't get to the end of the region we reserved from
@@ -985,8 +985,8 @@ void ras_update(struct ll_sb_info *sbi, struct inode *inode, · 202 unmodified lines
985985 if (ras->ras_requests == 2 && !ras->ras_request_index) {
986986 __u64 kms_pages;
987987
988− kms_pages = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
989− PAGE_CACHE_SHIFT;
988+ kms_pages = (i_size_read(inode) + PAGE_SIZE - 1) >>
989+ PAGE_SHIFT;
990990
991991 CDEBUG(D_READA, "kmsp %llu mwp %lu mp %lu\n", kms_pages,
992992 ra->ra_max_read_ahead_whole_pages, ra->ra_max_pages_per_file);
@@ -1173,7 +1173,7 @@ int ll_writepage(struct page *vmpage, struct writeback_control *wbc) · 180 unmodified lines
11731173 * PageWriteback or clean the page.
11741174 */
11751175 result = cl_sync_file_range(inode, offset,
1176− offset + PAGE_CACHE_SIZE - 1,
1176+ offset + PAGE_SIZE - 1,
11771177 CL_FSYNC_LOCAL, 1);
11781178 if (result > 0) {
11791179 /* actually we may have written more than one page.
@@ -1211,7 +1211,7 @@ int ll_writepages(struct address_space *mapping, struct writeback_control *wbc) · 31 unmodified lines
12111211 int ignore_layout = 0;
12121212
12131213 if (wbc->range_cyclic) {
1214− start = mapping->writeback_index << PAGE_CACHE_SHIFT;
1214+ start = mapping->writeback_index << PAGE_SHIFT;
12151215 end = OBD_OBJECT_EOF;
12161216 } else {
12171217 start = wbc->range_start;
@@ -1241,7 +1241,7 @@ int ll_writepages(struct address_space *mapping, struct writeback_control *wbc) · 23 unmodified lines
12411241 if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0)) {
12421242 if (end == OBD_OBJECT_EOF)
12431243 end = i_size_read(inode);
1244− mapping->writeback_index = (end >> PAGE_CACHE_SHIFT) + 1;
1244+ mapping->writeback_index = (end >> PAGE_SHIFT) + 1;
12451245 }
12461246 return result;
12471247 }
drivers/staging/lustre/lustre/llite/rw26.c+14−14
@@ -87,7 +87,7 @@ static void ll_invalidatepage(struct page *vmpage, unsigned int offset, · 86 unmodified lines
8787 * below because they are run with page locked and all our io is
8888 * happening with locked page too
8989 */
90− if (offset == 0 && length == PAGE_CACHE_SIZE) {
90+ if (offset == 0 && length == PAGE_SIZE) {
9191 env = cl_env_get(&refcheck);
9292 if (!IS_ERR(env)) {
9393 inode = vmpage->mapping->host;
@@ -193,8 +193,8 @@ static inline int ll_get_user_pages(int rw, unsigned long user_addr, · 99 unmodified lines
193193 return -EFBIG;
194194 }
195195
196− *max_pages = (user_addr + size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
197− *max_pages -= user_addr >> PAGE_CACHE_SHIFT;
196+ *max_pages = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
197+ *max_pages -= user_addr >> PAGE_SHIFT;
198198
199199 *pages = libcfs_kvzalloc(*max_pages * sizeof(**pages), GFP_NOFS);
200200 if (*pages) {
@@ -217,7 +217,7 @@ static void ll_free_user_pages(struct page **pages, int npages, int do_dirty) · 16 unmodified lines
217217 for (i = 0; i < npages; i++) {
218218 if (do_dirty)
219219 set_page_dirty_lock(pages[i]);
220− page_cache_release(pages[i]);
220+ put_page(pages[i]);
221221 }
222222 kvfree(pages);
223223 }
@@ -357,7 +357,7 @@ static ssize_t ll_direct_IO_26_seg(const struct lu_env *env, struct cl_io *io, · 133 unmodified lines
357357 * up to 22MB for 128kB kmalloc and up to 682MB for 4MB kmalloc.
358358 */
359359 #define MAX_DIO_SIZE ((KMALLOC_MAX_SIZE / sizeof(struct brw_page) * \
360− PAGE_CACHE_SIZE) & ~(DT_MAX_BRW_SIZE - 1))
360+ PAGE_SIZE) & ~(DT_MAX_BRW_SIZE - 1))
361361 static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
362362 loff_t file_offset)
363363 {
@@ -382,8 +382,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter, · 18 unmodified lines
382382 CDEBUG(D_VFSTRACE,
383383 "VFS Op:inode=%lu/%u(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n",
384384 inode->i_ino, inode->i_generation, inode, count, MAX_DIO_SIZE,
385− file_offset, file_offset, count >> PAGE_CACHE_SHIFT,
386− MAX_DIO_SIZE >> PAGE_CACHE_SHIFT);
385+ file_offset, file_offset, count >> PAGE_SHIFT,
386+ MAX_DIO_SIZE >> PAGE_SHIFT);
387387
388388 /* Check that all user buffers are aligned as well */
389389 if (iov_iter_alignment(iter) & ~CFS_PAGE_MASK)
@@ -432,8 +432,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter, · 42 unmodified lines
432432 * page worth of page pointers = 4MB on i386.
433433 */
434434 if (result == -ENOMEM &&
435− size > (PAGE_CACHE_SIZE / sizeof(*pages)) *
436− PAGE_CACHE_SIZE) {
435+ size > (PAGE_SIZE / sizeof(*pages)) *
436+ PAGE_SIZE) {
437437 size = ((((size / 2) - 1) |
438438 ~CFS_PAGE_MASK) + 1) &
439439 CFS_PAGE_MASK;
@@ -474,10 +474,10 @@ static int ll_write_begin(struct file *file, struct address_space *mapping, · 34 unmodified lines
474474 loff_t pos, unsigned len, unsigned flags,
475475 struct page **pagep, void **fsdata)
476476 {
477− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
477+ pgoff_t index = pos >> PAGE_SHIFT;
478478 struct page *page;
479479 int rc;
480− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
480+ unsigned from = pos & (PAGE_SIZE - 1);
481481
482482 page = grab_cache_page_write_begin(mapping, index, flags);
483483 if (!page)
@@ -488,7 +488,7 @@ static int ll_write_begin(struct file *file, struct address_space *mapping, · 4 unmodified lines
488488 rc = ll_prepare_write(file, page, from, from + len);
489489 if (rc) {
490490 unlock_page(page);
491− page_cache_release(page);
491+ put_page(page);
492492 }
493493 return rc;
494494 }
@@ -497,12 +497,12 @@ static int ll_write_end(struct file *file, struct address_space *mapping, · 2 unmodified lines
497497 loff_t pos, unsigned len, unsigned copied,
498498 struct page *page, void *fsdata)
499499 {
500− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
500+ unsigned from = pos & (PAGE_SIZE - 1);
501501 int rc;
502502
503503 rc = ll_commit_write(file, page, from, from + copied);
504504 unlock_page(page);
505− page_cache_release(page);
505+ put_page(page);
506506
507507 return rc ?: copied;
508508 }
drivers/staging/lustre/lustre/llite/vvp_io.c+4−4
@@ -514,7 +514,7 @@ static int vvp_io_read_start(const struct lu_env *env, · 513 unmodified lines
514514 /*
515515 * XXX: explicit PAGE_CACHE_SIZE
516516 */
517− bead->lrr_count = cl_index(obj, tot + PAGE_CACHE_SIZE - 1);
517+ bead->lrr_count = cl_index(obj, tot + PAGE_SIZE - 1);
518518 ll_ra_read_in(file, bead);
519519 }
520520
@@ -959,7 +959,7 @@ static int vvp_io_prepare_write(const struct lu_env *env, · 438 unmodified lines
959959 * We're completely overwriting an existing page, so _don't_
960960 * set it up to date until commit_write
961961 */
962− if (from == 0 && to == PAGE_CACHE_SIZE) {
962+ if (from == 0 && to == PAGE_SIZE) {
963963 CL_PAGE_HEADER(D_PAGE, env, pg, "full page write\n");
964964 POISON_PAGE(page, 0x11);
965965 } else
@@ -1022,7 +1022,7 @@ static int vvp_io_commit_write(const struct lu_env *env, · 56 unmodified lines
10221022 set_page_dirty(vmpage);
10231023 vvp_write_pending(cl2ccc(obj), cp);
10241024 } else if (result == -EDQUOT) {
1025− pgoff_t last_index = i_size_read(inode) >> PAGE_CACHE_SHIFT;
1025+ pgoff_t last_index = i_size_read(inode) >> PAGE_SHIFT;
10261026 bool need_clip = true;
10271027
10281028 /*
@@ -1040,7 +1040,7 @@ static int vvp_io_commit_write(const struct lu_env *env, · 11 unmodified lines
10401040 * being.
10411041 */
10421042 if (last_index > pg->cp_index) {
1043− to = PAGE_CACHE_SIZE;
1043+ to = PAGE_SIZE;
10441044 need_clip = false;
10451045 } else if (last_index == pg->cp_index) {
10461046 int size_to = i_size_read(inode) & ~CFS_PAGE_MASK;
drivers/staging/lustre/lustre/llite/vvp_page.c+4−4
@@ -57,7 +57,7 @@ static void vvp_page_fini_common(struct ccc_page *cp) · 56 unmodified lines
5757 struct page *vmpage = cp->cpg_page;
5858
5959 LASSERT(vmpage);
60− page_cache_release(vmpage);
60+ put_page(vmpage);
6161 }
6262
6363 static void vvp_page_fini(const struct lu_env *env,
@@ -164,12 +164,12 @@ static int vvp_page_unmap(const struct lu_env *env, · 100 unmodified lines
164164 LASSERT(vmpage);
165165 LASSERT(PageLocked(vmpage));
166166
167− offset = vmpage->index << PAGE_CACHE_SHIFT;
167+ offset = vmpage->index << PAGE_SHIFT;
168168
169169 /*
170170 * XXX is it safe to call this with the page lock held?
171171 */
172− ll_teardown_mmaps(vmpage->mapping, offset, offset + PAGE_CACHE_SIZE);
172+ ll_teardown_mmaps(vmpage->mapping, offset, offset + PAGE_SIZE);
173173 return 0;
174174 }
175175
@@ -537,7 +537,7 @@ int vvp_page_init(const struct lu_env *env, struct cl_object *obj, · 361 unmodified lines
537537 CLOBINVRNT(env, obj, ccc_object_invariant(obj));
538538
539539 cpg->cpg_page = vmpage;
540− page_cache_get(vmpage);
540+ get_page(vmpage);
541541
542542 INIT_LIST_HEAD(&cpg->cpg_pending_linkage);
543543 if (page->cp_type == CPT_CACHEABLE) {
drivers/staging/lustre/lustre/lmv/lmv_obd.c+2−2
@@ -2129,8 +2129,8 @@ static int lmv_readpage(struct obd_export *exp, struct md_op_data *op_data, · 2128 unmodified lines
21292129 if (rc != 0)
21302130 return rc;
21312131
2132− ncfspgs = ((*request)->rq_bulk->bd_nob_transferred + PAGE_CACHE_SIZE - 1)
2133− >> PAGE_CACHE_SHIFT;
2132+ ncfspgs = ((*request)->rq_bulk->bd_nob_transferred + PAGE_SIZE - 1)
2133+ >> PAGE_SHIFT;
21342134 nlupgs = (*request)->rq_bulk->bd_nob_transferred >> LU_PAGE_SHIFT;
21352135 LASSERT(!((*request)->rq_bulk->bd_nob_transferred & ~LU_PAGE_MASK));
21362136 LASSERT(ncfspgs > 0 && ncfspgs <= op_data->op_npages);
drivers/staging/lustre/lustre/mdc/mdc_request.c+3−3
@@ -1002,10 +1002,10 @@ restart_bulk: · 1001 unmodified lines
10021002
10031003 /* NB req now owns desc and will free it when it gets freed */
10041004 for (i = 0; i < op_data->op_npages; i++)
1005− ptlrpc_prep_bulk_page_pin(desc, pages[i], 0, PAGE_CACHE_SIZE);
1005+ ptlrpc_prep_bulk_page_pin(desc, pages[i], 0, PAGE_SIZE);
10061006
10071007 mdc_readdir_pack(req, op_data->op_offset,
1008− PAGE_CACHE_SIZE * op_data->op_npages,
1008+ PAGE_SIZE * op_data->op_npages,
10091009 &op_data->op_fid1);
10101010
10111011 ptlrpc_request_set_replen(req);
@@ -1037,7 +1037,7 @@ restart_bulk: · 25 unmodified lines
10371037 if (req->rq_bulk->bd_nob_transferred & ~LU_PAGE_MASK) {
10381038 CERROR("Unexpected # bytes transferred: %d (%ld expected)\n",
10391039 req->rq_bulk->bd_nob_transferred,
1040− PAGE_CACHE_SIZE * op_data->op_npages);
1040+ PAGE_SIZE * op_data->op_npages);
10411041 ptlrpc_req_finished(req);
10421042 return -EPROTO;
10431043 }
drivers/staging/lustre/lustre/mgc/mgc_request.c+11−11
@@ -1113,7 +1113,7 @@ static int mgc_import_event(struct obd_device *obd, · 1112 unmodified lines
11131113 }
11141114
11151115 enum {
1116− CONFIG_READ_NRPAGES_INIT = 1 << (20 - PAGE_CACHE_SHIFT),
1116+ CONFIG_READ_NRPAGES_INIT = 1 << (20 - PAGE_SHIFT),
11171117 CONFIG_READ_NRPAGES = 4
11181118 };
11191119
@@ -1137,19 +1137,19 @@ static int mgc_apply_recover_logs(struct obd_device *mgc, · 17 unmodified lines
11371137 LASSERT(cfg->cfg_instance);
11381138 LASSERT(cfg->cfg_sb == cfg->cfg_instance);
11391139
1140− inst = kzalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
1140+ inst = kzalloc(PAGE_SIZE, GFP_KERNEL);
11411141 if (!inst)
11421142 return -ENOMEM;
11431143
1144− pos = snprintf(inst, PAGE_CACHE_SIZE, "%p", cfg->cfg_instance);
1145− if (pos >= PAGE_CACHE_SIZE) {
1144+ pos = snprintf(inst, PAGE_SIZE, "%p", cfg->cfg_instance);
1145+ if (pos >= PAGE_SIZE) {
11461146 kfree(inst);
11471147 return -E2BIG;
11481148 }
11491149
11501150 ++pos;
11511151 buf = inst + pos;
1152− bufsz = PAGE_CACHE_SIZE - pos;
1152+ bufsz = PAGE_SIZE - pos;
11531153
11541154 while (datalen > 0) {
11551155 int entry_len = sizeof(*entry);
@@ -1181,7 +1181,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc, · 25 unmodified lines
11811181 /* Keep this swab for normal mixed endian handling. LU-1644 */
11821182 if (mne_swab)
11831183 lustre_swab_mgs_nidtbl_entry(entry);
1184− if (entry->mne_length > PAGE_CACHE_SIZE) {
1184+ if (entry->mne_length > PAGE_SIZE) {
11851185 CERROR("MNE too large (%u)\n", entry->mne_length);
11861186 break;
11871187 }
@@ -1371,7 +1371,7 @@ again: · 183 unmodified lines
13711371 }
13721372 body->mcb_offset = cfg->cfg_last_idx + 1;
13731373 body->mcb_type = cld->cld_type;
1374− body->mcb_bits = PAGE_CACHE_SHIFT;
1374+ body->mcb_bits = PAGE_SHIFT;
13751375 body->mcb_units = nrpages;
13761376
13771377 /* allocate bulk transfer descriptor */
@@ -1383,7 +1383,7 @@ again: · 5 unmodified lines
13831383 }
13841384
13851385 for (i = 0; i < nrpages; i++)
1386− ptlrpc_prep_bulk_page_pin(desc, pages[i], 0, PAGE_CACHE_SIZE);
1386+ ptlrpc_prep_bulk_page_pin(desc, pages[i], 0, PAGE_SIZE);
13871387
13881388 ptlrpc_request_set_replen(req);
13891389 rc = ptlrpc_queue_wait(req);
@@ -1411,7 +1411,7 @@ again: · 21 unmodified lines
14111411 goto out;
14121412 }
14131413
1414− if (ealen > nrpages << PAGE_CACHE_SHIFT) {
1414+ if (ealen > nrpages << PAGE_SHIFT) {
14151415 rc = -EINVAL;
14161416 goto out;
14171417 }
@@ -1439,7 +1439,7 @@ again: · 21 unmodified lines
14391439
14401440 ptr = kmap(pages[i]);
14411441 rc2 = mgc_apply_recover_logs(obd, cld, res->mcr_offset, ptr,
1442− min_t(int, ealen, PAGE_CACHE_SIZE),
1442+ min_t(int, ealen, PAGE_SIZE),
14431443 mne_swab);
14441444 kunmap(pages[i]);
14451445 if (rc2 < 0) {
@@ -1448,7 +1448,7 @@ again: · 2 unmodified lines
14481448 break;
14491449 }
14501450
1451− ealen -= PAGE_CACHE_SIZE;
1451+ ealen -= PAGE_SIZE;
14521452 }
14531453
14541454 out:
drivers/staging/lustre/lustre/obdclass/cl_page.c+3−3
@@ -1477,7 +1477,7 @@ loff_t cl_offset(const struct cl_object *obj, pgoff_t idx) · 1476 unmodified lines
14771477 /*
14781478 * XXX for now.
14791479 */
1480− return (loff_t)idx << PAGE_CACHE_SHIFT;
1480+ return (loff_t)idx << PAGE_SHIFT;
14811481 }
14821482 EXPORT_SYMBOL(cl_offset);
14831483
@@ -1489,13 +1489,13 @@ pgoff_t cl_index(const struct cl_object *obj, loff_t offset) · 5 unmodified lines
14891489 /*
14901490 * XXX for now.
14911491 */
1492− return offset >> PAGE_CACHE_SHIFT;
1492+ return offset >> PAGE_SHIFT;
14931493 }
14941494 EXPORT_SYMBOL(cl_index);
14951495
14961496 int cl_page_size(const struct cl_object *obj)
14971497 {
1498− return 1 << PAGE_CACHE_SHIFT;
1498+ return 1 << PAGE_SHIFT;
14991499 }
15001500 EXPORT_SYMBOL(cl_page_size);
15011501
drivers/staging/lustre/lustre/obdclass/class_obd.c+3−3
@@ -461,9 +461,9 @@ static int obd_init_checks(void) · 460 unmodified lines
461461 CWARN("LPD64 wrong length! strlen(%s)=%d != 2\n", buf, len);
462462 ret = -EINVAL;
463463 }
464− if ((u64val & ~CFS_PAGE_MASK) >= PAGE_CACHE_SIZE) {
464+ if ((u64val & ~CFS_PAGE_MASK) >= PAGE_SIZE) {
465465 CWARN("mask failed: u64val %llu >= %llu\n", u64val,
466− (__u64)PAGE_CACHE_SIZE);
466+ (__u64)PAGE_SIZE);
467467 ret = -EINVAL;
468468 }
469469
@@ -509,7 +509,7 @@ static int __init obdclass_init(void) · 39 unmodified lines
509509 * For clients with less memory, a larger fraction is needed
510510 * for other purposes (mostly for BGL).
511511 */
512− if (totalram_pages <= 512 << (20 - PAGE_CACHE_SHIFT))
512+ if (totalram_pages <= 512 << (20 - PAGE_SHIFT))
513513 obd_max_dirty_pages = totalram_pages / 4;
514514 else
515515 obd_max_dirty_pages = totalram_pages / 2;
drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c+2−2
@@ -71,8 +71,8 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, u32 valid) · 70 unmodified lines
7171 if (valid & OBD_MD_FLBLKSZ && src->o_blksize > (1 << dst->i_blkbits))
7272 dst->i_blkbits = ffs(src->o_blksize) - 1;
7373
74− if (dst->i_blkbits < PAGE_CACHE_SHIFT)
75− dst->i_blkbits = PAGE_CACHE_SHIFT;
74+ if (dst->i_blkbits < PAGE_SHIFT)
75+ dst->i_blkbits = PAGE_SHIFT;
7676
7777 /* allocation of space */
7878 if (valid & OBD_MD_FLBLOCKS && src->o_blocks > dst->i_blocks)
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c+3−3
@@ -100,7 +100,7 @@ static ssize_t max_dirty_mb_show(struct kobject *kobj, struct attribute *attr, · 99 unmodified lines
100100 char *buf)
101101 {
102102 return sprintf(buf, "%ul\n",
103− obd_max_dirty_pages / (1 << (20 - PAGE_CACHE_SHIFT)));
103+ obd_max_dirty_pages / (1 << (20 - PAGE_SHIFT)));
104104 }
105105
106106 static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr,
@@ -113,14 +113,14 @@ static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr, · 6 unmodified lines
113113 if (rc)
114114 return rc;
115115
116− val *= 1 << (20 - PAGE_CACHE_SHIFT); /* convert to pages */
116+ val *= 1 << (20 - PAGE_SHIFT); /* convert to pages */
117117
118118 if (val > ((totalram_pages / 10) * 9)) {
119119 /* Somebody wants to assign too much memory to dirty pages */
120120 return -EINVAL;
121121 }
122122
123− if (val < 4 << (20 - PAGE_CACHE_SHIFT)) {
123+ if (val < 4 << (20 - PAGE_SHIFT)) {
124124 /* Less than 4 Mb for dirty cache is also bad */
125125 return -EINVAL;
126126 }
drivers/staging/lustre/lustre/obdclass/lu_object.c+3−3
@@ -840,8 +840,8 @@ static int lu_htable_order(void) · 839 unmodified lines
840840
841841 #if BITS_PER_LONG == 32
842842 /* limit hashtable size for lowmem systems to low RAM */
843− if (cache_size > 1 << (30 - PAGE_CACHE_SHIFT))
844− cache_size = 1 << (30 - PAGE_CACHE_SHIFT) * 3 / 4;
843+ if (cache_size > 1 << (30 - PAGE_SHIFT))
844+ cache_size = 1 << (30 - PAGE_SHIFT) * 3 / 4;
845845 #endif
846846
847847 /* clear off unreasonable cache setting. */
@@ -853,7 +853,7 @@ static int lu_htable_order(void) · 5 unmodified lines
853853 lu_cache_percent = LU_CACHE_PERCENT_DEFAULT;
854854 }
855855 cache_size = cache_size / 100 * lu_cache_percent *
856− (PAGE_CACHE_SIZE / 1024);
856+ (PAGE_SIZE / 1024);
857857
858858 for (bits = 1; (1 << bits) < cache_size; ++bits) {
859859 ;
drivers/staging/lustre/lustre/obdecho/echo_client.c+15−15
@@ -278,7 +278,7 @@ static void echo_page_fini(const struct lu_env *env, · 277 unmodified lines
278278 struct page *vmpage = ep->ep_vmpage;
279279
280280 atomic_dec(&eco->eo_npages);
281− page_cache_release(vmpage);
281+ put_page(vmpage);
282282 }
283283
284284 static int echo_page_prep(const struct lu_env *env,
@@ -373,7 +373,7 @@ static int echo_page_init(const struct lu_env *env, struct cl_object *obj, · 88 unmodified lines
373373 struct echo_object *eco = cl2echo_obj(obj);
374374
375375 ep->ep_vmpage = vmpage;
376− page_cache_get(vmpage);
376+ get_page(vmpage);
377377 mutex_init(&ep->ep_lock);
378378 cl_page_slice_add(page, &ep->ep_cl, obj, &echo_page_ops);
379379 atomic_inc(&eco->eo_npages);
@@ -1138,7 +1138,7 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, u64 offset, · 758 unmodified lines
11381138 LASSERT(rc == 0);
11391139
11401140 rc = cl_echo_enqueue0(env, eco, offset,
1141− offset + npages * PAGE_CACHE_SIZE - 1,
1141+ offset + npages * PAGE_SIZE - 1,
11421142 rw == READ ? LCK_PR : LCK_PW, &lh.cookie,
11431143 CEF_NEVER);
11441144 if (rc < 0)
@@ -1311,11 +1311,11 @@ echo_client_page_debug_setup(struct page *page, int rw, u64 id, · 166 unmodified lines
13111311 int delta;
13121312
13131313 /* no partial pages on the client */
1314− LASSERT(count == PAGE_CACHE_SIZE);
1314+ LASSERT(count == PAGE_SIZE);
13151315
13161316 addr = kmap(page);
13171317
1318− for (delta = 0; delta < PAGE_CACHE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
1318+ for (delta = 0; delta < PAGE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
13191319 if (rw == OBD_BRW_WRITE) {
13201320 stripe_off = offset + delta;
13211321 stripe_id = id;
@@ -1341,11 +1341,11 @@ static int echo_client_page_debug_check(struct page *page, u64 id, · 19 unmodified lines
13411341 int rc2;
13421342
13431343 /* no partial pages on the client */
1344− LASSERT(count == PAGE_CACHE_SIZE);
1344+ LASSERT(count == PAGE_SIZE);
13451345
13461346 addr = kmap(page);
13471347
1348− for (rc = delta = 0; delta < PAGE_CACHE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
1348+ for (rc = delta = 0; delta < PAGE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
13491349 stripe_off = offset + delta;
13501350 stripe_id = id;
13511351
@@ -1391,7 +1391,7 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa, · 39 unmodified lines
13911391 return -EINVAL;
13921392
13931393 /* XXX think again with misaligned I/O */
1394− npages = count >> PAGE_CACHE_SHIFT;
1394+ npages = count >> PAGE_SHIFT;
13951395
13961396 if (rw == OBD_BRW_WRITE)
13971397 brw_flags = OBD_BRW_ASYNC;
@@ -1408,7 +1408,7 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa, · 10 unmodified lines
14081408
14091409 for (i = 0, pgp = pga, off = offset;
14101410 i < npages;
1411− i++, pgp++, off += PAGE_CACHE_SIZE) {
1411+ i++, pgp++, off += PAGE_SIZE) {
14121412
14131413 LASSERT(!pgp->pg); /* for cleanup */
14141414
@@ -1418,7 +1418,7 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa, · 3 unmodified lines
14181418 goto out;
14191419
14201420 pages[i] = pgp->pg;
1421− pgp->count = PAGE_CACHE_SIZE;
1421+ pgp->count = PAGE_SIZE;
14221422 pgp->off = off;
14231423 pgp->flag = brw_flags;
14241424
@@ -1473,8 +1473,8 @@ static int echo_client_prep_commit(const struct lu_env *env, · 48 unmodified lines
14731473 if (count <= 0 || (count & (~CFS_PAGE_MASK)) != 0)
14741474 return -EINVAL;
14751475
1476− npages = batch >> PAGE_CACHE_SHIFT;
1477− tot_pages = count >> PAGE_CACHE_SHIFT;
1476+ npages = batch >> PAGE_SHIFT;
1477+ tot_pages = count >> PAGE_SHIFT;
14781478
14791479 lnb = kcalloc(npages, sizeof(struct niobuf_local), GFP_NOFS);
14801480 rnb = kcalloc(npages, sizeof(struct niobuf_remote), GFP_NOFS);
@@ -1497,9 +1497,9 @@ static int echo_client_prep_commit(const struct lu_env *env, · 16 unmodified lines
14971497 if (tot_pages < npages)
14981498 npages = tot_pages;
14991499
1500− for (i = 0; i < npages; i++, off += PAGE_CACHE_SIZE) {
1500+ for (i = 0; i < npages; i++, off += PAGE_SIZE) {
15011501 rnb[i].offset = off;
1502− rnb[i].len = PAGE_CACHE_SIZE;
1502+ rnb[i].len = PAGE_SIZE;
15031503 rnb[i].flags = brw_flags;
15041504 }
15051505
@@ -1878,7 +1878,7 @@ static int __init obdecho_init(void) · 372 unmodified lines
18781878 {
18791879 LCONSOLE_INFO("Echo OBD driver; http://www.lustre.org/\n");
18801880
1881− LASSERT(PAGE_CACHE_SIZE % OBD_ECHO_BLOCK_SIZE == 0);
1881+ LASSERT(PAGE_SIZE % OBD_ECHO_BLOCK_SIZE == 0);
18821882
18831883 return echo_client_init();
18841884 }
drivers/staging/lustre/lustre/osc/lproc_osc.c+8−8
@@ -162,15 +162,15 @@ static ssize_t max_dirty_mb_store(struct kobject *kobj, · 161 unmodified lines
162162 if (rc)
163163 return rc;
164164
165− pages_number *= 1 << (20 - PAGE_CACHE_SHIFT); /* MB -> pages */
165+ pages_number *= 1 << (20 - PAGE_SHIFT); /* MB -> pages */
166166
167167 if (pages_number <= 0 ||
168− pages_number > OSC_MAX_DIRTY_MB_MAX << (20 - PAGE_CACHE_SHIFT) ||
168+ pages_number > OSC_MAX_DIRTY_MB_MAX << (20 - PAGE_SHIFT) ||
169169 pages_number > totalram_pages / 4) /* 1/4 of RAM */
170170 return -ERANGE;
171171
172172 client_obd_list_lock(&cli->cl_loi_list_lock);
173− cli->cl_dirty_max = (u32)(pages_number << PAGE_CACHE_SHIFT);
173+ cli->cl_dirty_max = (u32)(pages_number << PAGE_SHIFT);
174174 osc_wake_cache_waiters(cli);
175175 client_obd_list_unlock(&cli->cl_loi_list_lock);
176176
@@ -182,7 +182,7 @@ static int osc_cached_mb_seq_show(struct seq_file *m, void *v) · 5 unmodified lines
182182 {
183183 struct obd_device *dev = m->private;
184184 struct client_obd *cli = &dev->u.cli;
185− int shift = 20 - PAGE_CACHE_SHIFT;
185+ int shift = 20 - PAGE_SHIFT;
186186
187187 seq_printf(m,
188188 "used_mb: %d\n"
@@ -211,7 +211,7 @@ static ssize_t osc_cached_mb_seq_write(struct file *file, · 22 unmodified lines
211211 return -EFAULT;
212212 kernbuf[count] = 0;
213213
214− mult = 1 << (20 - PAGE_CACHE_SHIFT);
214+ mult = 1 << (20 - PAGE_SHIFT);
215215 buffer += lprocfs_find_named_value(kernbuf, "used_mb:", &count) -
216216 kernbuf;
217217 rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult);
@@ -569,12 +569,12 @@ static ssize_t max_pages_per_rpc_store(struct kobject *kobj, · 351 unmodified lines
569569
570570 /* if the max_pages is specified in bytes, convert to pages */
571571 if (val >= ONE_MB_BRW_SIZE)
572− val >>= PAGE_CACHE_SHIFT;
572+ val >>= PAGE_SHIFT;
573573
574− chunk_mask = ~((1 << (cli->cl_chunkbits - PAGE_CACHE_SHIFT)) - 1);
574+ chunk_mask = ~((1 << (cli->cl_chunkbits - PAGE_SHIFT)) - 1);
575575 /* max_pages_per_rpc must be chunk aligned */
576576 val = (val + ~chunk_mask) & chunk_mask;
577− if (val == 0 || val > ocd->ocd_brw_size >> PAGE_CACHE_SHIFT) {
577+ if (val == 0 || val > ocd->ocd_brw_size >> PAGE_SHIFT) {
578578 return -ERANGE;
579579 }
580580 client_obd_list_lock(&cli->cl_loi_list_lock);
drivers/staging/lustre/lustre/osc/osc_cache.c+21−21
@@ -544,7 +544,7 @@ static int osc_extent_merge(const struct lu_env *env, struct osc_extent *cur, · 543 unmodified lines
544544 return -ERANGE;
545545
546546 LASSERT(cur->oe_osclock == victim->oe_osclock);
547− ppc_bits = osc_cli(obj)->cl_chunkbits - PAGE_CACHE_SHIFT;
547+ ppc_bits = osc_cli(obj)->cl_chunkbits - PAGE_SHIFT;
548548 chunk_start = cur->oe_start >> ppc_bits;
549549 chunk_end = cur->oe_end >> ppc_bits;
550550 if (chunk_start != (victim->oe_end >> ppc_bits) + 1 &&
@@ -647,8 +647,8 @@ static struct osc_extent *osc_extent_find(const struct lu_env *env, · 96 unmodified lines
647647 lock = cl_lock_at_pgoff(env, osc2cl(obj), index, NULL, 1, 0);
648648 LASSERT(lock->cll_descr.cld_mode >= CLM_WRITE);
649649
650− LASSERT(cli->cl_chunkbits >= PAGE_CACHE_SHIFT);
651− ppc_bits = cli->cl_chunkbits - PAGE_CACHE_SHIFT;
650+ LASSERT(cli->cl_chunkbits >= PAGE_SHIFT);
651+ ppc_bits = cli->cl_chunkbits - PAGE_SHIFT;
652652 chunk_mask = ~((1 << ppc_bits) - 1);
653653 chunksize = 1 << cli->cl_chunkbits;
654654 chunk = index >> ppc_bits;
@@ -871,8 +871,8 @@ int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext, · 216 unmodified lines
871871
872872 if (!sent) {
873873 lost_grant = ext->oe_grants;
874− } else if (blocksize < PAGE_CACHE_SIZE &&
875− last_count != PAGE_CACHE_SIZE) {
874+ } else if (blocksize < PAGE_SIZE &&
875+ last_count != PAGE_SIZE) {
876876 /* For short writes we shouldn't count parts of pages that
877877 * span a whole chunk on the OST side, or our accounting goes
878878 * wrong. Should match the code in filter_grant_check.
@@ -884,7 +884,7 @@ int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext, · 5 unmodified lines
884884 if (end)
885885 count += blocksize - end;
886886
887− lost_grant = PAGE_CACHE_SIZE - count;
887+ lost_grant = PAGE_SIZE - count;
888888 }
889889 if (ext->oe_grants > 0)
890890 osc_free_grant(cli, nr_pages, lost_grant);
@@ -967,7 +967,7 @@ static int osc_extent_truncate(struct osc_extent *ext, pgoff_t trunc_index, · 76 unmodified lines
967967 struct osc_async_page *oap;
968968 struct osc_async_page *tmp;
969969 int pages_in_chunk = 0;
970− int ppc_bits = cli->cl_chunkbits - PAGE_CACHE_SHIFT;
970+ int ppc_bits = cli->cl_chunkbits - PAGE_SHIFT;
971971 __u64 trunc_chunk = trunc_index >> ppc_bits;
972972 int grants = 0;
973973 int nr_pages = 0;
@@ -1125,7 +1125,7 @@ static int osc_extent_make_ready(const struct lu_env *env, · 151 unmodified lines
11251125 if (!(last->oap_async_flags & ASYNC_COUNT_STABLE)) {
11261126 last->oap_count = osc_refresh_count(env, last, OBD_BRW_WRITE);
11271127 LASSERT(last->oap_count > 0);
1128− LASSERT(last->oap_page_off + last->oap_count <= PAGE_CACHE_SIZE);
1128+ LASSERT(last->oap_page_off + last->oap_count <= PAGE_SIZE);
11291129 last->oap_async_flags |= ASYNC_COUNT_STABLE;
11301130 }
11311131
@@ -1134,7 +1134,7 @@ static int osc_extent_make_ready(const struct lu_env *env, · 2 unmodified lines
11341134 */
11351135 list_for_each_entry(oap, &ext->oe_pages, oap_pending_item) {
11361136 if (!(oap->oap_async_flags & ASYNC_COUNT_STABLE)) {
1137− oap->oap_count = PAGE_CACHE_SIZE - oap->oap_page_off;
1137+ oap->oap_count = PAGE_SIZE - oap->oap_page_off;
11381138 oap->oap_async_flags |= ASYNC_COUNT_STABLE;
11391139 }
11401140 }
@@ -1158,7 +1158,7 @@ static int osc_extent_expand(struct osc_extent *ext, pgoff_t index, int *grants) · 17 unmodified lines
11581158 struct osc_object *obj = ext->oe_obj;
11591159 struct client_obd *cli = osc_cli(obj);
11601160 struct osc_extent *next;
1161− int ppc_bits = cli->cl_chunkbits - PAGE_CACHE_SHIFT;
1161+ int ppc_bits = cli->cl_chunkbits - PAGE_SHIFT;
11621162 pgoff_t chunk = index >> ppc_bits;
11631163 pgoff_t end_chunk;
11641164 pgoff_t end_index;
@@ -1293,9 +1293,9 @@ static int osc_refresh_count(const struct lu_env *env, · 128 unmodified lines
12931293 return 0;
12941294 else if (cl_offset(obj, page->cp_index + 1) > kms)
12951295 /* catch sub-page write at end of file */
1296− return kms % PAGE_CACHE_SIZE;
1296+ return kms % PAGE_SIZE;
12971297 else
1298− return PAGE_CACHE_SIZE;
1298+ return PAGE_SIZE;
12991299 }
13001300
13011301 static int osc_completion(const struct lu_env *env, struct osc_async_page *oap,
@@ -1376,10 +1376,10 @@ static void osc_consume_write_grant(struct client_obd *cli, · 74 unmodified lines
13761376 assert_spin_locked(&cli->cl_loi_list_lock.lock);
13771377 LASSERT(!(pga->flag & OBD_BRW_FROM_GRANT));
13781378 atomic_inc(&obd_dirty_pages);
1379− cli->cl_dirty += PAGE_CACHE_SIZE;
1379+ cli->cl_dirty += PAGE_SIZE;
13801380 pga->flag |= OBD_BRW_FROM_GRANT;
13811381 CDEBUG(D_CACHE, "using %lu grant credits for brw %p page %p\n",
1382− PAGE_CACHE_SIZE, pga, pga->pg);
1382+ PAGE_SIZE, pga, pga->pg);
13831383 osc_update_next_shrink(cli);
13841384 }
13851385
@@ -1396,11 +1396,11 @@ static void osc_release_write_grant(struct client_obd *cli, · 10 unmodified lines
13961396
13971397 pga->flag &= ~OBD_BRW_FROM_GRANT;
13981398 atomic_dec(&obd_dirty_pages);
1399− cli->cl_dirty -= PAGE_CACHE_SIZE;
1399+ cli->cl_dirty -= PAGE_SIZE;
14001400 if (pga->flag & OBD_BRW_NOCACHE) {
14011401 pga->flag &= ~OBD_BRW_NOCACHE;
14021402 atomic_dec(&obd_dirty_transit_pages);
1403− cli->cl_dirty_transit -= PAGE_CACHE_SIZE;
1403+ cli->cl_dirty_transit -= PAGE_SIZE;
14041404 }
14051405 }
14061406
@@ -1469,7 +1469,7 @@ static void osc_free_grant(struct client_obd *cli, unsigned int nr_pages, · 62 unmodified lines
14691469
14701470 client_obd_list_lock(&cli->cl_loi_list_lock);
14711471 atomic_sub(nr_pages, &obd_dirty_pages);
1472− cli->cl_dirty -= nr_pages << PAGE_CACHE_SHIFT;
1472+ cli->cl_dirty -= nr_pages << PAGE_SHIFT;
14731473 cli->cl_lost_grant += lost_grant;
14741474 if (cli->cl_avail_grant < grant && cli->cl_lost_grant >= grant) {
14751475 /* borrow some grant from truncate to avoid the case that
@@ -1512,11 +1512,11 @@ static int osc_enter_cache_try(struct client_obd *cli, · 36 unmodified lines
15121512 if (rc < 0)
15131513 return 0;
15141514
1515− if (cli->cl_dirty + PAGE_CACHE_SIZE <= cli->cl_dirty_max &&
1515+ if (cli->cl_dirty + PAGE_SIZE <= cli->cl_dirty_max &&
15161516 atomic_read(&obd_dirty_pages) + 1 <= obd_max_dirty_pages) {
15171517 osc_consume_write_grant(cli, &oap->oap_brw_page);
15181518 if (transient) {
1519− cli->cl_dirty_transit += PAGE_CACHE_SIZE;
1519+ cli->cl_dirty_transit += PAGE_SIZE;
15201520 atomic_inc(&obd_dirty_transit_pages);
15211521 oap->oap_brw_flags |= OBD_BRW_NOCACHE;
15221522 }
@@ -1562,7 +1562,7 @@ static int osc_enter_cache(const struct lu_env *env, struct client_obd *cli, · 39 unmodified lines
15621562 * of queued writes and create a discontiguous rpc stream
15631563 */
15641564 if (OBD_FAIL_CHECK(OBD_FAIL_OSC_NO_GRANT) ||
1565− cli->cl_dirty_max < PAGE_CACHE_SIZE ||
1565+ cli->cl_dirty_max < PAGE_SIZE ||
15661566 cli->cl_ar.ar_force_sync || loi->loi_ar.ar_force_sync) {
15671567 rc = -EDQUOT;
15681568 goto out;
@@ -1632,7 +1632,7 @@ void osc_wake_cache_waiters(struct client_obd *cli) · 63 unmodified lines
16321632
16331633 ocw->ocw_rc = -EDQUOT;
16341634 /* we can't dirty more */
1635− if ((cli->cl_dirty + PAGE_CACHE_SIZE > cli->cl_dirty_max) ||
1635+ if ((cli->cl_dirty + PAGE_SIZE > cli->cl_dirty_max) ||
16361636 (atomic_read(&obd_dirty_pages) + 1 >
16371637 obd_max_dirty_pages)) {
16381638 CDEBUG(D_CACHE, "no dirty room: dirty: %ld osc max %ld, sys max %d\n",
drivers/staging/lustre/lustre/osc/osc_page.c+3−3
@@ -410,7 +410,7 @@ int osc_page_init(const struct lu_env *env, struct cl_object *obj, · 409 unmodified lines
410410 int result;
411411
412412 opg->ops_from = 0;
413− opg->ops_to = PAGE_CACHE_SIZE;
413+ opg->ops_to = PAGE_SIZE;
414414
415415 result = osc_prep_async_page(osc, opg, vmpage,
416416 cl_offset(obj, page->cp_index));
@@ -487,9 +487,9 @@ static atomic_t osc_lru_waiters = ATOMIC_INIT(0); · 70 unmodified lines
487487 /* LRU pages are freed in batch mode. OSC should at least free this
488488 * number of pages to avoid running out of LRU budget, and..
489489 */
490−static const int lru_shrink_min = 2 << (20 - PAGE_CACHE_SHIFT); /* 2M */
490+static const int lru_shrink_min = 2 << (20 - PAGE_SHIFT); /* 2M */
491491 /* free this number at most otherwise it will take too long time to finish. */
492−static const int lru_shrink_max = 32 << (20 - PAGE_CACHE_SHIFT); /* 32M */
492+static const int lru_shrink_max = 32 << (20 - PAGE_SHIFT); /* 32M */
493493
494494 /* Check if we can free LRU slots from this OSC. If there exists LRU waiters,
495495 * we should free slots aggressively. In this way, slots are freed in a steady
drivers/staging/lustre/lustre/osc/osc_request.c+13−13
@@ -826,7 +826,7 @@ static void osc_announce_cached(struct client_obd *cli, struct obdo *oa, · 825 unmodified lines
826826 oa->o_undirty = 0;
827827 } else {
828828 long max_in_flight = (cli->cl_max_pages_per_rpc <<
829− PAGE_CACHE_SHIFT)*
829+ PAGE_SHIFT)*
830830 (cli->cl_max_rpcs_in_flight + 1);
831831 oa->o_undirty = max(cli->cl_dirty_max, max_in_flight);
832832 }
@@ -909,11 +909,11 @@ static void osc_shrink_grant_local(struct client_obd *cli, struct obdo *oa) · 76 unmodified lines
909909 static int osc_shrink_grant(struct client_obd *cli)
910910 {
911911 __u64 target_bytes = (cli->cl_max_rpcs_in_flight + 1) *
912− (cli->cl_max_pages_per_rpc << PAGE_CACHE_SHIFT);
912+ (cli->cl_max_pages_per_rpc << PAGE_SHIFT);
913913
914914 client_obd_list_lock(&cli->cl_loi_list_lock);
915915 if (cli->cl_avail_grant <= target_bytes)
916− target_bytes = cli->cl_max_pages_per_rpc << PAGE_CACHE_SHIFT;
916+ target_bytes = cli->cl_max_pages_per_rpc << PAGE_SHIFT;
917917 client_obd_list_unlock(&cli->cl_loi_list_lock);
918918
919919 return osc_shrink_grant_to_target(cli, target_bytes);
@@ -929,8 +929,8 @@ int osc_shrink_grant_to_target(struct client_obd *cli, __u64 target_bytes) · 9 unmodified lines
929929 * We don't want to shrink below a single RPC, as that will negatively
930930 * impact block allocation and long-term performance.
931931 */
932− if (target_bytes < cli->cl_max_pages_per_rpc << PAGE_CACHE_SHIFT)
933− target_bytes = cli->cl_max_pages_per_rpc << PAGE_CACHE_SHIFT;
932+ if (target_bytes < cli->cl_max_pages_per_rpc << PAGE_SHIFT)
933+ target_bytes = cli->cl_max_pages_per_rpc << PAGE_SHIFT;
934934
935935 if (target_bytes >= cli->cl_avail_grant) {
936936 client_obd_list_unlock(&cli->cl_loi_list_lock);
@@ -978,7 +978,7 @@ static int osc_should_shrink_grant(struct client_obd *client) · 41 unmodified lines
978978 * cli_brw_size(obd->u.cli.cl_import->imp_obd->obd_self_export)
979979 * Keep comment here so that it can be found by searching.
980980 */
981− int brw_size = client->cl_max_pages_per_rpc << PAGE_CACHE_SHIFT;
981+ int brw_size = client->cl_max_pages_per_rpc << PAGE_SHIFT;
982982
983983 if (client->cl_import->imp_state == LUSTRE_IMP_FULL &&
984984 client->cl_avail_grant > brw_size)
@@ -1052,7 +1052,7 @@ static void osc_init_grant(struct client_obd *cli, struct obd_connect_data *ocd) · 67 unmodified lines
10521052 }
10531053
10541054 /* determine the appropriate chunk size used by osc_extent. */
1055− cli->cl_chunkbits = max_t(int, PAGE_CACHE_SHIFT, ocd->ocd_blocksize);
1055+ cli->cl_chunkbits = max_t(int, PAGE_SHIFT, ocd->ocd_blocksize);
10561056 client_obd_list_unlock(&cli->cl_loi_list_lock);
10571057
10581058 CDEBUG(D_CACHE, "%s, setting cl_avail_grant: %ld cl_lost_grant: %ld chunk bits: %d\n",
@@ -1317,9 +1317,9 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli, · 258 unmodified lines
13171317 LASSERT(pg->count > 0);
13181318 /* make sure there is no gap in the middle of page array */
13191319 LASSERTF(page_count == 1 ||
1320− (ergo(i == 0, poff + pg->count == PAGE_CACHE_SIZE) &&
1320+ (ergo(i == 0, poff + pg->count == PAGE_SIZE) &&
13211321 ergo(i > 0 && i < page_count - 1,
1322− poff == 0 && pg->count == PAGE_CACHE_SIZE) &&
1322+ poff == 0 && pg->count == PAGE_SIZE) &&
13231323 ergo(i == page_count - 1, poff == 0)),
13241324 "i: %d/%d pg: %p off: %llu, count: %u\n",
13251325 i, page_count, pg, pg->off, pg->count);
@@ -1877,7 +1877,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, · 551 unmodified lines
18771877 oap->oap_count;
18781878 else
18791879 LASSERT(oap->oap_page_off + oap->oap_count ==
1880− PAGE_CACHE_SIZE);
1880+ PAGE_SIZE);
18811881 }
18821882 }
18831883
@@ -1993,7 +1993,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, · 109 unmodified lines
19931993 tmp->oap_request = ptlrpc_request_addref(req);
19941994
19951995 client_obd_list_lock(&cli->cl_loi_list_lock);
1996− starting_offset >>= PAGE_CACHE_SHIFT;
1996+ starting_offset >>= PAGE_SHIFT;
19971997 if (cmd == OBD_BRW_READ) {
19981998 cli->cl_r_in_flight++;
19991999 lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count);
@@ -2790,12 +2790,12 @@ out: · 790 unmodified lines
27902790 CFS_PAGE_MASK;
27912791
27922792 if (OBD_OBJECT_EOF - fm_key->fiemap.fm_length <=
2793− fm_key->fiemap.fm_start + PAGE_CACHE_SIZE - 1)
2793+ fm_key->fiemap.fm_start + PAGE_SIZE - 1)
27942794 policy.l_extent.end = OBD_OBJECT_EOF;
27952795 else
27962796 policy.l_extent.end = (fm_key->fiemap.fm_start +
27972797 fm_key->fiemap.fm_length +
2798− PAGE_CACHE_SIZE - 1) & CFS_PAGE_MASK;
2798+ PAGE_SIZE - 1) & CFS_PAGE_MASK;
27992799
28002800 ostid_build_res_name(&fm_key->oa.o_oi, &res_id);
28012801 mode = ldlm_lock_match(exp->exp_obd->obd_namespace,
drivers/staging/lustre/lustre/ptlrpc/client.c+3−3
@@ -174,12 +174,12 @@ void __ptlrpc_prep_bulk_page(struct ptlrpc_bulk_desc *desc, · 173 unmodified lines
174174 LASSERT(page);
175175 LASSERT(pageoffset >= 0);
176176 LASSERT(len > 0);
177− LASSERT(pageoffset + len <= PAGE_CACHE_SIZE);
177+ LASSERT(pageoffset + len <= PAGE_SIZE);
178178
179179 desc->bd_nob += len;
180180
181181 if (pin)
182− page_cache_get(page);
182+ get_page(page);
183183
184184 ptlrpc_add_bulk_page(desc, page, pageoffset, len);
185185 }
@@ -206,7 +206,7 @@ void __ptlrpc_free_bulk(struct ptlrpc_bulk_desc *desc, int unpin) · 20 unmodified lines
206206
207207 if (unpin) {
208208 for (i = 0; i < desc->bd_iov_count; i++)
209− page_cache_release(desc->bd_iov[i].kiov_page);
209+ put_page(desc->bd_iov[i].kiov_page);
210210 }
211211
212212 kfree(desc);
drivers/staging/lustre/lustre/ptlrpc/import.c+1−1
@@ -1092,7 +1092,7 @@ finish: · 1091 unmodified lines
10921092
10931093 if (ocd->ocd_connect_flags & OBD_CONNECT_BRW_SIZE)
10941094 cli->cl_max_pages_per_rpc =
1095− min(ocd->ocd_brw_size >> PAGE_CACHE_SHIFT,
1095+ min(ocd->ocd_brw_size >> PAGE_SHIFT,
10961096 cli->cl_max_pages_per_rpc);
10971097 else if (imp->imp_connect_op == MDS_CONNECT ||
10981098 imp->imp_connect_op == MGS_CONNECT)
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c+2−2
@@ -308,7 +308,7 @@ ptlrpc_lprocfs_req_history_max_seq_write(struct file *file, · 307 unmodified lines
308308 * hose a kernel by allowing the request history to grow too
309309 * far.
310310 */
311− bufpages = (svc->srv_buf_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
311+ bufpages = (svc->srv_buf_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
312312 if (val > totalram_pages / (2 * bufpages))
313313 return -ERANGE;
314314
@@ -1226,7 +1226,7 @@ int lprocfs_wr_import(struct file *file, const char __user *buffer, · 911 unmodified lines
12261226 const char prefix[] = "connection=";
12271227 const int prefix_len = sizeof(prefix) - 1;
12281228
1229− if (count > PAGE_CACHE_SIZE - 1 || count <= prefix_len)
1229+ if (count > PAGE_SIZE - 1 || count <= prefix_len)
12301230 return -EINVAL;
12311231
12321232 kbuf = kzalloc(count + 1, GFP_NOFS);
drivers/staging/lustre/lustre/ptlrpc/recover.c+1−1
@@ -195,7 +195,7 @@ int ptlrpc_resend(struct obd_import *imp) · 194 unmodified lines
195195 }
196196
197197 list_for_each_entry_safe(req, next, &imp->imp_sending_list, rq_list) {
198− LASSERTF((long)req > PAGE_CACHE_SIZE && req != LP_POISON,
198+ LASSERTF((long)req > PAGE_SIZE && req != LP_POISON,
199199 "req %p bad\n", req);
200200 LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req);
201201 if (!ptlrpc_no_resend(req))
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c+1−1
@@ -58,7 +58,7 @@ · 57 unmodified lines
5858 * bulk encryption page pools *
5959 ****************************************/
6060
61−#define POINTERS_PER_PAGE (PAGE_CACHE_SIZE / sizeof(void *))
61+#define POINTERS_PER_PAGE (PAGE_SIZE / sizeof(void *))
6262 #define PAGES_PER_POOL (POINTERS_PER_PAGE)
6363
6464 #define IDLE_IDX_MAX (100)
drivers/usb/gadget/function/f_fs.c+2−2
@@ -1147,8 +1147,8 @@ static int ffs_sb_fill(struct super_block *sb, void *_data, int silent) · 1146 unmodified lines
11471147 ffs->sb = sb;
11481148 data->ffs_data = NULL;
11491149 sb->s_fs_info = ffs;
1150− sb->s_blocksize = PAGE_CACHE_SIZE;
1151− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
1150+ sb->s_blocksize = PAGE_SIZE;
1151+ sb->s_blocksize_bits = PAGE_SHIFT;
11521152 sb->s_magic = FUNCTIONFS_MAGIC;
11531153 sb->s_op = &ffs_sb_operations;
11541154 sb->s_time_gran = 1;
drivers/usb/gadget/legacy/inode.c+2−2
@@ -1954,8 +1954,8 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) · 1953 unmodified lines
19541954 return -ENODEV;
19551955
19561956 /* superblock */
1957− sb->s_blocksize = PAGE_CACHE_SIZE;
1958− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
1957+ sb->s_blocksize = PAGE_SIZE;
1958+ sb->s_blocksize_bits = PAGE_SHIFT;
19591959 sb->s_magic = GADGETFS_MAGIC;
19601960 sb->s_op = &gadget_fs_operations;
19611961 sb->s_time_gran = 1;
drivers/usb/storage/scsiglue.c+1−1
@@ -123,7 +123,7 @@ static int slave_configure(struct scsi_device *sdev) · 122 unmodified lines
123123 unsigned int max_sectors = 64;
124124
125125 if (us->fflags & US_FL_MAX_SECTORS_MIN)
126− max_sectors = PAGE_CACHE_SIZE >> 9;
126+ max_sectors = PAGE_SIZE >> 9;
127127 if (queue_max_hw_sectors(sdev->request_queue) > max_sectors)
128128 blk_queue_max_hw_sectors(sdev->request_queue,
129129 max_sectors);
drivers/video/fbdev/pvr2fb.c+1−1
@@ -735,7 +735,7 @@ out: · 734 unmodified lines
735735
736736 out_unmap:
737737 for (i = 0; i < nr_pages; i++)
738− page_cache_release(pages[i]);
738+ put_page(pages[i]);
739739
740740 kfree(pages);
741741
fs/9p/vfs_addr.c+9−9
@@ -153,7 +153,7 @@ static void v9fs_invalidate_page(struct page *page, unsigned int offset, · 152 unmodified lines
153153 * If called with zero offset, we should release
154154 * the private state assocated with the page
155155 */
156− if (offset == 0 && length == PAGE_CACHE_SIZE)
156+ if (offset == 0 && length == PAGE_SIZE)
157157 v9fs_fscache_invalidate_page(page);
158158 }
159159
@@ -166,10 +166,10 @@ static int v9fs_vfs_writepage_locked(struct page *page) · 6 unmodified lines
166166 struct bio_vec bvec;
167167 int err, len;
168168
169− if (page->index == size >> PAGE_CACHE_SHIFT)
170− len = size & ~PAGE_CACHE_MASK;
169+ if (page->index == size >> PAGE_SHIFT)
170+ len = size & ~PAGE_MASK;
171171 else
172− len = PAGE_CACHE_SIZE;
172+ len = PAGE_SIZE;
173173
174174 bvec.bv_page = page;
175175 bvec.bv_offset = 0;
@@ -271,7 +271,7 @@ static int v9fs_write_begin(struct file *filp, struct address_space *mapping, · 95 unmodified lines
271271 int retval = 0;
272272 struct page *page;
273273 struct v9fs_inode *v9inode;
274− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
274+ pgoff_t index = pos >> PAGE_SHIFT;
275275 struct inode *inode = mapping->host;
276276
277277
@@ -288,11 +288,11 @@ start: · 10 unmodified lines
288288 if (PageUptodate(page))
289289 goto out;
290290
291− if (len == PAGE_CACHE_SIZE)
291+ if (len == PAGE_SIZE)
292292 goto out;
293293
294294 retval = v9fs_fid_readpage(v9inode->writeback_fid, page);
295− page_cache_release(page);
295+ put_page(page);
296296 if (!retval)
297297 goto start;
298298 out:
@@ -313,7 +313,7 @@ static int v9fs_write_end(struct file *filp, struct address_space *mapping, · 14 unmodified lines
313313 /*
314314 * zero out the rest of the area
315315 */
316− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
316+ unsigned from = pos & (PAGE_SIZE - 1);
317317
318318 zero_user(page, from + copied, len - copied);
319319 flush_dcache_page(page);
@@ -331,7 +331,7 @@ static int v9fs_write_end(struct file *filp, struct address_space *mapping, · 11 unmodified lines
331331 }
332332 set_page_dirty(page);
333333 unlock_page(page);
334− page_cache_release(page);
334+ put_page(page);
335335
336336 return copied;
337337 }
fs/9p/vfs_file.c+2−2
@@ -421,8 +421,8 @@ v9fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) · 420 unmodified lines
421421 struct inode *inode = file_inode(file);
422422 loff_t i_size;
423423 unsigned long pg_start, pg_end;
424− pg_start = origin >> PAGE_CACHE_SHIFT;
425− pg_end = (origin + retval - 1) >> PAGE_CACHE_SHIFT;
424+ pg_start = origin >> PAGE_SHIFT;
425+ pg_end = (origin + retval - 1) >> PAGE_SHIFT;
426426 if (inode->i_mapping && inode->i_mapping->nrpages)
427427 invalidate_inode_pages2_range(inode->i_mapping,
428428 pg_start, pg_end);
fs/9p/vfs_super.c+1−1
@@ -87,7 +87,7 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, · 86 unmodified lines
8787 sb->s_op = &v9fs_super_ops;
8888 sb->s_bdi = &v9ses->bdi;
8989 if (v9ses->cache)
90− sb->s_bdi->ra_pages = (VM_MAX_READAHEAD * 1024)/PAGE_CACHE_SIZE;
90+ sb->s_bdi->ra_pages = (VM_MAX_READAHEAD * 1024)/PAGE_SIZE;
9191
9292 sb->s_flags |= MS_ACTIVE | MS_DIRSYNC | MS_NOATIME;
9393 if (!v9ses->cache)
fs/affs/file.c+13−13
@@ -510,9 +510,9 @@ affs_do_readpage_ofs(struct page *page, unsigned to) · 509 unmodified lines
510510
511511 pr_debug("%s(%lu, %ld, 0, %d)\n", __func__, inode->i_ino,
512512 page->index, to);
513− BUG_ON(to > PAGE_CACHE_SIZE);
513+ BUG_ON(to > PAGE_SIZE);
514514 bsize = AFFS_SB(sb)->s_data_blksize;
515− tmp = page->index << PAGE_CACHE_SHIFT;
515+ tmp = page->index << PAGE_SHIFT;
516516 bidx = tmp / bsize;
517517 boff = tmp % bsize;
518518
@@ -613,10 +613,10 @@ affs_readpage_ofs(struct file *file, struct page *page) · 94 unmodified lines
613613 int err;
614614
615615 pr_debug("%s(%lu, %ld)\n", __func__, inode->i_ino, page->index);
616− to = PAGE_CACHE_SIZE;
617− if (((page->index + 1) << PAGE_CACHE_SHIFT) > inode->i_size) {
618− to = inode->i_size & ~PAGE_CACHE_MASK;
619− memset(page_address(page) + to, 0, PAGE_CACHE_SIZE - to);
616+ to = PAGE_SIZE;
617+ if (((page->index + 1) << PAGE_SHIFT) > inode->i_size) {
618+ to = inode->i_size & ~PAGE_MASK;
619+ memset(page_address(page) + to, 0, PAGE_SIZE - to);
620620 }
621621
622622 err = affs_do_readpage_ofs(page, to);
@@ -646,7 +646,7 @@ static int affs_write_begin_ofs(struct file *file, struct address_space *mapping · 23 unmodified lines
646646 return err;
647647 }
648648
649− index = pos >> PAGE_CACHE_SHIFT;
649+ index = pos >> PAGE_SHIFT;
650650 page = grab_cache_page_write_begin(mapping, index, flags);
651651 if (!page)
652652 return -ENOMEM;
@@ -656,10 +656,10 @@ static int affs_write_begin_ofs(struct file *file, struct address_space *mapping · 3 unmodified lines
656656 return 0;
657657
658658 /* XXX: inefficient but safe in the face of short writes */
659− err = affs_do_readpage_ofs(page, PAGE_CACHE_SIZE);
659+ err = affs_do_readpage_ofs(page, PAGE_SIZE);
660660 if (err) {
661661 unlock_page(page);
662− page_cache_release(page);
662+ put_page(page);
663663 }
664664 return err;
665665 }
@@ -677,7 +677,7 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping, · 11 unmodified lines
677677 u32 tmp;
678678 int written;
679679
680− from = pos & (PAGE_CACHE_SIZE - 1);
680+ from = pos & (PAGE_SIZE - 1);
681681 to = pos + len;
682682 /*
683683 * XXX: not sure if this can handle short copies (len < copied), but
@@ -692,7 +692,7 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping, · 8 unmodified lines
692692
693693 bh = NULL;
694694 written = 0;
695− tmp = (page->index << PAGE_CACHE_SHIFT) + from;
695+ tmp = (page->index << PAGE_SHIFT) + from;
696696 bidx = tmp / bsize;
697697 boff = tmp % bsize;
698698 if (boff) {
@@ -788,13 +788,13 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping, · 89 unmodified lines
788788
789789 done:
790790 affs_brelse(bh);
791− tmp = (page->index << PAGE_CACHE_SHIFT) + from;
791+ tmp = (page->index << PAGE_SHIFT) + from;
792792 if (tmp > inode->i_size)
793793 inode->i_size = AFFS_I(inode)->mmu_private = tmp;
794794
795795 err_first_bh:
796796 unlock_page(page);
797− page_cache_release(page);
797+ put_page(page);
798798
799799 return written;
800800
fs/afs/dir.c+1−1
@@ -181,7 +181,7 @@ error: · 180 unmodified lines
181181 static inline void afs_dir_put_page(struct page *page)
182182 {
183183 kunmap(page);
184− page_cache_release(page);
184+ put_page(page);
185185 }
186186
187187 /*
fs/afs/file.c+2−2
@@ -164,7 +164,7 @@ int afs_page_filler(void *data, struct page *page) · 163 unmodified lines
164164 _debug("cache said ENOBUFS");
165165 default:
166166 go_on:
167− offset = page->index << PAGE_CACHE_SHIFT;
167+ offset = page->index << PAGE_SHIFT;
168168 len = min_t(size_t, i_size_read(inode) - offset, PAGE_SIZE);
169169
170170 /* read the contents of the file from the server into the
@@ -319,7 +319,7 @@ static void afs_invalidatepage(struct page *page, unsigned int offset, · 148 unmodified lines
319319 BUG_ON(!PageLocked(page));
320320
321321 /* we clean up only if the entire page is being invalidated */
322− if (offset == 0 && length == PAGE_CACHE_SIZE) {
322+ if (offset == 0 && length == PAGE_SIZE) {
323323 #ifdef CONFIG_AFS_FSCACHE
324324 if (PageFsCache(page)) {
325325 struct afs_vnode *vnode = AFS_FS_I(page->mapping->host);
fs/afs/mntpt.c+3−3
@@ -93,7 +93,7 @@ int afs_mntpt_check_symlink(struct afs_vnode *vnode, struct key *key) · 92 unmodified lines
9393
9494 kunmap(page);
9595 out_free:
96− page_cache_release(page);
96+ put_page(page);
9797 out:
9898 _leave(" = %d", ret);
9999 return ret;
@@ -189,7 +189,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) · 89 unmodified lines
189189 buf = kmap_atomic(page);
190190 memcpy(devname, buf, size);
191191 kunmap_atomic(buf);
192− page_cache_release(page);
192+ put_page(page);
193193 page = NULL;
194194 }
195195
@@ -211,7 +211,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) · 15 unmodified lines
211211 return mnt;
212212
213213 error:
214− page_cache_release(page);
214+ put_page(page);
215215 error_no_page:
216216 free_page((unsigned long) options);
217217 error_no_options:
fs/afs/super.c+2−2
@@ -315,8 +315,8 @@ static int afs_fill_super(struct super_block *sb, · 314 unmodified lines
315315 _enter("");
316316
317317 /* fill in the superblock */
318− sb->s_blocksize = PAGE_CACHE_SIZE;
319− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
318+ sb->s_blocksize = PAGE_SIZE;
319+ sb->s_blocksize_bits = PAGE_SHIFT;
320320 sb->s_magic = AFS_FS_MAGIC;
321321 sb->s_op = &afs_super_ops;
322322 sb->s_bdi = &as->volume->bdi;
fs/afs/write.c+13−13
@@ -93,10 +93,10 @@ static int afs_fill_page(struct afs_vnode *vnode, struct key *key, · 92 unmodified lines
9393 _enter(",,%llu", (unsigned long long)pos);
9494
9595 i_size = i_size_read(&vnode->vfs_inode);
96− if (pos + PAGE_CACHE_SIZE > i_size)
96+ if (pos + PAGE_SIZE > i_size)
9797 len = i_size - pos;
9898 else
99− len = PAGE_CACHE_SIZE;
99+ len = PAGE_SIZE;
100100
101101 ret = afs_vnode_fetch_data(vnode, key, pos, len, page);
102102 if (ret < 0) {
@@ -123,9 +123,9 @@ int afs_write_begin(struct file *file, struct address_space *mapping, · 20 unmodified lines
123123 struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
124124 struct page *page;
125125 struct key *key = file->private_data;
126− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
126+ unsigned from = pos & (PAGE_SIZE - 1);
127127 unsigned to = from + len;
128− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
128+ pgoff_t index = pos >> PAGE_SHIFT;
129129 int ret;
130130
131131 _enter("{%x:%u},{%lx},%u,%u",
@@ -151,8 +151,8 @@ int afs_write_begin(struct file *file, struct address_space *mapping, · 19 unmodified lines
151151 *pagep = page;
152152 /* page won't leak in error case: it eventually gets cleaned off LRU */
153153
154− if (!PageUptodate(page) && len != PAGE_CACHE_SIZE) {
155− ret = afs_fill_page(vnode, key, index << PAGE_CACHE_SHIFT, page);
154+ if (!PageUptodate(page) && len != PAGE_SIZE) {
155+ ret = afs_fill_page(vnode, key, index << PAGE_SHIFT, page);
156156 if (ret < 0) {
157157 kfree(candidate);
158158 _leave(" = %d [prep]", ret);
@@ -266,7 +266,7 @@ int afs_write_end(struct file *file, struct address_space *mapping, · 107 unmodified lines
266266 if (PageDirty(page))
267267 _debug("dirtied");
268268 unlock_page(page);
269− page_cache_release(page);
269+ put_page(page);
270270
271271 return copied;
272272 }
@@ -480,7 +480,7 @@ static int afs_writepages_region(struct address_space *mapping, · 207 unmodified lines
480480
481481 if (page->index > end) {
482482 *_next = index;
483− page_cache_release(page);
483+ put_page(page);
484484 _leave(" = 0 [%lx]", *_next);
485485 return 0;
486486 }
@@ -494,7 +494,7 @@ static int afs_writepages_region(struct address_space *mapping, · 7 unmodified lines
494494
495495 if (page->mapping != mapping) {
496496 unlock_page(page);
497− page_cache_release(page);
497+ put_page(page);
498498 continue;
499499 }
500500
@@ -515,7 +515,7 @@ static int afs_writepages_region(struct address_space *mapping, · 14 unmodified lines
515515
516516 ret = afs_write_back_from_locked_page(wb, page);
517517 unlock_page(page);
518− page_cache_release(page);
518+ put_page(page);
519519 if (ret < 0) {
520520 _leave(" = %d", ret);
521521 return ret;
@@ -551,13 +551,13 @@ int afs_writepages(struct address_space *mapping, · 29 unmodified lines
551551 &next);
552552 mapping->writeback_index = next;
553553 } else if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX) {
554− end = (pgoff_t)(LLONG_MAX >> PAGE_CACHE_SHIFT);
554+ end = (pgoff_t)(LLONG_MAX >> PAGE_SHIFT);
555555 ret = afs_writepages_region(mapping, wbc, 0, end, &next);
556556 if (wbc->nr_to_write > 0)
557557 mapping->writeback_index = next;
558558 } else {
559− start = wbc->range_start >> PAGE_CACHE_SHIFT;
560− end = wbc->range_end >> PAGE_CACHE_SHIFT;
559+ start = wbc->range_start >> PAGE_SHIFT;
560+ end = wbc->range_end >> PAGE_SHIFT;
561561 ret = afs_writepages_region(mapping, wbc, start, end, &next);
562562 }
563563
fs/binfmt_elf.c+1−1
@@ -2292,7 +2292,7 @@ static int elf_core_dump(struct coredump_params *cprm) · 2291 unmodified lines
22922292 void *kaddr = kmap(page);
22932293 stop = !dump_emit(cprm, kaddr, PAGE_SIZE);
22942294 kunmap(page);
2295− page_cache_release(page);
2295+ put_page(page);
22962296 } else
22972297 stop = !dump_skip(cprm, PAGE_SIZE);
22982298 if (stop)
fs/binfmt_elf_fdpic.c+1−1
@@ -1533,7 +1533,7 @@ static bool elf_fdpic_dump_segments(struct coredump_params *cprm) · 1532 unmodified lines
15331533 void *kaddr = kmap(page);
15341534 res = dump_emit(cprm, kaddr, PAGE_SIZE);
15351535 kunmap(page);
1536− page_cache_release(page);
1536+ put_page(page);
15371537 } else {
15381538 res = dump_skip(cprm, PAGE_SIZE);
15391539 }
fs/block_dev.c+2−2
@@ -331,7 +331,7 @@ static int blkdev_write_end(struct file *file, struct address_space *mapping, · 330 unmodified lines
331331 ret = block_write_end(file, mapping, pos, len, copied, page, fsdata);
332332
333333 unlock_page(page);
334− page_cache_release(page);
334+ put_page(page);
335335
336336 return ret;
337337 }
@@ -1149,7 +1149,7 @@ void bd_set_size(struct block_device *bdev, loff_t size) · 811 unmodified lines
11491149 inode_lock(bdev->bd_inode);
11501150 i_size_write(bdev->bd_inode, size);
11511151 inode_unlock(bdev->bd_inode);
1152− while (bsize < PAGE_CACHE_SIZE) {
1152+ while (bsize < PAGE_SIZE) {
11531153 if (size & bsize)
11541154 break;
11551155 bsize <<= 1;
fs/btrfs/check-integrity.c+30−30
@@ -757,7 +757,7 @@ static int btrfsic_process_superblock(struct btrfsic_state *state, · 756 unmodified lines
757757 BUG_ON(NULL == l);
758758
759759 ret = btrfsic_read_block(state, &tmp_next_block_ctx);
760− if (ret < (int)PAGE_CACHE_SIZE) {
760+ if (ret < (int)PAGE_SIZE) {
761761 printk(KERN_INFO
762762 "btrfsic: read @logical %llu failed!\n",
763763 tmp_next_block_ctx.start);
@@ -1231,15 +1231,15 @@ static void btrfsic_read_from_block_data( · 467 unmodified lines
12311231 size_t offset_in_page;
12321232 char *kaddr;
12331233 char *dst = (char *)dstv;
1234− size_t start_offset = block_ctx->start & ((u64)PAGE_CACHE_SIZE - 1);
1235− unsigned long i = (start_offset + offset) >> PAGE_CACHE_SHIFT;
1234+ size_t start_offset = block_ctx->start & ((u64)PAGE_SIZE - 1);
1235+ unsigned long i = (start_offset + offset) >> PAGE_SHIFT;
12361236
12371237 WARN_ON(offset + len > block_ctx->len);
1238− offset_in_page = (start_offset + offset) & (PAGE_CACHE_SIZE - 1);
1238+ offset_in_page = (start_offset + offset) & (PAGE_SIZE - 1);
12391239
12401240 while (len > 0) {
1241− cur = min(len, ((size_t)PAGE_CACHE_SIZE - offset_in_page));
1242− BUG_ON(i >= DIV_ROUND_UP(block_ctx->len, PAGE_CACHE_SIZE));
1241+ cur = min(len, ((size_t)PAGE_SIZE - offset_in_page));
1242+ BUG_ON(i >= DIV_ROUND_UP(block_ctx->len, PAGE_SIZE));
12431243 kaddr = block_ctx->datav[i];
12441244 memcpy(dst, kaddr + offset_in_page, cur);
12451245
@@ -1605,8 +1605,8 @@ static void btrfsic_release_block_ctx(struct btrfsic_block_data_ctx *block_ctx) · 359 unmodified lines
16051605
16061606 BUG_ON(!block_ctx->datav);
16071607 BUG_ON(!block_ctx->pagev);
1608− num_pages = (block_ctx->len + (u64)PAGE_CACHE_SIZE - 1) >>
1609− PAGE_CACHE_SHIFT;
1608+ num_pages = (block_ctx->len + (u64)PAGE_SIZE - 1) >>
1609+ PAGE_SHIFT;
16101610 while (num_pages > 0) {
16111611 num_pages--;
16121612 if (block_ctx->datav[num_pages]) {
@@ -1637,15 +1637,15 @@ static int btrfsic_read_block(struct btrfsic_state *state, · 24 unmodified lines
16371637 BUG_ON(block_ctx->datav);
16381638 BUG_ON(block_ctx->pagev);
16391639 BUG_ON(block_ctx->mem_to_free);
1640− if (block_ctx->dev_bytenr & ((u64)PAGE_CACHE_SIZE - 1)) {
1640+ if (block_ctx->dev_bytenr & ((u64)PAGE_SIZE - 1)) {
16411641 printk(KERN_INFO
16421642 "btrfsic: read_block() with unaligned bytenr %llu\n",
16431643 block_ctx->dev_bytenr);
16441644 return -1;
16451645 }
16461646
1647− num_pages = (block_ctx->len + (u64)PAGE_CACHE_SIZE - 1) >>
1648− PAGE_CACHE_SHIFT;
1647+ num_pages = (block_ctx->len + (u64)PAGE_SIZE - 1) >>
1648+ PAGE_SHIFT;
16491649 block_ctx->mem_to_free = kzalloc((sizeof(*block_ctx->datav) +
16501650 sizeof(*block_ctx->pagev)) *
16511651 num_pages, GFP_NOFS);
@@ -1676,8 +1676,8 @@ static int btrfsic_read_block(struct btrfsic_state *state, · 24 unmodified lines
16761676
16771677 for (j = i; j < num_pages; j++) {
16781678 ret = bio_add_page(bio, block_ctx->pagev[j],
1679− PAGE_CACHE_SIZE, 0);
1680− if (PAGE_CACHE_SIZE != ret)
1679+ PAGE_SIZE, 0);
1680+ if (PAGE_SIZE != ret)
16811681 break;
16821682 }
16831683 if (j == i) {
@@ -1693,7 +1693,7 @@ static int btrfsic_read_block(struct btrfsic_state *state, · 9 unmodified lines
16931693 return -1;
16941694 }
16951695 bio_put(bio);
1696− dev_bytenr += (j - i) * PAGE_CACHE_SIZE;
1696+ dev_bytenr += (j - i) * PAGE_SIZE;
16971697 i = j;
16981698 }
16991699 for (i = 0; i < num_pages; i++) {
@@ -1769,9 +1769,9 @@ static int btrfsic_test_for_metadata(struct btrfsic_state *state, · 69 unmodified lines
17691769 u32 crc = ~(u32)0;
17701770 unsigned int i;
17711771
1772− if (num_pages * PAGE_CACHE_SIZE < state->metablock_size)
1772+ if (num_pages * PAGE_SIZE < state->metablock_size)
17731773 return 1; /* not metadata */
1774− num_pages = state->metablock_size >> PAGE_CACHE_SHIFT;
1774+ num_pages = state->metablock_size >> PAGE_SHIFT;
17751775 h = (struct btrfs_header *)datav[0];
17761776
17771777 if (memcmp(h->fsid, state->root->fs_info->fsid, BTRFS_UUID_SIZE))
@@ -1779,8 +1779,8 @@ static int btrfsic_test_for_metadata(struct btrfsic_state *state, · 1 unmodified line
17791779
17801780 for (i = 0; i < num_pages; i++) {
17811781 u8 *data = i ? datav[i] : (datav[i] + BTRFS_CSUM_SIZE);
1782− size_t sublen = i ? PAGE_CACHE_SIZE :
1783− (PAGE_CACHE_SIZE - BTRFS_CSUM_SIZE);
1782+ size_t sublen = i ? PAGE_SIZE :
1783+ (PAGE_SIZE - BTRFS_CSUM_SIZE);
17841784
17851785 crc = btrfs_crc32c(crc, data, sublen);
17861786 }
@@ -1826,14 +1826,14 @@ again: · 39 unmodified lines
18261826 if (block->is_superblock) {
18271827 bytenr = btrfs_super_bytenr((struct btrfs_super_block *)
18281828 mapped_datav[0]);
1829− if (num_pages * PAGE_CACHE_SIZE <
1829+ if (num_pages * PAGE_SIZE <
18301830 BTRFS_SUPER_INFO_SIZE) {
18311831 printk(KERN_INFO
18321832 "btrfsic: cannot work with too short bios!\n");
18331833 return;
18341834 }
18351835 is_metadata = 1;
1836− BUG_ON(BTRFS_SUPER_INFO_SIZE & (PAGE_CACHE_SIZE - 1));
1836+ BUG_ON(BTRFS_SUPER_INFO_SIZE & (PAGE_SIZE - 1));
18371837 processed_len = BTRFS_SUPER_INFO_SIZE;
18381838 if (state->print_mask &
18391839 BTRFSIC_PRINT_MASK_TREE_BEFORE_SB_WRITE) {
@@ -1844,7 +1844,7 @@ again: · 4 unmodified lines
18441844 }
18451845 if (is_metadata) {
18461846 if (!block->is_superblock) {
1847− if (num_pages * PAGE_CACHE_SIZE <
1847+ if (num_pages * PAGE_SIZE <
18481848 state->metablock_size) {
18491849 printk(KERN_INFO
18501850 "btrfsic: cannot work with too short bios!\n");
@@ -1880,7 +1880,7 @@ again: · 29 unmodified lines
18801880 }
18811881 block->logical_bytenr = bytenr;
18821882 } else {
1883− if (num_pages * PAGE_CACHE_SIZE <
1883+ if (num_pages * PAGE_SIZE <
18841884 state->datablock_size) {
18851885 printk(KERN_INFO
18861886 "btrfsic: cannot work with too short bios!\n");
@@ -2013,7 +2013,7 @@ again: · 126 unmodified lines
20132013 block->logical_bytenr = bytenr;
20142014 block->is_metadata = 1;
20152015 if (block->is_superblock) {
2016− BUG_ON(PAGE_CACHE_SIZE !=
2016+ BUG_ON(PAGE_SIZE !=
20172017 BTRFS_SUPER_INFO_SIZE);
20182018 ret = btrfsic_process_written_superblock(
20192019 state,
@@ -2172,8 +2172,8 @@ again: · 152 unmodified lines
21722172 continue_loop:
21732173 BUG_ON(!processed_len);
21742174 dev_bytenr += processed_len;
2175− mapped_datav += processed_len >> PAGE_CACHE_SHIFT;
2176− num_pages -= processed_len >> PAGE_CACHE_SHIFT;
2175+ mapped_datav += processed_len >> PAGE_SHIFT;
2176+ num_pages -= processed_len >> PAGE_SHIFT;
21772177 goto again;
21782178 }
21792179
@@ -2954,7 +2954,7 @@ static void __btrfsic_submit_bio(int rw, struct bio *bio) · 774 unmodified lines
29542954 goto leave;
29552955 cur_bytenr = dev_bytenr;
29562956 for (i = 0; i < bio->bi_vcnt; i++) {
2957− BUG_ON(bio->bi_io_vec[i].bv_len != PAGE_CACHE_SIZE);
2957+ BUG_ON(bio->bi_io_vec[i].bv_len != PAGE_SIZE);
29582958 mapped_datav[i] = kmap(bio->bi_io_vec[i].bv_page);
29592959 if (!mapped_datav[i]) {
29602960 while (i > 0) {
@@ -3037,16 +3037,16 @@ int btrfsic_mount(struct btrfs_root *root, · 76 unmodified lines
30373037 struct list_head *dev_head = &fs_devices->devices;
30383038 struct btrfs_device *device;
30393039
3040− if (root->nodesize & ((u64)PAGE_CACHE_SIZE - 1)) {
3040+ if (root->nodesize & ((u64)PAGE_SIZE - 1)) {
30413041 printk(KERN_INFO
30423042 "btrfsic: cannot handle nodesize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
3043− root->nodesize, PAGE_CACHE_SIZE);
3043+ root->nodesize, PAGE_SIZE);
30443044 return -1;
30453045 }
3046− if (root->sectorsize & ((u64)PAGE_CACHE_SIZE - 1)) {
3046+ if (root->sectorsize & ((u64)PAGE_SIZE - 1)) {
30473047 printk(KERN_INFO
30483048 "btrfsic: cannot handle sectorsize %d not being a multiple of PAGE_CACHE_SIZE %ld!\n",
3049− root->sectorsize, PAGE_CACHE_SIZE);
3049+ root->sectorsize, PAGE_SIZE);
30503050 return -1;
30513051 }
30523052 state = kzalloc(sizeof(*state), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT);
fs/btrfs/compression.c+42−42
@@ -119,7 +119,7 @@ static int check_compressed_csum(struct inode *inode, · 118 unmodified lines
119119 csum = ~(u32)0;
120120
121121 kaddr = kmap_atomic(page);
122− csum = btrfs_csum_data(kaddr, csum, PAGE_CACHE_SIZE);
122+ csum = btrfs_csum_data(kaddr, csum, PAGE_SIZE);
123123 btrfs_csum_final(csum, (char *)&csum);
124124 kunmap_atomic(kaddr);
125125
@@ -190,7 +190,7 @@ csum_failed: · 64 unmodified lines
190190 for (index = 0; index < cb->nr_pages; index++) {
191191 page = cb->compressed_pages[index];
192192 page->mapping = NULL;
193− page_cache_release(page);
193+ put_page(page);
194194 }
195195
196196 /* do io completion on the original bio */
@@ -224,8 +224,8 @@ out: · 27 unmodified lines
224224 static noinline void end_compressed_writeback(struct inode *inode,
225225 const struct compressed_bio *cb)
226226 {
227− unsigned long index = cb->start >> PAGE_CACHE_SHIFT;
228− unsigned long end_index = (cb->start + cb->len - 1) >> PAGE_CACHE_SHIFT;
227+ unsigned long index = cb->start >> PAGE_SHIFT;
228+ unsigned long end_index = (cb->start + cb->len - 1) >> PAGE_SHIFT;
229229 struct page *pages[16];
230230 unsigned long nr_pages = end_index - index + 1;
231231 int i;
@@ -247,7 +247,7 @@ static noinline void end_compressed_writeback(struct inode *inode, · 15 unmodified lines
247247 if (cb->errors)
248248 SetPageError(pages[i]);
249249 end_page_writeback(pages[i]);
250− page_cache_release(pages[i]);
250+ put_page(pages[i]);
251251 }
252252 nr_pages -= ret;
253253 index += ret;
@@ -304,7 +304,7 @@ static void end_compressed_bio_write(struct bio *bio) · 50 unmodified lines
304304 for (index = 0; index < cb->nr_pages; index++) {
305305 page = cb->compressed_pages[index];
306306 page->mapping = NULL;
307− page_cache_release(page);
307+ put_page(page);
308308 }
309309
310310 /* finally free the cb struct */
@@ -341,7 +341,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, · 30 unmodified lines
341341 int ret;
342342 int skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM;
343343
344− WARN_ON(start & ((u64)PAGE_CACHE_SIZE - 1));
344+ WARN_ON(start & ((u64)PAGE_SIZE - 1));
345345 cb = kmalloc(compressed_bio_size(root, compressed_len), GFP_NOFS);
346346 if (!cb)
347347 return -ENOMEM;
@@ -374,14 +374,14 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, · 26 unmodified lines
374374 page->mapping = inode->i_mapping;
375375 if (bio->bi_iter.bi_size)
376376 ret = io_tree->ops->merge_bio_hook(WRITE, page, 0,
377− PAGE_CACHE_SIZE,
377+ PAGE_SIZE,
378378 bio, 0);
379379 else
380380 ret = 0;
381381
382382 page->mapping = NULL;
383− if (ret || bio_add_page(bio, page, PAGE_CACHE_SIZE, 0) <
384− PAGE_CACHE_SIZE) {
383+ if (ret || bio_add_page(bio, page, PAGE_SIZE, 0) <
384+ PAGE_SIZE) {
385385 bio_get(bio);
386386
387387 /*
@@ -410,15 +410,15 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, · 22 unmodified lines
410410 BUG_ON(!bio);
411411 bio->bi_private = cb;
412412 bio->bi_end_io = end_compressed_bio_write;
413− bio_add_page(bio, page, PAGE_CACHE_SIZE, 0);
413+ bio_add_page(bio, page, PAGE_SIZE, 0);
414414 }
415− if (bytes_left < PAGE_CACHE_SIZE) {
415+ if (bytes_left < PAGE_SIZE) {
416416 btrfs_info(BTRFS_I(inode)->root->fs_info,
417417 "bytes left %lu compress len %lu nr %lu",
418418 bytes_left, cb->compressed_len, cb->nr_pages);
419419 }
420− bytes_left -= PAGE_CACHE_SIZE;
421− first_byte += PAGE_CACHE_SIZE;
420+ bytes_left -= PAGE_SIZE;
421+ first_byte += PAGE_SIZE;
422422 cond_resched();
423423 }
424424 bio_get(bio);
@@ -457,17 +457,17 @@ static noinline int add_ra_bio_pages(struct inode *inode, · 32 unmodified lines
457457 int misses = 0;
458458
459459 page = cb->orig_bio->bi_io_vec[cb->orig_bio->bi_vcnt - 1].bv_page;
460− last_offset = (page_offset(page) + PAGE_CACHE_SIZE);
460+ last_offset = (page_offset(page) + PAGE_SIZE);
461461 em_tree = &BTRFS_I(inode)->extent_tree;
462462 tree = &BTRFS_I(inode)->io_tree;
463463
464464 if (isize == 0)
465465 return 0;
466466
467− end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
467+ end_index = (i_size_read(inode) - 1) >> PAGE_SHIFT;
468468
469469 while (last_offset < compressed_end) {
470− pg_index = last_offset >> PAGE_CACHE_SHIFT;
470+ pg_index = last_offset >> PAGE_SHIFT;
471471
472472 if (pg_index > end_index)
473473 break;
@@ -488,11 +488,11 @@ static noinline int add_ra_bio_pages(struct inode *inode, · 14 unmodified lines
488488 break;
489489
490490 if (add_to_page_cache_lru(page, mapping, pg_index, GFP_NOFS)) {
491− page_cache_release(page);
491+ put_page(page);
492492 goto next;
493493 }
494494
495− end = last_offset + PAGE_CACHE_SIZE - 1;
495+ end = last_offset + PAGE_SIZE - 1;
496496 /*
497497 * at this point, we have a locked page in the page cache
498498 * for these bytes in the file. But, we have to make
@@ -502,27 +502,27 @@ static noinline int add_ra_bio_pages(struct inode *inode, · 3 unmodified lines
502502 lock_extent(tree, last_offset, end);
503503 read_lock(&em_tree->lock);
504504 em = lookup_extent_mapping(em_tree, last_offset,
505− PAGE_CACHE_SIZE);
505+ PAGE_SIZE);
506506 read_unlock(&em_tree->lock);
507507
508508 if (!em || last_offset < em->start ||
509− (last_offset + PAGE_CACHE_SIZE > extent_map_end(em)) ||
509+ (last_offset + PAGE_SIZE > extent_map_end(em)) ||
510510 (em->block_start >> 9) != cb->orig_bio->bi_iter.bi_sector) {
511511 free_extent_map(em);
512512 unlock_extent(tree, last_offset, end);
513513 unlock_page(page);
514− page_cache_release(page);
514+ put_page(page);
515515 break;
516516 }
517517 free_extent_map(em);
518518
519519 if (page->index == end_index) {
520520 char *userpage;
521− size_t zero_offset = isize & (PAGE_CACHE_SIZE - 1);
521+ size_t zero_offset = isize & (PAGE_SIZE - 1);
522522
523523 if (zero_offset) {
524524 int zeros;
525− zeros = PAGE_CACHE_SIZE - zero_offset;
525+ zeros = PAGE_SIZE - zero_offset;
526526 userpage = kmap_atomic(page);
527527 memset(userpage + zero_offset, 0, zeros);
528528 flush_dcache_page(page);
@@ -531,19 +531,19 @@ static noinline int add_ra_bio_pages(struct inode *inode, · 2 unmodified lines
531531 }
532532
533533 ret = bio_add_page(cb->orig_bio, page,
534− PAGE_CACHE_SIZE, 0);
534+ PAGE_SIZE, 0);
535535
536− if (ret == PAGE_CACHE_SIZE) {
536+ if (ret == PAGE_SIZE) {
537537 nr_pages++;
538− page_cache_release(page);
538+ put_page(page);
539539 } else {
540540 unlock_extent(tree, last_offset, end);
541541 unlock_page(page);
542− page_cache_release(page);
542+ put_page(page);
543543 break;
544544 }
545545 next:
546− last_offset += PAGE_CACHE_SIZE;
546+ last_offset += PAGE_SIZE;
547547 }
548548 return 0;
549549 }
@@ -567,7 +567,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, · 17 unmodified lines
567567 struct extent_map_tree *em_tree;
568568 struct compressed_bio *cb;
569569 struct btrfs_root *root = BTRFS_I(inode)->root;
570− unsigned long uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE;
570+ unsigned long uncompressed_len = bio->bi_vcnt * PAGE_SIZE;
571571 unsigned long compressed_len;
572572 unsigned long nr_pages;
573573 unsigned long pg_index;
@@ -589,7 +589,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, · 15 unmodified lines
589589 read_lock(&em_tree->lock);
590590 em = lookup_extent_mapping(em_tree,
591591 page_offset(bio->bi_io_vec->bv_page),
592− PAGE_CACHE_SIZE);
592+ PAGE_SIZE);
593593 read_unlock(&em_tree->lock);
594594 if (!em)
595595 return -EIO;
@@ -617,7 +617,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, · 21 unmodified lines
617617 cb->compress_type = extent_compress_type(bio_flags);
618618 cb->orig_bio = bio;
619619
620− nr_pages = DIV_ROUND_UP(compressed_len, PAGE_CACHE_SIZE);
620+ nr_pages = DIV_ROUND_UP(compressed_len, PAGE_SIZE);
621621 cb->compressed_pages = kcalloc(nr_pages, sizeof(struct page *),
622622 GFP_NOFS);
623623 if (!cb->compressed_pages)
@@ -640,7 +640,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, · 16 unmodified lines
640640 add_ra_bio_pages(inode, em_start + em_len, cb);
641641
642642 /* include any pages we added in add_ra-bio_pages */
643− uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE;
643+ uncompressed_len = bio->bi_vcnt * PAGE_SIZE;
644644 cb->len = uncompressed_len;
645645
646646 comp_bio = compressed_bio_alloc(bdev, cur_disk_byte, GFP_NOFS);
@@ -653,18 +653,18 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, · 6 unmodified lines
653653 for (pg_index = 0; pg_index < nr_pages; pg_index++) {
654654 page = cb->compressed_pages[pg_index];
655655 page->mapping = inode->i_mapping;
656− page->index = em_start >> PAGE_CACHE_SHIFT;
656+ page->index = em_start >> PAGE_SHIFT;
657657
658658 if (comp_bio->bi_iter.bi_size)
659659 ret = tree->ops->merge_bio_hook(READ, page, 0,
660− PAGE_CACHE_SIZE,
660+ PAGE_SIZE,
661661 comp_bio, 0);
662662 else
663663 ret = 0;
664664
665665 page->mapping = NULL;
666− if (ret || bio_add_page(comp_bio, page, PAGE_CACHE_SIZE, 0) <
667− PAGE_CACHE_SIZE) {
666+ if (ret || bio_add_page(comp_bio, page, PAGE_SIZE, 0) <
667+ PAGE_SIZE) {
668668 bio_get(comp_bio);
669669
670670 ret = btrfs_bio_wq_end_io(root->fs_info, comp_bio,
@@ -702,9 +702,9 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, · 31 unmodified lines
702702 comp_bio->bi_private = cb;
703703 comp_bio->bi_end_io = end_compressed_bio_read;
704704
705− bio_add_page(comp_bio, page, PAGE_CACHE_SIZE, 0);
705+ bio_add_page(comp_bio, page, PAGE_SIZE, 0);
706706 }
707− cur_disk_byte += PAGE_CACHE_SIZE;
707+ cur_disk_byte += PAGE_SIZE;
708708 }
709709 bio_get(comp_bio);
710710
@@ -1013,8 +1013,8 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, · 302 unmodified lines
10131013
10141014 /* copy bytes from the working buffer into the pages */
10151015 while (working_bytes > 0) {
1016− bytes = min(PAGE_CACHE_SIZE - *pg_offset,
1017− PAGE_CACHE_SIZE - buf_offset);
1016+ bytes = min(PAGE_SIZE - *pg_offset,
1017+ PAGE_SIZE - buf_offset);
10181018 bytes = min(bytes, working_bytes);
10191019 kaddr = kmap_atomic(page_out);
10201020 memcpy(kaddr + *pg_offset, buf + buf_offset, bytes);
@@ -1027,7 +1027,7 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, · 6 unmodified lines
10271027 current_buf_start += bytes;
10281028
10291029 /* check if we need to pick another page */
1030− if (*pg_offset == PAGE_CACHE_SIZE) {
1030+ if (*pg_offset == PAGE_SIZE) {
10311031 (*pg_index)++;
10321032 if (*pg_index >= vcnt)
10331033 return 0;
fs/btrfs/disk-io.c+7−7
@@ -1055,7 +1055,7 @@ static void btree_invalidatepage(struct page *page, unsigned int offset, · 1054 unmodified lines
10551055 (unsigned long long)page_offset(page));
10561056 ClearPagePrivate(page);
10571057 set_page_private(page, 0);
1058− page_cache_release(page);
1058+ put_page(page);
10591059 }
10601060 }
10611061
@@ -1757,7 +1757,7 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) · 695 unmodified lines
17571757 if (err)
17581758 return err;
17591759
1760− bdi->ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE;
1760+ bdi->ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_SIZE;
17611761 bdi->congested_fn = btrfs_congested_fn;
17621762 bdi->congested_data = info;
17631763 bdi->capabilities |= BDI_CAP_CGROUP_WRITEBACK;
@@ -2537,7 +2537,7 @@ int open_ctree(struct super_block *sb, · 773 unmodified lines
25372537 err = ret;
25382538 goto fail_bdi;
25392539 }
2540− fs_info->dirty_metadata_batch = PAGE_CACHE_SIZE *
2540+ fs_info->dirty_metadata_batch = PAGE_SIZE *
25412541 (1 + ilog2(nr_cpu_ids));
25422542
25432543 ret = percpu_counter_init(&fs_info->delalloc_bytes, 0, GFP_KERNEL);
@@ -2782,7 +2782,7 @@ int open_ctree(struct super_block *sb, · 238 unmodified lines
27822782 * flag our filesystem as having big metadata blocks if
27832783 * they are bigger than the page size
27842784 */
2785− if (btrfs_super_nodesize(disk_super) > PAGE_CACHE_SIZE) {
2785+ if (btrfs_super_nodesize(disk_super) > PAGE_SIZE) {
27862786 if (!(features & BTRFS_FEATURE_INCOMPAT_BIG_METADATA))
27872787 printk(KERN_INFO "BTRFS: flagging fs with big metadata feature\n");
27882788 features |= BTRFS_FEATURE_INCOMPAT_BIG_METADATA;
@@ -2832,7 +2832,7 @@ int open_ctree(struct super_block *sb, · 43 unmodified lines
28322832
28332833 fs_info->bdi.ra_pages *= btrfs_super_num_devices(disk_super);
28342834 fs_info->bdi.ra_pages = max(fs_info->bdi.ra_pages,
2835− SZ_4M / PAGE_CACHE_SIZE);
2835+ SZ_4M / PAGE_SIZE);
28362836
28372837 tree_root->nodesize = nodesize;
28382838 tree_root->sectorsize = sectorsize;
@@ -4071,9 +4071,9 @@ static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info, · 1232 unmodified lines
40714071 ret = -EINVAL;
40724072 }
40734073 /* Only PAGE SIZE is supported yet */
4074− if (sectorsize != PAGE_CACHE_SIZE) {
4074+ if (sectorsize != PAGE_SIZE) {
40754075 printk(KERN_ERR "BTRFS: sectorsize %llu not supported yet, only support %lu\n",
4076− sectorsize, PAGE_CACHE_SIZE);
4076+ sectorsize, PAGE_SIZE);
40774077 ret = -EINVAL;
40784078 }
40794079 if (!is_power_of_2(nodesize) || nodesize < sectorsize ||
fs/btrfs/extent-tree.c+2−2
@@ -3452,7 +3452,7 @@ again: · 3451 unmodified lines
34523452 num_pages = 1;
34533453
34543454 num_pages *= 16;
3455− num_pages *= PAGE_CACHE_SIZE;
3455+ num_pages *= PAGE_SIZE;
34563456
34573457 ret = btrfs_check_data_free_space(inode, 0, num_pages);
34583458 if (ret)
@@ -4639,7 +4639,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig, · 1180 unmodified lines
46394639 loops = 0;
46404640 while (delalloc_bytes && loops < 3) {
46414641 max_reclaim = min(delalloc_bytes, to_reclaim);
4642− nr_pages = max_reclaim >> PAGE_CACHE_SHIFT;
4642+ nr_pages = max_reclaim >> PAGE_SHIFT;
46434643 btrfs_writeback_inodes_sb_nr(root, nr_pages, items);
46444644 /*
46454645 * We need to wait for the async pages to actually start before
fs/btrfs/extent_io.c+131−131
@@ -1363,23 +1363,23 @@ int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end) · 1362 unmodified lines
13631363
13641364 void extent_range_clear_dirty_for_io(struct inode *inode, u64 start, u64 end)
13651365 {
1366− unsigned long index = start >> PAGE_CACHE_SHIFT;
1367− unsigned long end_index = end >> PAGE_CACHE_SHIFT;
1366+ unsigned long index = start >> PAGE_SHIFT;
1367+ unsigned long end_index = end >> PAGE_SHIFT;
13681368 struct page *page;
13691369
13701370 while (index <= end_index) {
13711371 page = find_get_page(inode->i_mapping, index);
13721372 BUG_ON(!page); /* Pages should be in the extent_io_tree */
13731373 clear_page_dirty_for_io(page);
1374− page_cache_release(page);
1374+ put_page(page);
13751375 index++;
13761376 }
13771377 }
13781378
13791379 void extent_range_redirty_for_io(struct inode *inode, u64 start, u64 end)
13801380 {
1381− unsigned long index = start >> PAGE_CACHE_SHIFT;
1382− unsigned long end_index = end >> PAGE_CACHE_SHIFT;
1381+ unsigned long index = start >> PAGE_SHIFT;
1382+ unsigned long end_index = end >> PAGE_SHIFT;
13831383 struct page *page;
13841384
13851385 while (index <= end_index) {
@@ -1387,7 +1387,7 @@ void extent_range_redirty_for_io(struct inode *inode, u64 start, u64 end) · 1 unmodified line
13871387 BUG_ON(!page); /* Pages should be in the extent_io_tree */
13881388 __set_page_dirty_nobuffers(page);
13891389 account_page_redirty(page);
1390− page_cache_release(page);
1390+ put_page(page);
13911391 index++;
13921392 }
13931393 }
@@ -1397,15 +1397,15 @@ void extent_range_redirty_for_io(struct inode *inode, u64 start, u64 end) · 3 unmodified lines
13971397 */
13981398 static void set_range_writeback(struct extent_io_tree *tree, u64 start, u64 end)
13991399 {
1400− unsigned long index = start >> PAGE_CACHE_SHIFT;
1401− unsigned long end_index = end >> PAGE_CACHE_SHIFT;
1400+ unsigned long index = start >> PAGE_SHIFT;
1401+ unsigned long end_index = end >> PAGE_SHIFT;
14021402 struct page *page;
14031403
14041404 while (index <= end_index) {
14051405 page = find_get_page(tree->mapping, index);
14061406 BUG_ON(!page); /* Pages should be in the extent_io_tree */
14071407 set_page_writeback(page);
1408− page_cache_release(page);
1408+ put_page(page);
14091409 index++;
14101410 }
14111411 }
@@ -1556,8 +1556,8 @@ static noinline void __unlock_for_delalloc(struct inode *inode, · 144 unmodified lines
15561556 {
15571557 int ret;
15581558 struct page *pages[16];
1559− unsigned long index = start >> PAGE_CACHE_SHIFT;
1560− unsigned long end_index = end >> PAGE_CACHE_SHIFT;
1559+ unsigned long index = start >> PAGE_SHIFT;
1560+ unsigned long end_index = end >> PAGE_SHIFT;
15611561 unsigned long nr_pages = end_index - index + 1;
15621562 int i;
15631563
@@ -1571,7 +1571,7 @@ static noinline void __unlock_for_delalloc(struct inode *inode, · 7 unmodified lines
15711571 for (i = 0; i < ret; i++) {
15721572 if (pages[i] != locked_page)
15731573 unlock_page(pages[i]);
1574− page_cache_release(pages[i]);
1574+ put_page(pages[i]);
15751575 }
15761576 nr_pages -= ret;
15771577 index += ret;
@@ -1584,9 +1584,9 @@ static noinline int lock_delalloc_pages(struct inode *inode, · 6 unmodified lines
15841584 u64 delalloc_start,
15851585 u64 delalloc_end)
15861586 {
1587− unsigned long index = delalloc_start >> PAGE_CACHE_SHIFT;
1587+ unsigned long index = delalloc_start >> PAGE_SHIFT;
15881588 unsigned long start_index = index;
1589− unsigned long end_index = delalloc_end >> PAGE_CACHE_SHIFT;
1589+ unsigned long end_index = delalloc_end >> PAGE_SHIFT;
15901590 unsigned long pages_locked = 0;
15911591 struct page *pages[16];
15921592 unsigned long nrpages;
@@ -1619,11 +1619,11 @@ static noinline int lock_delalloc_pages(struct inode *inode, · 26 unmodified lines
16191619 pages[i]->mapping != inode->i_mapping) {
16201620 ret = -EAGAIN;
16211621 unlock_page(pages[i]);
1622− page_cache_release(pages[i]);
1622+ put_page(pages[i]);
16231623 goto done;
16241624 }
16251625 }
1626− page_cache_release(pages[i]);
1626+ put_page(pages[i]);
16271627 pages_locked++;
16281628 }
16291629 nrpages -= ret;
@@ -1636,7 +1636,7 @@ done: · 6 unmodified lines
16361636 __unlock_for_delalloc(inode, locked_page,
16371637 delalloc_start,
16381638 ((u64)(start_index + pages_locked - 1)) <<
1639− PAGE_CACHE_SHIFT);
1639+ PAGE_SHIFT);
16401640 }
16411641 return ret;
16421642 }
@@ -1696,7 +1696,7 @@ again: · 53 unmodified lines
16961696 free_extent_state(cached_state);
16971697 cached_state = NULL;
16981698 if (!loops) {
1699− max_bytes = PAGE_CACHE_SIZE;
1699+ max_bytes = PAGE_SIZE;
17001700 loops = 1;
17011701 goto again;
17021702 } else {
@@ -1735,8 +1735,8 @@ void extent_clear_unlock_delalloc(struct inode *inode, u64 start, u64 end, · 32 unmodified lines
17351735 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
17361736 int ret;
17371737 struct page *pages[16];
1738− unsigned long index = start >> PAGE_CACHE_SHIFT;
1739− unsigned long end_index = end >> PAGE_CACHE_SHIFT;
1738+ unsigned long index = start >> PAGE_SHIFT;
1739+ unsigned long end_index = end >> PAGE_SHIFT;
17401740 unsigned long nr_pages = end_index - index + 1;
17411741 int i;
17421742
@@ -1757,7 +1757,7 @@ void extent_clear_unlock_delalloc(struct inode *inode, u64 start, u64 end, · 14 unmodified lines
17571757 SetPagePrivate2(pages[i]);
17581758
17591759 if (pages[i] == locked_page) {
1760− page_cache_release(pages[i]);
1760+ put_page(pages[i]);
17611761 continue;
17621762 }
17631763 if (page_ops & PAGE_CLEAR_DIRTY)
@@ -1770,7 +1770,7 @@ void extent_clear_unlock_delalloc(struct inode *inode, u64 start, u64 end, · 6 unmodified lines
17701770 end_page_writeback(pages[i]);
17711771 if (page_ops & PAGE_UNLOCK)
17721772 unlock_page(pages[i]);
1773− page_cache_release(pages[i]);
1773+ put_page(pages[i]);
17741774 }
17751775 nr_pages -= ret;
17761776 index += ret;
@@ -1961,7 +1961,7 @@ int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, · 184 unmodified lines
19611961 static void check_page_uptodate(struct extent_io_tree *tree, struct page *page)
19621962 {
19631963 u64 start = page_offset(page);
1964− u64 end = start + PAGE_CACHE_SIZE - 1;
1964+ u64 end = start + PAGE_SIZE - 1;
19651965 if (test_range_bit(tree, start, end, EXTENT_UPTODATE, 1, NULL))
19661966 SetPageUptodate(page);
19671967 }
@@ -2071,11 +2071,11 @@ int repair_eb_io_failure(struct btrfs_root *root, struct extent_buffer *eb, · 103 unmodified lines
20712071 struct page *p = eb->pages[i];
20722072
20732073 ret = repair_io_failure(root->fs_info->btree_inode, start,
2074− PAGE_CACHE_SIZE, start, p,
2074+ PAGE_SIZE, start, p,
20752075 start - page_offset(p), mirror_num);
20762076 if (ret)
20772077 break;
2078− start += PAGE_CACHE_SIZE;
2078+ start += PAGE_SIZE;
20792079 }
20802080
20812081 return ret;
@@ -2466,8 +2466,8 @@ static void end_bio_extent_writepage(struct bio *bio) · 384 unmodified lines
24662466 * advance bv_offset and adjust bv_len to compensate.
24672467 * Print a warning for nonzero offsets, and an error
24682468 * if they don't add up to a full page. */
2469− if (bvec->bv_offset || bvec->bv_len != PAGE_CACHE_SIZE) {
2470− if (bvec->bv_offset + bvec->bv_len != PAGE_CACHE_SIZE)
2469+ if (bvec->bv_offset || bvec->bv_len != PAGE_SIZE) {
2470+ if (bvec->bv_offset + bvec->bv_len != PAGE_SIZE)
24712471 btrfs_err(BTRFS_I(page->mapping->host)->root->fs_info,
24722472 "partial page write in btrfs with offset %u and length %u",
24732473 bvec->bv_offset, bvec->bv_len);
@@ -2541,8 +2541,8 @@ static void end_bio_extent_readpage(struct bio *bio) · 67 unmodified lines
25412541 * advance bv_offset and adjust bv_len to compensate.
25422542 * Print a warning for nonzero offsets, and an error
25432543 * if they don't add up to a full page. */
2544− if (bvec->bv_offset || bvec->bv_len != PAGE_CACHE_SIZE) {
2545− if (bvec->bv_offset + bvec->bv_len != PAGE_CACHE_SIZE)
2544+ if (bvec->bv_offset || bvec->bv_len != PAGE_SIZE) {
2545+ if (bvec->bv_offset + bvec->bv_len != PAGE_SIZE)
25462546 btrfs_err(BTRFS_I(page->mapping->host)->root->fs_info,
25472547 "partial page read in btrfs with offset %u and length %u",
25482548 bvec->bv_offset, bvec->bv_len);
@@ -2598,13 +2598,13 @@ static void end_bio_extent_readpage(struct bio *bio) · 49 unmodified lines
25982598 readpage_ok:
25992599 if (likely(uptodate)) {
26002600 loff_t i_size = i_size_read(inode);
2601− pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
2601+ pgoff_t end_index = i_size >> PAGE_SHIFT;
26022602 unsigned off;
26032603
26042604 /* Zero out the end if this page straddles i_size */
2605− off = i_size & (PAGE_CACHE_SIZE-1);
2605+ off = i_size & (PAGE_SIZE-1);
26062606 if (page->index == end_index && off)
2607− zero_user_segment(page, off, PAGE_CACHE_SIZE);
2607+ zero_user_segment(page, off, PAGE_SIZE);
26082608 SetPageUptodate(page);
26092609 } else {
26102610 ClearPageUptodate(page);
@@ -2768,7 +2768,7 @@ static int submit_extent_page(int rw, struct extent_io_tree *tree, · 157 unmodified lines
27682768 struct bio *bio;
27692769 int contig = 0;
27702770 int old_compressed = prev_bio_flags & EXTENT_BIO_COMPRESSED;
2771− size_t page_size = min_t(size_t, size, PAGE_CACHE_SIZE);
2771+ size_t page_size = min_t(size_t, size, PAGE_SIZE);
27722772
27732773 if (bio_ret && *bio_ret) {
27742774 bio = *bio_ret;
@@ -2821,7 +2821,7 @@ static void attach_extent_buffer_page(struct extent_buffer *eb, · 46 unmodified lines
28212821 {
28222822 if (!PagePrivate(page)) {
28232823 SetPagePrivate(page);
2824− page_cache_get(page);
2824+ get_page(page);
28252825 set_page_private(page, (unsigned long)eb);
28262826 } else {
28272827 WARN_ON(page->private != (unsigned long)eb);
@@ -2832,7 +2832,7 @@ void set_page_extent_mapped(struct page *page) · 4 unmodified lines
28322832 {
28332833 if (!PagePrivate(page)) {
28342834 SetPagePrivate(page);
2835− page_cache_get(page);
2835+ get_page(page);
28362836 set_page_private(page, EXTENT_PAGE_PRIVATE);
28372837 }
28382838 }
@@ -2880,7 +2880,7 @@ static int __do_readpage(struct extent_io_tree *tree, · 41 unmodified lines
28802880 {
28812881 struct inode *inode = page->mapping->host;
28822882 u64 start = page_offset(page);
2883− u64 page_end = start + PAGE_CACHE_SIZE - 1;
2883+ u64 page_end = start + PAGE_SIZE - 1;
28842884 u64 end;
28852885 u64 cur = start;
28862886 u64 extent_offset;
@@ -2909,12 +2909,12 @@ static int __do_readpage(struct extent_io_tree *tree, · 22 unmodified lines
29092909 }
29102910 }
29112911
2912− if (page->index == last_byte >> PAGE_CACHE_SHIFT) {
2912+ if (page->index == last_byte >> PAGE_SHIFT) {
29132913 char *userpage;
2914− size_t zero_offset = last_byte & (PAGE_CACHE_SIZE - 1);
2914+ size_t zero_offset = last_byte & (PAGE_SIZE - 1);
29152915
29162916 if (zero_offset) {
2917− iosize = PAGE_CACHE_SIZE - zero_offset;
2917+ iosize = PAGE_SIZE - zero_offset;
29182918 userpage = kmap_atomic(page);
29192919 memset(userpage + zero_offset, 0, iosize);
29202920 flush_dcache_page(page);
@@ -2922,14 +2922,14 @@ static int __do_readpage(struct extent_io_tree *tree, · 1 unmodified line
29222922 }
29232923 }
29242924 while (cur <= end) {
2925− unsigned long pnr = (last_byte >> PAGE_CACHE_SHIFT) + 1;
2925+ unsigned long pnr = (last_byte >> PAGE_SHIFT) + 1;
29262926 bool force_bio_submit = false;
29272927
29282928 if (cur >= last_byte) {
29292929 char *userpage;
29302930 struct extent_state *cached = NULL;
29312931
2932− iosize = PAGE_CACHE_SIZE - pg_offset;
2932+ iosize = PAGE_SIZE - pg_offset;
29332933 userpage = kmap_atomic(page);
29342934 memset(userpage + pg_offset, 0, iosize);
29352935 flush_dcache_page(page);
@@ -3112,7 +3112,7 @@ static inline void __do_contiguous_readpages(struct extent_io_tree *tree, · 176 unmodified lines
31123112 for (index = 0; index < nr_pages; index++) {
31133113 __do_readpage(tree, pages[index], get_extent, em_cached, bio,
31143114 mirror_num, bio_flags, rw, prev_em_start);
3115− page_cache_release(pages[index]);
3115+ put_page(pages[index]);
31163116 }
31173117 }
31183118
@@ -3134,10 +3134,10 @@ static void __extent_readpages(struct extent_io_tree *tree, · 15 unmodified lines
31343134 page_start = page_offset(pages[index]);
31353135 if (!end) {
31363136 start = page_start;
3137− end = start + PAGE_CACHE_SIZE - 1;
3137+ end = start + PAGE_SIZE - 1;
31383138 first_index = index;
31393139 } else if (end + 1 == page_start) {
3140− end += PAGE_CACHE_SIZE;
3140+ end += PAGE_SIZE;
31413141 } else {
31423142 __do_contiguous_readpages(tree, &pages[first_index],
31433143 index - first_index, start,
@@ -3145,7 +3145,7 @@ static void __extent_readpages(struct extent_io_tree *tree, · 1 unmodified line
31453145 bio, mirror_num, bio_flags,
31463146 rw, prev_em_start);
31473147 start = page_start;
3148− end = start + PAGE_CACHE_SIZE - 1;
3148+ end = start + PAGE_SIZE - 1;
31493149 first_index = index;
31503150 }
31513151 }
@@ -3167,13 +3167,13 @@ static int __extent_read_full_page(struct extent_io_tree *tree, · 15 unmodified lines
31673167 struct inode *inode = page->mapping->host;
31683168 struct btrfs_ordered_extent *ordered;
31693169 u64 start = page_offset(page);
3170− u64 end = start + PAGE_CACHE_SIZE - 1;
3170+ u64 end = start + PAGE_SIZE - 1;
31713171 int ret;
31723172
31733173 while (1) {
31743174 lock_extent(tree, start, end);
31753175 ordered = btrfs_lookup_ordered_range(inode, start,
3176− PAGE_CACHE_SIZE);
3176+ PAGE_SIZE);
31773177 if (!ordered)
31783178 break;
31793179 unlock_extent(tree, start, end);
@@ -3227,7 +3227,7 @@ static noinline_for_stack int writepage_delalloc(struct inode *inode, · 47 unmodified lines
32273227 unsigned long *nr_written)
32283228 {
32293229 struct extent_io_tree *tree = epd->tree;
3230− u64 page_end = delalloc_start + PAGE_CACHE_SIZE - 1;
3230+ u64 page_end = delalloc_start + PAGE_SIZE - 1;
32313231 u64 nr_delalloc;
32323232 u64 delalloc_to_write = 0;
32333233 u64 delalloc_end = 0;
@@ -3269,8 +3269,8 @@ static noinline_for_stack int writepage_delalloc(struct inode *inode, · 35 unmodified lines
32693269 * PAGE_CACHE_SIZE
32703270 */
32713271 delalloc_to_write += (delalloc_end - delalloc_start +
3272− PAGE_CACHE_SIZE) >>
3273− PAGE_CACHE_SHIFT;
3272+ PAGE_SIZE) >>
3273+ PAGE_SHIFT;
32743274 delalloc_start = delalloc_end + 1;
32753275 }
32763276 if (wbc->nr_to_write < delalloc_to_write) {
@@ -3319,7 +3319,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode, · 42 unmodified lines
33193319 {
33203320 struct extent_io_tree *tree = epd->tree;
33213321 u64 start = page_offset(page);
3322− u64 page_end = start + PAGE_CACHE_SIZE - 1;
3322+ u64 page_end = start + PAGE_SIZE - 1;
33233323 u64 end;
33243324 u64 cur = start;
33253325 u64 extent_offset;
@@ -3434,7 +3434,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode, · 108 unmodified lines
34343434 if (ret) {
34353435 SetPageError(page);
34363436 } else {
3437− unsigned long max_nr = (i_size >> PAGE_CACHE_SHIFT) + 1;
3437+ unsigned long max_nr = (i_size >> PAGE_SHIFT) + 1;
34383438
34393439 set_range_writeback(tree, cur, cur + iosize - 1);
34403440 if (!PageWriteback(page)) {
@@ -3477,12 +3477,12 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, · 36 unmodified lines
34773477 struct inode *inode = page->mapping->host;
34783478 struct extent_page_data *epd = data;
34793479 u64 start = page_offset(page);
3480− u64 page_end = start + PAGE_CACHE_SIZE - 1;
3480+ u64 page_end = start + PAGE_SIZE - 1;
34813481 int ret;
34823482 int nr = 0;
34833483 size_t pg_offset = 0;
34843484 loff_t i_size = i_size_read(inode);
3485− unsigned long end_index = i_size >> PAGE_CACHE_SHIFT;
3485+ unsigned long end_index = i_size >> PAGE_SHIFT;
34863486 int write_flags;
34873487 unsigned long nr_written = 0;
34883488
@@ -3497,10 +3497,10 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, · 8 unmodified lines
34973497
34983498 ClearPageError(page);
34993499
3500− pg_offset = i_size & (PAGE_CACHE_SIZE - 1);
3500+ pg_offset = i_size & (PAGE_SIZE - 1);
35013501 if (page->index > end_index ||
35023502 (page->index == end_index && !pg_offset)) {
3503− page->mapping->a_ops->invalidatepage(page, 0, PAGE_CACHE_SIZE);
3503+ page->mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
35043504 unlock_page(page);
35053505 return 0;
35063506 }
@@ -3510,7 +3510,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, · 3 unmodified lines
35103510
35113511 userpage = kmap_atomic(page);
35123512 memset(userpage + pg_offset, 0,
3513− PAGE_CACHE_SIZE - pg_offset);
3513+ PAGE_SIZE - pg_offset);
35143514 kunmap_atomic(userpage);
35153515 flush_dcache_page(page);
35163516 }
@@ -3748,7 +3748,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb, · 231 unmodified lines
37483748 clear_page_dirty_for_io(p);
37493749 set_page_writeback(p);
37503750 ret = submit_extent_page(rw, tree, wbc, p, offset >> 9,
3751− PAGE_CACHE_SIZE, 0, bdev, &epd->bio,
3751+ PAGE_SIZE, 0, bdev, &epd->bio,
37523752 -1, end_bio_extent_buffer_writepage,
37533753 0, epd->bio_flags, bio_flags, false);
37543754 epd->bio_flags = bio_flags;
@@ -3760,7 +3760,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb, · 5 unmodified lines
37603760 ret = -EIO;
37613761 break;
37623762 }
3763− offset += PAGE_CACHE_SIZE;
3763+ offset += PAGE_SIZE;
37643764 update_nr_written(p, wbc, 1);
37653765 unlock_page(p);
37663766 }
@@ -3804,8 +3804,8 @@ int btree_write_cache_pages(struct address_space *mapping, · 37 unmodified lines
38043804 index = mapping->writeback_index; /* Start from prev offset */
38053805 end = -1;
38063806 } else {
3807− index = wbc->range_start >> PAGE_CACHE_SHIFT;
3808− end = wbc->range_end >> PAGE_CACHE_SHIFT;
3807+ index = wbc->range_start >> PAGE_SHIFT;
3808+ end = wbc->range_end >> PAGE_SHIFT;
38093809 scanned = 1;
38103810 }
38113811 if (wbc->sync_mode == WB_SYNC_ALL)
@@ -3948,8 +3948,8 @@ static int extent_write_cache_pages(struct extent_io_tree *tree, · 136 unmodified lines
39483948 index = mapping->writeback_index; /* Start from prev offset */
39493949 end = -1;
39503950 } else {
3951− index = wbc->range_start >> PAGE_CACHE_SHIFT;
3952− end = wbc->range_end >> PAGE_CACHE_SHIFT;
3951+ index = wbc->range_start >> PAGE_SHIFT;
3952+ end = wbc->range_end >> PAGE_SHIFT;
39533953 scanned = 1;
39543954 }
39553955 if (wbc->sync_mode == WB_SYNC_ALL)
@@ -4083,8 +4083,8 @@ int extent_write_locked_range(struct extent_io_tree *tree, struct inode *inode, · 127 unmodified lines
40834083 int ret = 0;
40844084 struct address_space *mapping = inode->i_mapping;
40854085 struct page *page;
4086− unsigned long nr_pages = (end - start + PAGE_CACHE_SIZE) >>
4087− PAGE_CACHE_SHIFT;
4086+ unsigned long nr_pages = (end - start + PAGE_SIZE) >>
4087+ PAGE_SHIFT;
40884088
40894089 struct extent_page_data epd = {
40904090 .bio = NULL,
@@ -4102,18 +4102,18 @@ int extent_write_locked_range(struct extent_io_tree *tree, struct inode *inode, · 11 unmodified lines
41024102 };
41034103
41044104 while (start <= end) {
4105− page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT);
4105+ page = find_get_page(mapping, start >> PAGE_SHIFT);
41064106 if (clear_page_dirty_for_io(page))
41074107 ret = __extent_writepage(page, &wbc_writepages, &epd);
41084108 else {
41094109 if (tree->ops && tree->ops->writepage_end_io_hook)
41104110 tree->ops->writepage_end_io_hook(page, start,
4111− start + PAGE_CACHE_SIZE - 1,
4111+ start + PAGE_SIZE - 1,
41124112 NULL, 1);
41134113 unlock_page(page);
41144114 }
4115− page_cache_release(page);
4116− start += PAGE_CACHE_SIZE;
4115+ put_page(page);
4116+ start += PAGE_SIZE;
41174117 }
41184118
41194119 flush_epd_write_bio(&epd);
@@ -4163,7 +4163,7 @@ int extent_readpages(struct extent_io_tree *tree, · 43 unmodified lines
41634163 list_del(&page->lru);
41644164 if (add_to_page_cache_lru(page, mapping,
41654165 page->index, GFP_NOFS)) {
4166− page_cache_release(page);
4166+ put_page(page);
41674167 continue;
41684168 }
41694169
@@ -4197,7 +4197,7 @@ int extent_invalidatepage(struct extent_io_tree *tree, · 27 unmodified lines
41974197 {
41984198 struct extent_state *cached_state = NULL;
41994199 u64 start = page_offset(page);
4200− u64 end = start + PAGE_CACHE_SIZE - 1;
4200+ u64 end = start + PAGE_SIZE - 1;
42014201 size_t blocksize = page->mapping->host->i_sb->s_blocksize;
42024202
42034203 start += ALIGN(offset, blocksize);
@@ -4223,7 +4223,7 @@ static int try_release_extent_state(struct extent_map_tree *map, · 19 unmodified lines
42234223 struct page *page, gfp_t mask)
42244224 {
42254225 u64 start = page_offset(page);
4226− u64 end = start + PAGE_CACHE_SIZE - 1;
4226+ u64 end = start + PAGE_SIZE - 1;
42274227 int ret = 1;
42284228
42294229 if (test_range_bit(tree, start, end,
@@ -4262,7 +4262,7 @@ int try_release_extent_mapping(struct extent_map_tree *map, · 32 unmodified lines
42624262 {
42634263 struct extent_map *em;
42644264 u64 start = page_offset(page);
4265− u64 end = start + PAGE_CACHE_SIZE - 1;
4265+ u64 end = start + PAGE_SIZE - 1;
42664266
42674267 if (gfpflags_allow_blocking(mask) &&
42684268 page->mapping->host->i_size > SZ_16M) {
@@ -4587,14 +4587,14 @@ static void btrfs_release_extent_buffer_page(struct extent_buffer *eb) · 318 unmodified lines
45874587 ClearPagePrivate(page);
45884588 set_page_private(page, 0);
45894589 /* One for the page private */
4590− page_cache_release(page);
4590+ put_page(page);
45914591 }
45924592
45934593 if (mapped)
45944594 spin_unlock(&page->mapping->private_lock);
45954595
45964596 /* One for when we alloced the page */
4597− page_cache_release(page);
4597+ put_page(page);
45984598 } while (index != 0);
45994599 }
46004600
@@ -4779,7 +4779,7 @@ struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info, · 178 unmodified lines
47794779
47804780 rcu_read_lock();
47814781 eb = radix_tree_lookup(&fs_info->buffer_radix,
4782− start >> PAGE_CACHE_SHIFT);
4782+ start >> PAGE_SHIFT);
47834783 if (eb && atomic_inc_not_zero(&eb->refs)) {
47844784 rcu_read_unlock();
47854785 /*
@@ -4829,7 +4829,7 @@ again: · 43 unmodified lines
48294829 goto free_eb;
48304830 spin_lock(&fs_info->buffer_lock);
48314831 ret = radix_tree_insert(&fs_info->buffer_radix,
4832− start >> PAGE_CACHE_SHIFT, eb);
4832+ start >> PAGE_SHIFT, eb);
48334833 spin_unlock(&fs_info->buffer_lock);
48344834 radix_tree_preload_end();
48354835 if (ret == -EEXIST) {
@@ -4862,7 +4862,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info, · 26 unmodified lines
48624862 unsigned long len = fs_info->tree_root->nodesize;
48634863 unsigned long num_pages = num_extent_pages(start, len);
48644864 unsigned long i;
4865− unsigned long index = start >> PAGE_CACHE_SHIFT;
4865+ unsigned long index = start >> PAGE_SHIFT;
48664866 struct extent_buffer *eb;
48674867 struct extent_buffer *exists = NULL;
48684868 struct page *p;
@@ -4896,7 +4896,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info, · 27 unmodified lines
48964896 if (atomic_inc_not_zero(&exists->refs)) {
48974897 spin_unlock(&mapping->private_lock);
48984898 unlock_page(p);
4899− page_cache_release(p);
4899+ put_page(p);
49004900 mark_extent_buffer_accessed(exists, p);
49014901 goto free_eb;
49024902 }
@@ -4908,7 +4908,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info, · 5 unmodified lines
49084908 */
49094909 ClearPagePrivate(p);
49104910 WARN_ON(PageDirty(p));
4911− page_cache_release(p);
4911+ put_page(p);
49124912 }
49134913 attach_extent_buffer_page(eb, p);
49144914 spin_unlock(&mapping->private_lock);
@@ -4931,7 +4931,7 @@ again: · 16 unmodified lines
49314931
49324932 spin_lock(&fs_info->buffer_lock);
49334933 ret = radix_tree_insert(&fs_info->buffer_radix,
4934− start >> PAGE_CACHE_SHIFT, eb);
4934+ start >> PAGE_SHIFT, eb);
49354935 spin_unlock(&fs_info->buffer_lock);
49364936 radix_tree_preload_end();
49374937 if (ret == -EEXIST) {
@@ -4994,7 +4994,7 @@ static int release_extent_buffer(struct extent_buffer *eb) · 56 unmodified lines
49944994
49954995 spin_lock(&fs_info->buffer_lock);
49964996 radix_tree_delete(&fs_info->buffer_radix,
4997− eb->start >> PAGE_CACHE_SHIFT);
4997+ eb->start >> PAGE_SHIFT);
49984998 spin_unlock(&fs_info->buffer_lock);
49994999 } else {
50005000 spin_unlock(&eb->refs_lock);
@@ -5168,8 +5168,8 @@ int read_extent_buffer_pages(struct extent_io_tree *tree, · 167 unmodified lines
51685168
51695169 if (start) {
51705170 WARN_ON(start < eb->start);
5171− start_i = (start >> PAGE_CACHE_SHIFT) -
5172− (eb->start >> PAGE_CACHE_SHIFT);
5171+ start_i = (start >> PAGE_SHIFT) -
5172+ (eb->start >> PAGE_SHIFT);
51735173 } else {
51745174 start_i = 0;
51755175 }
@@ -5252,18 +5252,18 @@ void read_extent_buffer(struct extent_buffer *eb, void *dstv, · 76 unmodified lines
52525252 struct page *page;
52535253 char *kaddr;
52545254 char *dst = (char *)dstv;
5255− size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
5256− unsigned long i = (start_offset + start) >> PAGE_CACHE_SHIFT;
5255+ size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
5256+ unsigned long i = (start_offset + start) >> PAGE_SHIFT;
52575257
52585258 WARN_ON(start > eb->len);
52595259 WARN_ON(start + len > eb->start + eb->len);
52605260
5261− offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
5261+ offset = (start_offset + start) & (PAGE_SIZE - 1);
52625262
52635263 while (len > 0) {
52645264 page = eb->pages[i];
52655265
5266− cur = min(len, (PAGE_CACHE_SIZE - offset));
5266+ cur = min(len, (PAGE_SIZE - offset));
52675267 kaddr = page_address(page);
52685268 memcpy(dst, kaddr + offset, cur);
52695269
@@ -5283,19 +5283,19 @@ int read_extent_buffer_to_user(struct extent_buffer *eb, void __user *dstv, · 13 unmodified lines
52835283 struct page *page;
52845284 char *kaddr;
52855285 char __user *dst = (char __user *)dstv;
5286− size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
5287− unsigned long i = (start_offset + start) >> PAGE_CACHE_SHIFT;
5286+ size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
5287+ unsigned long i = (start_offset + start) >> PAGE_SHIFT;
52885288 int ret = 0;
52895289
52905290 WARN_ON(start > eb->len);
52915291 WARN_ON(start + len > eb->start + eb->len);
52925292
5293− offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
5293+ offset = (start_offset + start) & (PAGE_SIZE - 1);
52945294
52955295 while (len > 0) {
52965296 page = eb->pages[i];
52975297
5298− cur = min(len, (PAGE_CACHE_SIZE - offset));
5298+ cur = min(len, (PAGE_SIZE - offset));
52995299 kaddr = page_address(page);
53005300 if (copy_to_user(dst, kaddr + offset, cur)) {
53015301 ret = -EFAULT;
@@ -5316,13 +5316,13 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, · 14 unmodified lines
53165316 unsigned long *map_start,
53175317 unsigned long *map_len)
53185318 {
5319− size_t offset = start & (PAGE_CACHE_SIZE - 1);
5319+ size_t offset = start & (PAGE_SIZE - 1);
53205320 char *kaddr;
53215321 struct page *p;
5322− size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
5323− unsigned long i = (start_offset + start) >> PAGE_CACHE_SHIFT;
5322+ size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
5323+ unsigned long i = (start_offset + start) >> PAGE_SHIFT;
53245324 unsigned long end_i = (start_offset + start + min_len - 1) >>
5325− PAGE_CACHE_SHIFT;
5325+ PAGE_SHIFT;
53265326
53275327 if (i != end_i)
53285328 return -EINVAL;
@@ -5332,7 +5332,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, · 3 unmodified lines
53325332 *map_start = 0;
53335333 } else {
53345334 offset = 0;
5335− *map_start = ((u64)i << PAGE_CACHE_SHIFT) - start_offset;
5335+ *map_start = ((u64)i << PAGE_SHIFT) - start_offset;
53365336 }
53375337
53385338 if (start + min_len > eb->len) {
@@ -5345,7 +5345,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, · 6 unmodified lines
53455345 p = eb->pages[i];
53465346 kaddr = page_address(p);
53475347 *map = kaddr + offset;
5348− *map_len = PAGE_CACHE_SIZE - offset;
5348+ *map_len = PAGE_SIZE - offset;
53495349 return 0;
53505350 }
53515351
@@ -5358,19 +5358,19 @@ int memcmp_extent_buffer(struct extent_buffer *eb, const void *ptrv, · 6 unmodified lines
53585358 struct page *page;
53595359 char *kaddr;
53605360 char *ptr = (char *)ptrv;
5361− size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
5362− unsigned long i = (start_offset + start) >> PAGE_CACHE_SHIFT;
5361+ size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
5362+ unsigned long i = (start_offset + start) >> PAGE_SHIFT;
53635363 int ret = 0;
53645364
53655365 WARN_ON(start > eb->len);
53665366 WARN_ON(start + len > eb->start + eb->len);
53675367
5368− offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
5368+ offset = (start_offset + start) & (PAGE_SIZE - 1);
53695369
53705370 while (len > 0) {
53715371 page = eb->pages[i];
53725372
5373− cur = min(len, (PAGE_CACHE_SIZE - offset));
5373+ cur = min(len, (PAGE_SIZE - offset));
53745374
53755375 kaddr = page_address(page);
53765376 ret = memcmp(ptr, kaddr + offset, cur);
@@ -5393,19 +5393,19 @@ void write_extent_buffer(struct extent_buffer *eb, const void *srcv, · 16 unmodified lines
53935393 struct page *page;
53945394 char *kaddr;
53955395 char *src = (char *)srcv;
5396− size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
5397− unsigned long i = (start_offset + start) >> PAGE_CACHE_SHIFT;
5396+ size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
5397+ unsigned long i = (start_offset + start) >> PAGE_SHIFT;
53985398
53995399 WARN_ON(start > eb->len);
54005400 WARN_ON(start + len > eb->start + eb->len);
54015401
5402− offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
5402+ offset = (start_offset + start) & (PAGE_SIZE - 1);
54035403
54045404 while (len > 0) {
54055405 page = eb->pages[i];
54065406 WARN_ON(!PageUptodate(page));
54075407
5408− cur = min(len, PAGE_CACHE_SIZE - offset);
5408+ cur = min(len, PAGE_SIZE - offset);
54095409 kaddr = page_address(page);
54105410 memcpy(kaddr + offset, src, cur);
54115411
@@ -5423,19 +5423,19 @@ void memset_extent_buffer(struct extent_buffer *eb, char c, · 11 unmodified lines
54235423 size_t offset;
54245424 struct page *page;
54255425 char *kaddr;
5426− size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
5427− unsigned long i = (start_offset + start) >> PAGE_CACHE_SHIFT;
5426+ size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
5427+ unsigned long i = (start_offset + start) >> PAGE_SHIFT;
54285428
54295429 WARN_ON(start > eb->len);
54305430 WARN_ON(start + len > eb->start + eb->len);
54315431
5432− offset = (start_offset + start) & (PAGE_CACHE_SIZE - 1);
5432+ offset = (start_offset + start) & (PAGE_SIZE - 1);
54335433
54345434 while (len > 0) {
54355435 page = eb->pages[i];
54365436 WARN_ON(!PageUptodate(page));
54375437
5438− cur = min(len, PAGE_CACHE_SIZE - offset);
5438+ cur = min(len, PAGE_SIZE - offset);
54395439 kaddr = page_address(page);
54405440 memset(kaddr + offset, c, cur);
54415441
@@ -5454,19 +5454,19 @@ void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src, · 12 unmodified lines
54545454 size_t offset;
54555455 struct page *page;
54565456 char *kaddr;
5457− size_t start_offset = dst->start & ((u64)PAGE_CACHE_SIZE - 1);
5458− unsigned long i = (start_offset + dst_offset) >> PAGE_CACHE_SHIFT;
5457+ size_t start_offset = dst->start & ((u64)PAGE_SIZE - 1);
5458+ unsigned long i = (start_offset + dst_offset) >> PAGE_SHIFT;
54595459
54605460 WARN_ON(src->len != dst_len);
54615461
54625462 offset = (start_offset + dst_offset) &
5463− (PAGE_CACHE_SIZE - 1);
5463+ (PAGE_SIZE - 1);
54645464
54655465 while (len > 0) {
54665466 page = dst->pages[i];
54675467 WARN_ON(!PageUptodate(page));
54685468
5469− cur = min(len, (unsigned long)(PAGE_CACHE_SIZE - offset));
5469+ cur = min(len, (unsigned long)(PAGE_SIZE - offset));
54705470
54715471 kaddr = page_address(page);
54725472 read_extent_buffer(src, kaddr + offset, src_offset, cur);
@@ -5508,7 +5508,7 @@ static inline void eb_bitmap_offset(struct extent_buffer *eb, · 35 unmodified lines
55085508 unsigned long *page_index,
55095509 size_t *page_offset)
55105510 {
5511− size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
5511+ size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);
55125512 size_t byte_offset = BIT_BYTE(nr);
55135513 size_t offset;
55145514
@@ -5519,8 +5519,8 @@ static inline void eb_bitmap_offset(struct extent_buffer *eb, · 4 unmodified lines
55195519 */
55205520 offset = start_offset + start + byte_offset;
55215521
5522− *page_index = offset >> PAGE_CACHE_SHIFT;
5523− *page_offset = offset & (PAGE_CACHE_SIZE - 1);
5522+ *page_index = offset >> PAGE_SHIFT;
5523+ *page_offset = offset & (PAGE_SIZE - 1);
55245524 }
55255525
55265526 /**
@@ -5572,7 +5572,7 @@ void extent_buffer_bitmap_set(struct extent_buffer *eb, unsigned long start, · 45 unmodified lines
55725572 len -= bits_to_set;
55735573 bits_to_set = BITS_PER_BYTE;
55745574 mask_to_set = ~0U;
5575− if (++offset >= PAGE_CACHE_SIZE && len > 0) {
5575+ if (++offset >= PAGE_SIZE && len > 0) {
55765576 offset = 0;
55775577 page = eb->pages[++i];
55785578 WARN_ON(!PageUptodate(page));
@@ -5614,7 +5614,7 @@ void extent_buffer_bitmap_clear(struct extent_buffer *eb, unsigned long start, · 35 unmodified lines
56145614 len -= bits_to_clear;
56155615 bits_to_clear = BITS_PER_BYTE;
56165616 mask_to_clear = ~0U;
5617− if (++offset >= PAGE_CACHE_SIZE && len > 0) {
5617+ if (++offset >= PAGE_SIZE && len > 0) {
56185618 offset = 0;
56195619 page = eb->pages[++i];
56205620 WARN_ON(!PageUptodate(page));
@@ -5661,7 +5661,7 @@ void memcpy_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, · 40 unmodified lines
56615661 size_t cur;
56625662 size_t dst_off_in_page;
56635663 size_t src_off_in_page;
5664− size_t start_offset = dst->start & ((u64)PAGE_CACHE_SIZE - 1);
5664+ size_t start_offset = dst->start & ((u64)PAGE_SIZE - 1);
56655665 unsigned long dst_i;
56665666 unsigned long src_i;
56675667
@@ -5680,17 +5680,17 @@ void memcpy_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, · 12 unmodified lines
56805680
56815681 while (len > 0) {
56825682 dst_off_in_page = (start_offset + dst_offset) &
5683− (PAGE_CACHE_SIZE - 1);
5683+ (PAGE_SIZE - 1);
56845684 src_off_in_page = (start_offset + src_offset) &
5685− (PAGE_CACHE_SIZE - 1);
5685+ (PAGE_SIZE - 1);
56865686
5687− dst_i = (start_offset + dst_offset) >> PAGE_CACHE_SHIFT;
5688− src_i = (start_offset + src_offset) >> PAGE_CACHE_SHIFT;
5687+ dst_i = (start_offset + dst_offset) >> PAGE_SHIFT;
5688+ src_i = (start_offset + src_offset) >> PAGE_SHIFT;
56895689
5690− cur = min(len, (unsigned long)(PAGE_CACHE_SIZE -
5690+ cur = min(len, (unsigned long)(PAGE_SIZE -
56915691 src_off_in_page));
56925692 cur = min_t(unsigned long, cur,
5693− (unsigned long)(PAGE_CACHE_SIZE - dst_off_in_page));
5693+ (unsigned long)(PAGE_SIZE - dst_off_in_page));
56945694
56955695 copy_pages(dst->pages[dst_i], dst->pages[src_i],
56965696 dst_off_in_page, src_off_in_page, cur);
@@ -5709,7 +5709,7 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, · 12 unmodified lines
57095709 size_t src_off_in_page;
57105710 unsigned long dst_end = dst_offset + len - 1;
57115711 unsigned long src_end = src_offset + len - 1;
5712− size_t start_offset = dst->start & ((u64)PAGE_CACHE_SIZE - 1);
5712+ size_t start_offset = dst->start & ((u64)PAGE_SIZE - 1);
57135713 unsigned long dst_i;
57145714 unsigned long src_i;
57155715
@@ -5728,13 +5728,13 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, · 12 unmodified lines
57285728 return;
57295729 }
57305730 while (len > 0) {
5731− dst_i = (start_offset + dst_end) >> PAGE_CACHE_SHIFT;
5732− src_i = (start_offset + src_end) >> PAGE_CACHE_SHIFT;
5731+ dst_i = (start_offset + dst_end) >> PAGE_SHIFT;
5732+ src_i = (start_offset + src_end) >> PAGE_SHIFT;
57335733
57345734 dst_off_in_page = (start_offset + dst_end) &
5735− (PAGE_CACHE_SIZE - 1);
5735+ (PAGE_SIZE - 1);
57365736 src_off_in_page = (start_offset + src_end) &
5737− (PAGE_CACHE_SIZE - 1);
5737+ (PAGE_SIZE - 1);
57385738
57395739 cur = min_t(unsigned long, len, src_off_in_page + 1);
57405740 cur = min(cur, dst_off_in_page + 1);
fs/btrfs/extent_io.h+3−3
@@ -120,7 +120,7 @@ struct extent_state { · 119 unmodified lines
120120 };
121121
122122 #define INLINE_EXTENT_BUFFER_PAGES 16
123−#define MAX_INLINE_EXTENT_BUFFER_SIZE (INLINE_EXTENT_BUFFER_PAGES * PAGE_CACHE_SIZE)
123+#define MAX_INLINE_EXTENT_BUFFER_SIZE (INLINE_EXTENT_BUFFER_PAGES * PAGE_SIZE)
124124 struct extent_buffer {
125125 u64 start;
126126 unsigned long len;
@@ -365,8 +365,8 @@ void wait_on_extent_buffer_writeback(struct extent_buffer *eb); · 238 unmodified lines
365365
366366 static inline unsigned long num_extent_pages(u64 start, u64 len)
367367 {
368− return ((start + len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) -
369− (start >> PAGE_CACHE_SHIFT);
368+ return ((start + len + PAGE_SIZE - 1) >> PAGE_SHIFT) -
369+ (start >> PAGE_SHIFT);
370370 }
371371
372372 static inline void extent_buffer_get(struct extent_buffer *eb)
fs/btrfs/file-item.c+2−2
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 size) - 1))
3333
3434 #define MAX_CSUM_ITEMS(r, size) (min_t(u32, __MAX_CSUM_ITEMS(r, size), \
35− PAGE_CACHE_SIZE))
35+ PAGE_SIZE))
3636
3737 #define MAX_ORDERED_SUM_BYTES(r) ((PAGE_SIZE - \
3838 sizeof(struct btrfs_ordered_sum)) / \
@@ -203,7 +203,7 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root, · 164 unmodified lines
203203 csum = (u8 *)dst;
204204 }
205205
206− if (bio->bi_iter.bi_size > PAGE_CACHE_SIZE * 8)
206+ if (bio->bi_iter.bi_size > PAGE_SIZE * 8)
207207 path->reada = READA_FORWARD;
208208
209209 WARN_ON(bio->bi_vcnt <= 0);
fs/btrfs/file.c+20−20
@@ -414,11 +414,11 @@ static noinline int btrfs_copy_from_user(loff_t pos, size_t write_bytes, · 413 unmodified lines
414414 size_t copied = 0;
415415 size_t total_copied = 0;
416416 int pg = 0;
417− int offset = pos & (PAGE_CACHE_SIZE - 1);
417+ int offset = pos & (PAGE_SIZE - 1);
418418
419419 while (write_bytes > 0) {
420420 size_t count = min_t(size_t,
421− PAGE_CACHE_SIZE - offset, write_bytes);
421+ PAGE_SIZE - offset, write_bytes);
422422 struct page *page = prepared_pages[pg];
423423 /*
424424 * Copy data from userspace to the current page
@@ -448,7 +448,7 @@ static noinline int btrfs_copy_from_user(loff_t pos, size_t write_bytes, · 23 unmodified lines
448448 if (unlikely(copied == 0))
449449 break;
450450
451− if (copied < PAGE_CACHE_SIZE - offset) {
451+ if (copied < PAGE_SIZE - offset) {
452452 offset += copied;
453453 } else {
454454 pg++;
@@ -473,7 +473,7 @@ static void btrfs_drop_pages(struct page **pages, size_t num_pages) · 18 unmodified lines
473473 */
474474 ClearPageChecked(pages[i]);
475475 unlock_page(pages[i]);
476− page_cache_release(pages[i]);
476+ put_page(pages[i]);
477477 }
478478 }
479479
@@ -1297,7 +1297,7 @@ static int prepare_uptodate_page(struct inode *inode, · 817 unmodified lines
12971297 {
12981298 int ret = 0;
12991299
1300− if (((pos & (PAGE_CACHE_SIZE - 1)) || force_uptodate) &&
1300+ if (((pos & (PAGE_SIZE - 1)) || force_uptodate) &&
13011301 !PageUptodate(page)) {
13021302 ret = btrfs_readpage(NULL, page);
13031303 if (ret)
@@ -1323,7 +1323,7 @@ static noinline int prepare_pages(struct inode *inode, struct page **pages, · 19 unmodified lines
13231323 size_t write_bytes, bool force_uptodate)
13241324 {
13251325 int i;
1326− unsigned long index = pos >> PAGE_CACHE_SHIFT;
1326+ unsigned long index = pos >> PAGE_SHIFT;
13271327 gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping);
13281328 int err = 0;
13291329 int faili;
@@ -1345,7 +1345,7 @@ again: · 15 unmodified lines
13451345 err = prepare_uptodate_page(inode, pages[i],
13461346 pos + write_bytes, false);
13471347 if (err) {
1348− page_cache_release(pages[i]);
1348+ put_page(pages[i]);
13491349 if (err == -EAGAIN) {
13501350 err = 0;
13511351 goto again;
@@ -1360,7 +1360,7 @@ again: · 8 unmodified lines
13601360 fail:
13611361 while (faili >= 0) {
13621362 unlock_page(pages[faili]);
1363− page_cache_release(pages[faili]);
1363+ put_page(pages[faili]);
13641364 faili--;
13651365 }
13661366 return err;
@@ -1408,7 +1408,7 @@ lock_and_cleanup_extent_if_need(struct inode *inode, struct page **pages, · 41 unmodified lines
14081408 cached_state, GFP_NOFS);
14091409 for (i = 0; i < num_pages; i++) {
14101410 unlock_page(pages[i]);
1411− page_cache_release(pages[i]);
1411+ put_page(pages[i]);
14121412 }
14131413 btrfs_start_ordered_extent(inode, ordered, 1);
14141414 btrfs_put_ordered_extent(ordered);
@@ -1497,8 +1497,8 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, · 82 unmodified lines
14971497 bool force_page_uptodate = false;
14981498 bool need_unlock;
14991499
1500− nrptrs = min(DIV_ROUND_UP(iov_iter_count(i), PAGE_CACHE_SIZE),
1501− PAGE_CACHE_SIZE / (sizeof(struct page *)));
1500+ nrptrs = min(DIV_ROUND_UP(iov_iter_count(i), PAGE_SIZE),
1501+ PAGE_SIZE / (sizeof(struct page *)));
15021502 nrptrs = min(nrptrs, current->nr_dirtied_pause - current->nr_dirtied);
15031503 nrptrs = max(nrptrs, 8);
15041504 pages = kmalloc_array(nrptrs, sizeof(struct page *), GFP_KERNEL);
@@ -1506,13 +1506,13 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, · 1 unmodified line
15061506 return -ENOMEM;
15071507
15081508 while (iov_iter_count(i) > 0) {
1509− size_t offset = pos & (PAGE_CACHE_SIZE - 1);
1509+ size_t offset = pos & (PAGE_SIZE - 1);
15101510 size_t sector_offset;
15111511 size_t write_bytes = min(iov_iter_count(i),
1512− nrptrs * (size_t)PAGE_CACHE_SIZE -
1512+ nrptrs * (size_t)PAGE_SIZE -
15131513 offset);
15141514 size_t num_pages = DIV_ROUND_UP(write_bytes + offset,
1515− PAGE_CACHE_SIZE);
1515+ PAGE_SIZE);
15161516 size_t reserve_bytes;
15171517 size_t dirty_pages;
15181518 size_t copied;
@@ -1547,7 +1547,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, · 28 unmodified lines
15471547 * write_bytes, so scale down.
15481548 */
15491549 num_pages = DIV_ROUND_UP(write_bytes + offset,
1550− PAGE_CACHE_SIZE);
1550+ PAGE_SIZE);
15511551 reserve_bytes = round_up(write_bytes + sector_offset,
15521552 root->sectorsize);
15531553 goto reserve_metadata;
@@ -1609,7 +1609,7 @@ again: · 55 unmodified lines
16091609 } else {
16101610 force_page_uptodate = false;
16111611 dirty_pages = DIV_ROUND_UP(copied + offset,
1612− PAGE_CACHE_SIZE);
1612+ PAGE_SIZE);
16131613 }
16141614
16151615 /*
@@ -1641,7 +1641,7 @@ again: · 25 unmodified lines
16411641 u64 __pos;
16421642
16431643 __pos = round_down(pos, root->sectorsize) +
1644− (dirty_pages << PAGE_CACHE_SHIFT);
1644+ (dirty_pages << PAGE_SHIFT);
16451645 btrfs_delalloc_release_space(inode, __pos,
16461646 release_bytes);
16471647 }
@@ -1682,7 +1682,7 @@ again: · 34 unmodified lines
16821682 cond_resched();
16831683
16841684 balance_dirty_pages_ratelimited(inode->i_mapping);
1685− if (dirty_pages < (root->nodesize >> PAGE_CACHE_SHIFT) + 1)
1685+ if (dirty_pages < (root->nodesize >> PAGE_SHIFT) + 1)
16861686 btrfs_btree_balance_dirty(root);
16871687
16881688 pos += copied;
@@ -1738,8 +1738,8 @@ static ssize_t __btrfs_direct_write(struct kiocb *iocb, · 49 unmodified lines
17381738 goto out;
17391739 written += written_buffered;
17401740 iocb->ki_pos = pos + written_buffered;
1741− invalidate_mapping_pages(file->f_mapping, pos >> PAGE_CACHE_SHIFT,
1742− endbyte >> PAGE_CACHE_SHIFT);
1741+ invalidate_mapping_pages(file->f_mapping, pos >> PAGE_SHIFT,
1742+ endbyte >> PAGE_SHIFT);
17431743 out:
17441744 return written ? written : err;
17451745 }
fs/btrfs/free-space-cache.c+15−15
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 #include "inode-map.h"
3030 #include "volumes.h"
3131
32−#define BITS_PER_BITMAP (PAGE_CACHE_SIZE * 8)
32+#define BITS_PER_BITMAP (PAGE_SIZE * 8)
3333 #define MAX_CACHE_BYTES_PER_GIG SZ_32K
3434
3535 struct btrfs_trim_range {
@@ -295,7 +295,7 @@ static int readahead_cache(struct inode *inode) · 259 unmodified lines
295295 return -ENOMEM;
296296
297297 file_ra_state_init(ra, inode->i_mapping);
298− last_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
298+ last_index = (i_size_read(inode) - 1) >> PAGE_SHIFT;
299299
300300 page_cache_sync_readahead(inode->i_mapping, ra, NULL, 0, last_index);
301301
@@ -310,14 +310,14 @@ static int io_ctl_init(struct btrfs_io_ctl *io_ctl, struct inode *inode, · 8 unmodified lines
310310 int num_pages;
311311 int check_crcs = 0;
312312
313− num_pages = DIV_ROUND_UP(i_size_read(inode), PAGE_CACHE_SIZE);
313+ num_pages = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE);
314314
315315 if (btrfs_ino(inode) != BTRFS_FREE_INO_OBJECTID)
316316 check_crcs = 1;
317317
318318 /* Make sure we can fit our crcs into the first page */
319319 if (write && check_crcs &&
320− (num_pages * sizeof(u32)) >= PAGE_CACHE_SIZE)
320+ (num_pages * sizeof(u32)) >= PAGE_SIZE)
321321 return -ENOSPC;
322322
323323 memset(io_ctl, 0, sizeof(struct btrfs_io_ctl));
@@ -354,9 +354,9 @@ static void io_ctl_map_page(struct btrfs_io_ctl *io_ctl, int clear) · 30 unmodified lines
354354 io_ctl->page = io_ctl->pages[io_ctl->index++];
355355 io_ctl->cur = page_address(io_ctl->page);
356356 io_ctl->orig = io_ctl->cur;
357− io_ctl->size = PAGE_CACHE_SIZE;
357+ io_ctl->size = PAGE_SIZE;
358358 if (clear)
359− memset(io_ctl->cur, 0, PAGE_CACHE_SIZE);
359+ memset(io_ctl->cur, 0, PAGE_SIZE);
360360 }
361361
362362 static void io_ctl_drop_pages(struct btrfs_io_ctl *io_ctl)
@@ -369,7 +369,7 @@ static void io_ctl_drop_pages(struct btrfs_io_ctl *io_ctl) · 6 unmodified lines
369369 if (io_ctl->pages[i]) {
370370 ClearPageChecked(io_ctl->pages[i]);
371371 unlock_page(io_ctl->pages[i]);
372− page_cache_release(io_ctl->pages[i]);
372+ put_page(io_ctl->pages[i]);
373373 }
374374 }
375375 }
@@ -475,7 +475,7 @@ static void io_ctl_set_crc(struct btrfs_io_ctl *io_ctl, int index) · 99 unmodified lines
475475 offset = sizeof(u32) * io_ctl->num_pages;
476476
477477 crc = btrfs_csum_data(io_ctl->orig + offset, crc,
478− PAGE_CACHE_SIZE - offset);
478+ PAGE_SIZE - offset);
479479 btrfs_csum_final(crc, (char *)&crc);
480480 io_ctl_unmap_page(io_ctl);
481481 tmp = page_address(io_ctl->pages[0]);
@@ -503,7 +503,7 @@ static int io_ctl_check_crc(struct btrfs_io_ctl *io_ctl, int index) · 21 unmodified lines
503503
504504 io_ctl_map_page(io_ctl, 0);
505505 crc = btrfs_csum_data(io_ctl->orig + offset, crc,
506− PAGE_CACHE_SIZE - offset);
506+ PAGE_SIZE - offset);
507507 btrfs_csum_final(crc, (char *)&crc);
508508 if (val != crc) {
509509 btrfs_err_rl(io_ctl->root->fs_info,
@@ -561,7 +561,7 @@ static int io_ctl_add_bitmap(struct btrfs_io_ctl *io_ctl, void *bitmap) · 51 unmodified lines
561561 io_ctl_map_page(io_ctl, 0);
562562 }
563563
564− memcpy(io_ctl->cur, bitmap, PAGE_CACHE_SIZE);
564+ memcpy(io_ctl->cur, bitmap, PAGE_SIZE);
565565 io_ctl_set_crc(io_ctl, io_ctl->index - 1);
566566 if (io_ctl->index < io_ctl->num_pages)
567567 io_ctl_map_page(io_ctl, 0);
@@ -621,7 +621,7 @@ static int io_ctl_read_bitmap(struct btrfs_io_ctl *io_ctl, · 53 unmodified lines
621621 if (ret)
622622 return ret;
623623
624− memcpy(entry->bitmap, io_ctl->cur, PAGE_CACHE_SIZE);
624+ memcpy(entry->bitmap, io_ctl->cur, PAGE_SIZE);
625625 io_ctl_unmap_page(io_ctl);
626626
627627 return 0;
@@ -775,7 +775,7 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode, · 147 unmodified lines
775775 } else {
776776 ASSERT(num_bitmaps);
777777 num_bitmaps--;
778− e->bitmap = kzalloc(PAGE_CACHE_SIZE, GFP_NOFS);
778+ e->bitmap = kzalloc(PAGE_SIZE, GFP_NOFS);
779779 if (!e->bitmap) {
780780 kmem_cache_free(
781781 btrfs_free_space_cachep, e);
@@ -1660,7 +1660,7 @@ static void recalculate_thresholds(struct btrfs_free_space_ctl *ctl) · 878 unmodified lines
16601660 * sure we don't go over our overall goal of MAX_CACHE_BYTES_PER_GIG as
16611661 * we add more bitmaps.
16621662 */
1663− bitmap_bytes = (ctl->total_bitmaps + 1) * PAGE_CACHE_SIZE;
1663+ bitmap_bytes = (ctl->total_bitmaps + 1) * PAGE_SIZE;
16641664
16651665 if (bitmap_bytes >= max_bytes) {
16661666 ctl->extents_thresh = 0;
@@ -2111,7 +2111,7 @@ new_bitmap: · 444 unmodified lines
21112111 }
21122112
21132113 /* allocate the bitmap */
2114− info->bitmap = kzalloc(PAGE_CACHE_SIZE, GFP_NOFS);
2114+ info->bitmap = kzalloc(PAGE_SIZE, GFP_NOFS);
21152115 spin_lock(&ctl->tree_lock);
21162116 if (!info->bitmap) {
21172117 ret = -ENOMEM;
@@ -3580,7 +3580,7 @@ again: · 1462 unmodified lines
35803580 }
35813581
35823582 if (!map) {
3583− map = kzalloc(PAGE_CACHE_SIZE, GFP_NOFS);
3583+ map = kzalloc(PAGE_SIZE, GFP_NOFS);
35843584 if (!map) {
35853585 kmem_cache_free(btrfs_free_space_cachep, info);
35863586 return -ENOMEM;
fs/btrfs/inode-map.c+5−5
@@ -283,7 +283,7 @@ void btrfs_unpin_free_ino(struct btrfs_root *root) · 282 unmodified lines
283283 }
284284
285285 #define INIT_THRESHOLD ((SZ_32K / 2) / sizeof(struct btrfs_free_space))
286−#define INODES_PER_BITMAP (PAGE_CACHE_SIZE * 8)
286+#define INODES_PER_BITMAP (PAGE_SIZE * 8)
287287
288288 /*
289289 * The goal is to keep the memory used by the free_ino tree won't
@@ -317,7 +317,7 @@ static void recalculate_thresholds(struct btrfs_free_space_ctl *ctl) · 27 unmodified lines
317317 }
318318
319319 ctl->extents_thresh = (max_bitmaps - ctl->total_bitmaps) *
320− PAGE_CACHE_SIZE / sizeof(*info);
320+ PAGE_SIZE / sizeof(*info);
321321 }
322322
323323 /*
@@ -481,12 +481,12 @@ again: · 157 unmodified lines
481481
482482 spin_lock(&ctl->tree_lock);
483483 prealloc = sizeof(struct btrfs_free_space) * ctl->free_extents;
484− prealloc = ALIGN(prealloc, PAGE_CACHE_SIZE);
485− prealloc += ctl->total_bitmaps * PAGE_CACHE_SIZE;
484+ prealloc = ALIGN(prealloc, PAGE_SIZE);
485+ prealloc += ctl->total_bitmaps * PAGE_SIZE;
486486 spin_unlock(&ctl->tree_lock);
487487
488488 /* Just to make sure we have enough space */
489− prealloc += 8 * PAGE_CACHE_SIZE;
489+ prealloc += 8 * PAGE_SIZE;
490490
491491 ret = btrfs_delalloc_reserve_space(inode, 0, prealloc);
492492 if (ret)
fs/btrfs/inode.c+52−52
@@ -194,7 +194,7 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, · 193 unmodified lines
194194 while (compressed_size > 0) {
195195 cpage = compressed_pages[i];
196196 cur_size = min_t(unsigned long, compressed_size,
197− PAGE_CACHE_SIZE);
197+ PAGE_SIZE);
198198
199199 kaddr = kmap_atomic(cpage);
200200 write_extent_buffer(leaf, kaddr, ptr, cur_size);
@@ -208,13 +208,13 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, · 7 unmodified lines
208208 compress_type);
209209 } else {
210210 page = find_get_page(inode->i_mapping,
211− start >> PAGE_CACHE_SHIFT);
211+ start >> PAGE_SHIFT);
212212 btrfs_set_file_extent_compression(leaf, ei, 0);
213213 kaddr = kmap_atomic(page);
214− offset = start & (PAGE_CACHE_SIZE - 1);
214+ offset = start & (PAGE_SIZE - 1);
215215 write_extent_buffer(leaf, kaddr + offset, ptr, size);
216216 kunmap_atomic(kaddr);
217− page_cache_release(page);
217+ put_page(page);
218218 }
219219 btrfs_mark_buffer_dirty(leaf);
220220 btrfs_release_path(path);
@@ -322,7 +322,7 @@ out: · 101 unmodified lines
322322 * And at reserve time, it's always aligned to page size, so
323323 * just free one page here.
324324 */
325− btrfs_qgroup_free_data(inode, 0, PAGE_CACHE_SIZE);
325+ btrfs_qgroup_free_data(inode, 0, PAGE_SIZE);
326326 btrfs_free_path(path);
327327 btrfs_end_transaction(trans, root);
328328 return ret;
@@ -435,8 +435,8 @@ static noinline void compress_file_range(struct inode *inode, · 106 unmodified lines
435435 actual_end = min_t(u64, isize, end + 1);
436436 again:
437437 will_compress = 0;
438− nr_pages = (end >> PAGE_CACHE_SHIFT) - (start >> PAGE_CACHE_SHIFT) + 1;
439− nr_pages = min_t(unsigned long, nr_pages, SZ_128K / PAGE_CACHE_SIZE);
438+ nr_pages = (end >> PAGE_SHIFT) - (start >> PAGE_SHIFT) + 1;
439+ nr_pages = min_t(unsigned long, nr_pages, SZ_128K / PAGE_SIZE);
440440
441441 /*
442442 * we don't want to send crud past the end of i_size through
@@ -514,7 +514,7 @@ again: · 71 unmodified lines
514514
515515 if (!ret) {
516516 unsigned long offset = total_compressed &
517− (PAGE_CACHE_SIZE - 1);
517+ (PAGE_SIZE - 1);
518518 struct page *page = pages[nr_pages_ret - 1];
519519 char *kaddr;
520520
@@ -524,7 +524,7 @@ again: · 3 unmodified lines
524524 if (offset) {
525525 kaddr = kmap_atomic(page);
526526 memset(kaddr + offset, 0,
527− PAGE_CACHE_SIZE - offset);
527+ PAGE_SIZE - offset);
528528 kunmap_atomic(kaddr);
529529 }
530530 will_compress = 1;
@@ -580,7 +580,7 @@ cont: · 49 unmodified lines
580580 * one last check to make sure the compression is really a
581581 * win, compare the page count read with the blocks on disk
582582 */
583− total_in = ALIGN(total_in, PAGE_CACHE_SIZE);
583+ total_in = ALIGN(total_in, PAGE_SIZE);
584584 if (total_compressed >= total_in) {
585585 will_compress = 0;
586586 } else {
@@ -594,7 +594,7 @@ cont: · 7 unmodified lines
594594 */
595595 for (i = 0; i < nr_pages_ret; i++) {
596596 WARN_ON(pages[i]->mapping);
597− page_cache_release(pages[i]);
597+ put_page(pages[i]);
598598 }
599599 kfree(pages);
600600 pages = NULL;
@@ -650,7 +650,7 @@ cleanup_and_bail_uncompressed: · 49 unmodified lines
650650 free_pages_out:
651651 for (i = 0; i < nr_pages_ret; i++) {
652652 WARN_ON(pages[i]->mapping);
653− page_cache_release(pages[i]);
653+ put_page(pages[i]);
654654 }
655655 kfree(pages);
656656 }
@@ -664,7 +664,7 @@ static void free_async_extent_pages(struct async_extent *async_extent) · 7 unmodified lines
664664
665665 for (i = 0; i < async_extent->nr_pages; i++) {
666666 WARN_ON(async_extent->pages[i]->mapping);
667− page_cache_release(async_extent->pages[i]);
667+ put_page(async_extent->pages[i]);
668668 }
669669 kfree(async_extent->pages);
670670 async_extent->nr_pages = 0;
@@ -966,7 +966,7 @@ static noinline int cow_file_range(struct inode *inode, · 295 unmodified lines
966966 PAGE_END_WRITEBACK);
967967
968968 *nr_written = *nr_written +
969− (end - start + PAGE_CACHE_SIZE) / PAGE_CACHE_SIZE;
969+ (end - start + PAGE_SIZE) / PAGE_SIZE;
970970 *page_started = 1;
971971 goto out;
972972 } else if (ret < 0) {
@@ -1106,8 +1106,8 @@ static noinline void async_cow_submit(struct btrfs_work *work) · 133 unmodified lines
11061106 async_cow = container_of(work, struct async_cow, work);
11071107
11081108 root = async_cow->root;
1109− nr_pages = (async_cow->end - async_cow->start + PAGE_CACHE_SIZE) >>
1110− PAGE_CACHE_SHIFT;
1109+ nr_pages = (async_cow->end - async_cow->start + PAGE_SIZE) >>
1110+ PAGE_SHIFT;
11111111
11121112 /*
11131113 * atomic_sub_return implies a barrier for waitqueue_active
@@ -1164,8 +1164,8 @@ static int cow_file_range_async(struct inode *inode, struct page *locked_page, · 50 unmodified lines
11641164 async_cow_start, async_cow_submit,
11651165 async_cow_free);
11661166
1167− nr_pages = (cur_end - start + PAGE_CACHE_SIZE) >>
1168− PAGE_CACHE_SHIFT;
1167+ nr_pages = (cur_end - start + PAGE_SIZE) >>
1168+ PAGE_SHIFT;
11691169 atomic_add(nr_pages, &root->fs_info->async_delalloc_pages);
11701170
11711171 btrfs_queue_work(root->fs_info->delalloc_workers,
@@ -1960,7 +1960,7 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans, · 788 unmodified lines
19601960 int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
19611961 struct extent_state **cached_state)
19621962 {
1963− WARN_ON((end & (PAGE_CACHE_SIZE - 1)) == 0);
1963+ WARN_ON((end & (PAGE_SIZE - 1)) == 0);
19641964 return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end,
19651965 cached_state, GFP_NOFS);
19661966 }
@@ -1993,7 +1993,7 @@ again: · 26 unmodified lines
19931993
19941994 inode = page->mapping->host;
19951995 page_start = page_offset(page);
1996− page_end = page_offset(page) + PAGE_CACHE_SIZE - 1;
1996+ page_end = page_offset(page) + PAGE_SIZE - 1;
19971997
19981998 lock_extent_bits(&BTRFS_I(inode)->io_tree, page_start, page_end,
19991999 &cached_state);
@@ -2003,7 +2003,7 @@ again: · 3 unmodified lines
20032003 goto out;
20042004
20052005 ordered = btrfs_lookup_ordered_range(inode, page_start,
2006− PAGE_CACHE_SIZE);
2006+ PAGE_SIZE);
20072007 if (ordered) {
20082008 unlock_extent_cached(&BTRFS_I(inode)->io_tree, page_start,
20092009 page_end, &cached_state, GFP_NOFS);
@@ -2014,7 +2014,7 @@ again: · 4 unmodified lines
20142014 }
20152015
20162016 ret = btrfs_delalloc_reserve_space(inode, page_start,
2017− PAGE_CACHE_SIZE);
2017+ PAGE_SIZE);
20182018 if (ret) {
20192019 mapping_set_error(page->mapping, ret);
20202020 end_extent_writepage(page, ret, page_start, page_end);
@@ -2030,7 +2030,7 @@ out: · 9 unmodified lines
20302030 &cached_state, GFP_NOFS);
20312031 out_page:
20322032 unlock_page(page);
2033− page_cache_release(page);
2033+ put_page(page);
20342034 kfree(fixup);
20352035 }
20362036
@@ -2063,7 +2063,7 @@ static int btrfs_writepage_start_hook(struct page *page, u64 start, u64 end) · 26 unmodified lines
20632063 return -EAGAIN;
20642064
20652065 SetPageChecked(page);
2066− page_cache_get(page);
2066+ get_page(page);
20672067 btrfs_init_work(&fixup->work, btrfs_fixup_helper,
20682068 btrfs_writepage_fixup_worker, NULL, NULL);
20692069 fixup->page = page;
@@ -4247,7 +4247,7 @@ static int truncate_inline_extent(struct inode *inode, · 2177 unmodified lines
42474247
42484248 if (btrfs_file_extent_compression(leaf, fi) != BTRFS_COMPRESS_NONE) {
42494249 loff_t offset = new_size;
4250− loff_t page_end = ALIGN(offset, PAGE_CACHE_SIZE);
4250+ loff_t page_end = ALIGN(offset, PAGE_SIZE);
42514251
42524252 /*
42534253 * Zero out the remaining of the last page of our inline extent,
@@ -4633,7 +4633,7 @@ int btrfs_truncate_block(struct inode *inode, loff_t from, loff_t len, · 379 unmodified lines
46334633 struct extent_state *cached_state = NULL;
46344634 char *kaddr;
46354635 u32 blocksize = root->sectorsize;
4636− pgoff_t index = from >> PAGE_CACHE_SHIFT;
4636+ pgoff_t index = from >> PAGE_SHIFT;
46374637 unsigned offset = from & (blocksize - 1);
46384638 struct page *page;
46394639 gfp_t mask = btrfs_alloc_write_mask(mapping);
@@ -4668,7 +4668,7 @@ again: · 28 unmodified lines
46684668 lock_page(page);
46694669 if (page->mapping != mapping) {
46704670 unlock_page(page);
4671− page_cache_release(page);
4671+ put_page(page);
46724672 goto again;
46734673 }
46744674 if (!PageUptodate(page)) {
@@ -4686,7 +4686,7 @@ again: · 11 unmodified lines
46864686 unlock_extent_cached(io_tree, block_start, block_end,
46874687 &cached_state, GFP_NOFS);
46884688 unlock_page(page);
4689− page_cache_release(page);
4689+ put_page(page);
46904690 btrfs_start_ordered_extent(inode, ordered, 1);
46914691 btrfs_put_ordered_extent(ordered);
46924692 goto again;
@@ -4728,7 +4728,7 @@ out_unlock: · 35 unmodified lines
47284728 btrfs_delalloc_release_space(inode, block_start,
47294729 blocksize);
47304730 unlock_page(page);
4731− page_cache_release(page);
4731+ put_page(page);
47324732 out:
47334733 return ret;
47344734 }
@@ -6717,7 +6717,7 @@ static noinline int uncompress_inline(struct btrfs_path *path, · 1982 unmodified lines
67176717
67186718 read_extent_buffer(leaf, tmp, ptr, inline_size);
67196719
6720− max_size = min_t(unsigned long, PAGE_CACHE_SIZE, max_size);
6720+ max_size = min_t(unsigned long, PAGE_SIZE, max_size);
67216721 ret = btrfs_decompress(compress_type, tmp, page,
67226722 extent_offset, inline_size, max_size);
67236723 kfree(tmp);
@@ -6879,8 +6879,8 @@ next: · 155 unmodified lines
68796879
68806880 size = btrfs_file_extent_inline_len(leaf, path->slots[0], item);
68816881 extent_offset = page_offset(page) + pg_offset - extent_start;
6882− copy_size = min_t(u64, PAGE_CACHE_SIZE - pg_offset,
6883− size - extent_offset);
6882+ copy_size = min_t(u64, PAGE_SIZE - pg_offset,
6883+ size - extent_offset);
68846884 em->start = extent_start + extent_offset;
68856885 em->len = ALIGN(copy_size, root->sectorsize);
68866886 em->orig_block_len = em->len;
@@ -6899,9 +6899,9 @@ next: · 12 unmodified lines
68996899 map = kmap(page);
69006900 read_extent_buffer(leaf, map + pg_offset, ptr,
69016901 copy_size);
6902− if (pg_offset + copy_size < PAGE_CACHE_SIZE) {
6902+ if (pg_offset + copy_size < PAGE_SIZE) {
69036903 memset(map + pg_offset + copy_size, 0,
6904− PAGE_CACHE_SIZE - pg_offset -
6904+ PAGE_SIZE - pg_offset -
69056905 copy_size);
69066906 }
69076907 kunmap(page);
@@ -7336,12 +7336,12 @@ bool btrfs_page_exists_in_range(struct inode *inode, loff_t start, loff_t end) · 428 unmodified lines
73367336 int start_idx;
73377337 int end_idx;
73387338
7339− start_idx = start >> PAGE_CACHE_SHIFT;
7339+ start_idx = start >> PAGE_SHIFT;
73407340
73417341 /*
73427342 * end is the last byte in the last page. end == start is legal
73437343 */
7344− end_idx = end >> PAGE_CACHE_SHIFT;
7344+ end_idx = end >> PAGE_SHIFT;
73457345
73467346 rcu_read_lock();
73477347
@@ -7382,7 +7382,7 @@ bool btrfs_page_exists_in_range(struct inode *inode, loff_t start, loff_t end) · 34 unmodified lines
73827382 * include/linux/pagemap.h for details.
73837383 */
73847384 if (unlikely(page != *pagep)) {
7385− page_cache_release(page);
7385+ put_page(page);
73867386 page = NULL;
73877387 }
73887388 }
@@ -7390,7 +7390,7 @@ bool btrfs_page_exists_in_range(struct inode *inode, loff_t start, loff_t end) · 1 unmodified line
73907390 if (page) {
73917391 if (page->index <= end_idx)
73927392 found = true;
7393− page_cache_release(page);
7393+ put_page(page);
73947394 }
73957395
73967396 rcu_read_unlock();
@@ -8719,7 +8719,7 @@ static int __btrfs_releasepage(struct page *page, gfp_t gfp_flags) · 1322 unmodified lines
87198719 if (ret == 1) {
87208720 ClearPagePrivate(page);
87218721 set_page_private(page, 0);
8722− page_cache_release(page);
8722+ put_page(page);
87238723 }
87248724 return ret;
87258725 }
@@ -8739,7 +8739,7 @@ static void btrfs_invalidatepage(struct page *page, unsigned int offset, · 13 unmodified lines
87398739 struct btrfs_ordered_extent *ordered;
87408740 struct extent_state *cached_state = NULL;
87418741 u64 page_start = page_offset(page);
8742− u64 page_end = page_start + PAGE_CACHE_SIZE - 1;
8742+ u64 page_end = page_start + PAGE_SIZE - 1;
87438743 u64 start;
87448744 u64 end;
87458745 int inode_evicting = inode->i_state & I_FREEING;
@@ -8822,7 +8822,7 @@ again: · 76 unmodified lines
88228822 * 2) Not written to disk
88238823 * This means the reserved space should be freed here.
88248824 */
8825− btrfs_qgroup_free_data(inode, page_start, PAGE_CACHE_SIZE);
8825+ btrfs_qgroup_free_data(inode, page_start, PAGE_SIZE);
88268826 if (!inode_evicting) {
88278827 clear_extent_bit(tree, page_start, page_end,
88288828 EXTENT_LOCKED | EXTENT_DIRTY |
@@ -8837,7 +8837,7 @@ again: · 8 unmodified lines
88378837 if (PagePrivate(page)) {
88388838 ClearPagePrivate(page);
88398839 set_page_private(page, 0);
8840− page_cache_release(page);
8840+ put_page(page);
88418841 }
88428842 }
88438843
@@ -8874,11 +8874,11 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 30 unmodified lines
88748874 u64 page_end;
88758875 u64 end;
88768876
8877− reserved_space = PAGE_CACHE_SIZE;
8877+ reserved_space = PAGE_SIZE;
88788878
88798879 sb_start_pagefault(inode->i_sb);
88808880 page_start = page_offset(page);
8881− page_end = page_start + PAGE_CACHE_SIZE - 1;
8881+ page_end = page_start + PAGE_SIZE - 1;
88828882 end = page_end;
88838883
88848884 /*
@@ -8934,15 +8934,15 @@ again: · 49 unmodified lines
89348934 goto again;
89358935 }
89368936
8937− if (page->index == ((size - 1) >> PAGE_CACHE_SHIFT)) {
8937+ if (page->index == ((size - 1) >> PAGE_SHIFT)) {
89388938 reserved_space = round_up(size - page_start, root->sectorsize);
8939− if (reserved_space < PAGE_CACHE_SIZE) {
8939+ if (reserved_space < PAGE_SIZE) {
89408940 end = page_start + reserved_space - 1;
89418941 spin_lock(&BTRFS_I(inode)->lock);
89428942 BTRFS_I(inode)->outstanding_extents++;
89438943 spin_unlock(&BTRFS_I(inode)->lock);
89448944 btrfs_delalloc_release_space(inode, page_start,
8945− PAGE_CACHE_SIZE - reserved_space);
8945+ PAGE_SIZE - reserved_space);
89468946 }
89478947 }
89488948
@@ -8969,14 +8969,14 @@ again: · 20 unmodified lines
89698969 ret = 0;
89708970
89718971 /* page is wholly or partially inside EOF */
8972− if (page_start + PAGE_CACHE_SIZE > size)
8973− zero_start = size & ~PAGE_CACHE_MASK;
8972+ if (page_start + PAGE_SIZE > size)
8973+ zero_start = size & ~PAGE_MASK;
89748974 else
8975− zero_start = PAGE_CACHE_SIZE;
8975+ zero_start = PAGE_SIZE;
89768976
8977− if (zero_start != PAGE_CACHE_SIZE) {
8977+ if (zero_start != PAGE_SIZE) {
89788978 kaddr = kmap(page);
8979− memset(kaddr + zero_start, 0, PAGE_CACHE_SIZE - zero_start);
8979+ memset(kaddr + zero_start, 0, PAGE_SIZE - zero_start);
89808980 flush_dcache_page(page);
89818981 kunmap(page);
89828982 }
fs/btrfs/ioctl.c+42−42
@@ -898,7 +898,7 @@ static int check_defrag_in_cache(struct inode *inode, u64 offset, u32 thresh) · 897 unmodified lines
898898 u64 end;
899899
900900 read_lock(&em_tree->lock);
901− em = lookup_extent_mapping(em_tree, offset, PAGE_CACHE_SIZE);
901+ em = lookup_extent_mapping(em_tree, offset, PAGE_SIZE);
902902 read_unlock(&em_tree->lock);
903903
904904 if (em) {
@@ -988,7 +988,7 @@ static struct extent_map *defrag_lookup_extent(struct inode *inode, u64 start) · 83 unmodified lines
988988 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
989989 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
990990 struct extent_map *em;
991− u64 len = PAGE_CACHE_SIZE;
991+ u64 len = PAGE_SIZE;
992992
993993 /*
994994 * hopefully we have this extent in the tree already, try without
@@ -1124,15 +1124,15 @@ static int cluster_pages_for_defrag(struct inode *inode, · 129 unmodified lines
11241124 struct extent_io_tree *tree;
11251125 gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping);
11261126
1127− file_end = (isize - 1) >> PAGE_CACHE_SHIFT;
1127+ file_end = (isize - 1) >> PAGE_SHIFT;
11281128 if (!isize || start_index > file_end)
11291129 return 0;
11301130
11311131 page_cnt = min_t(u64, (u64)num_pages, (u64)file_end - start_index + 1);
11321132
11331133 ret = btrfs_delalloc_reserve_space(inode,
1134− start_index << PAGE_CACHE_SHIFT,
1135− page_cnt << PAGE_CACHE_SHIFT);
1134+ start_index << PAGE_SHIFT,
1135+ page_cnt << PAGE_SHIFT);
11361136 if (ret)
11371137 return ret;
11381138 i_done = 0;
@@ -1148,7 +1148,7 @@ again: · 9 unmodified lines
11481148 break;
11491149
11501150 page_start = page_offset(page);
1151− page_end = page_start + PAGE_CACHE_SIZE - 1;
1151+ page_end = page_start + PAGE_SIZE - 1;
11521152 while (1) {
11531153 lock_extent_bits(tree, page_start, page_end,
11541154 &cached_state);
@@ -1169,7 +1169,7 @@ again: · 14 unmodified lines
11691169 */
11701170 if (page->mapping != inode->i_mapping) {
11711171 unlock_page(page);
1172− page_cache_release(page);
1172+ put_page(page);
11731173 goto again;
11741174 }
11751175 }
@@ -1179,7 +1179,7 @@ again: · 3 unmodified lines
11791179 lock_page(page);
11801180 if (!PageUptodate(page)) {
11811181 unlock_page(page);
1182− page_cache_release(page);
1182+ put_page(page);
11831183 ret = -EIO;
11841184 break;
11851185 }
@@ -1187,7 +1187,7 @@ again: · 1 unmodified line
11871187
11881188 if (page->mapping != inode->i_mapping) {
11891189 unlock_page(page);
1190− page_cache_release(page);
1190+ put_page(page);
11911191 goto again;
11921192 }
11931193
@@ -1208,7 +1208,7 @@ again: · 14 unmodified lines
12081208 wait_on_page_writeback(pages[i]);
12091209
12101210 page_start = page_offset(pages[0]);
1211− page_end = page_offset(pages[i_done - 1]) + PAGE_CACHE_SIZE;
1211+ page_end = page_offset(pages[i_done - 1]) + PAGE_SIZE;
12121212
12131213 lock_extent_bits(&BTRFS_I(inode)->io_tree,
12141214 page_start, page_end - 1, &cached_state);
@@ -1222,8 +1222,8 @@ again: · 7 unmodified lines
12221222 BTRFS_I(inode)->outstanding_extents++;
12231223 spin_unlock(&BTRFS_I(inode)->lock);
12241224 btrfs_delalloc_release_space(inode,
1225− start_index << PAGE_CACHE_SHIFT,
1226− (page_cnt - i_done) << PAGE_CACHE_SHIFT);
1225+ start_index << PAGE_SHIFT,
1226+ (page_cnt - i_done) << PAGE_SHIFT);
12271227 }
12281228
12291229
@@ -1240,17 +1240,17 @@ again: · 10 unmodified lines
12401240 set_page_extent_mapped(pages[i]);
12411241 set_page_dirty(pages[i]);
12421242 unlock_page(pages[i]);
1243− page_cache_release(pages[i]);
1243+ put_page(pages[i]);
12441244 }
12451245 return i_done;
12461246 out:
12471247 for (i = 0; i < i_done; i++) {
12481248 unlock_page(pages[i]);
1249− page_cache_release(pages[i]);
1249+ put_page(pages[i]);
12501250 }
12511251 btrfs_delalloc_release_space(inode,
1252− start_index << PAGE_CACHE_SHIFT,
1253− page_cnt << PAGE_CACHE_SHIFT);
1252+ start_index << PAGE_SHIFT,
1253+ page_cnt << PAGE_SHIFT);
12541254 return ret;
12551255
12561256 }
@@ -1273,7 +1273,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, · 16 unmodified lines
12731273 int defrag_count = 0;
12741274 int compress_type = BTRFS_COMPRESS_ZLIB;
12751275 u32 extent_thresh = range->extent_thresh;
1276− unsigned long max_cluster = SZ_256K >> PAGE_CACHE_SHIFT;
1276+ unsigned long max_cluster = SZ_256K >> PAGE_SHIFT;
12771277 unsigned long cluster = max_cluster;
12781278 u64 new_align = ~((u64)SZ_128K - 1);
12791279 struct page **pages = NULL;
@@ -1317,9 +1317,9 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, · 37 unmodified lines
13171317 /* find the last page to defrag */
13181318 if (range->start + range->len > range->start) {
13191319 last_index = min_t(u64, isize - 1,
1320− range->start + range->len - 1) >> PAGE_CACHE_SHIFT;
1320+ range->start + range->len - 1) >> PAGE_SHIFT;
13211321 } else {
1322− last_index = (isize - 1) >> PAGE_CACHE_SHIFT;
1322+ last_index = (isize - 1) >> PAGE_SHIFT;
13231323 }
13241324
13251325 if (newer_than) {
@@ -1331,11 +1331,11 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, · 5 unmodified lines
13311331 * we always align our defrag to help keep
13321332 * the extents in the file evenly spaced
13331333 */
1334− i = (newer_off & new_align) >> PAGE_CACHE_SHIFT;
1334+ i = (newer_off & new_align) >> PAGE_SHIFT;
13351335 } else
13361336 goto out_ra;
13371337 } else {
1338− i = range->start >> PAGE_CACHE_SHIFT;
1338+ i = range->start >> PAGE_SHIFT;
13391339 }
13401340 if (!max_to_defrag)
13411341 max_to_defrag = last_index - i + 1;
@@ -1348,7 +1348,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, · 6 unmodified lines
13481348 inode->i_mapping->writeback_index = i;
13491349
13501350 while (i <= last_index && defrag_count < max_to_defrag &&
1351− (i < DIV_ROUND_UP(i_size_read(inode), PAGE_CACHE_SIZE))) {
1351+ (i < DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE))) {
13521352 /*
13531353 * make sure we stop running if someone unmounts
13541354 * the FS
@@ -1362,7 +1362,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, · 7 unmodified lines
13621362 break;
13631363 }
13641364
1365− if (!should_defrag_range(inode, (u64)i << PAGE_CACHE_SHIFT,
1365+ if (!should_defrag_range(inode, (u64)i << PAGE_SHIFT,
13661366 extent_thresh, &last_len, &skip,
13671367 &defrag_end, range->flags &
13681368 BTRFS_DEFRAG_RANGE_COMPRESS)) {
@@ -1371,14 +1371,14 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, · 2 unmodified lines
13711371 * the should_defrag function tells us how much to skip
13721372 * bump our counter by the suggested amount
13731373 */
1374− next = DIV_ROUND_UP(skip, PAGE_CACHE_SIZE);
1374+ next = DIV_ROUND_UP(skip, PAGE_SIZE);
13751375 i = max(i + 1, next);
13761376 continue;
13771377 }
13781378
13791379 if (!newer_than) {
1380− cluster = (PAGE_CACHE_ALIGN(defrag_end) >>
1381− PAGE_CACHE_SHIFT) - i;
1380+ cluster = (PAGE_ALIGN(defrag_end) >>
1381+ PAGE_SHIFT) - i;
13821382 cluster = min(cluster, max_cluster);
13831383 } else {
13841384 cluster = max_cluster;
@@ -1412,20 +1412,20 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, · 27 unmodified lines
14121412 i += ret;
14131413
14141414 newer_off = max(newer_off + 1,
1415− (u64)i << PAGE_CACHE_SHIFT);
1415+ (u64)i << PAGE_SHIFT);
14161416
14171417 ret = find_new_extents(root, inode, newer_than,
14181418 &newer_off, SZ_64K);
14191419 if (!ret) {
14201420 range->start = newer_off;
1421− i = (newer_off & new_align) >> PAGE_CACHE_SHIFT;
1421+ i = (newer_off & new_align) >> PAGE_SHIFT;
14221422 } else {
14231423 break;
14241424 }
14251425 } else {
14261426 if (ret > 0) {
14271427 i += ret;
1428− last_len += ret << PAGE_CACHE_SHIFT;
1428+ last_len += ret << PAGE_SHIFT;
14291429 } else {
14301430 i++;
14311431 last_len = 0;
@@ -1722,7 +1722,7 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file, · 290 unmodified lines
17221722 if (vol_args->flags & BTRFS_SUBVOL_RDONLY)
17231723 readonly = true;
17241724 if (vol_args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) {
1725− if (vol_args->size > PAGE_CACHE_SIZE) {
1725+ if (vol_args->size > PAGE_SIZE) {
17261726 ret = -EINVAL;
17271727 goto free_args;
17281728 }
@@ -2806,12 +2806,12 @@ static struct page *extent_same_get_page(struct inode *inode, pgoff_t index) · 1077 unmodified lines
28062806 lock_page(page);
28072807 if (!PageUptodate(page)) {
28082808 unlock_page(page);
2809− page_cache_release(page);
2809+ put_page(page);
28102810 return ERR_PTR(-EIO);
28112811 }
28122812 if (page->mapping != inode->i_mapping) {
28132813 unlock_page(page);
2814− page_cache_release(page);
2814+ put_page(page);
28152815 return ERR_PTR(-EAGAIN);
28162816 }
28172817 }
@@ -2823,7 +2823,7 @@ static int gather_extent_pages(struct inode *inode, struct page **pages, · 5 unmodified lines
28232823 int num_pages, u64 off)
28242824 {
28252825 int i;
2826− pgoff_t index = off >> PAGE_CACHE_SHIFT;
2826+ pgoff_t index = off >> PAGE_SHIFT;
28272827
28282828 for (i = 0; i < num_pages; i++) {
28292829 again:
@@ -2932,12 +2932,12 @@ static void btrfs_cmp_data_free(struct cmp_pages *cmp) · 102 unmodified lines
29322932 pg = cmp->src_pages[i];
29332933 if (pg) {
29342934 unlock_page(pg);
2935− page_cache_release(pg);
2935+ put_page(pg);
29362936 }
29372937 pg = cmp->dst_pages[i];
29382938 if (pg) {
29392939 unlock_page(pg);
2940− page_cache_release(pg);
2940+ put_page(pg);
29412941 }
29422942 }
29432943 kfree(cmp->src_pages);
@@ -2949,7 +2949,7 @@ static int btrfs_cmp_data_prepare(struct inode *src, u64 loff, · 5 unmodified lines
29492949 u64 len, struct cmp_pages *cmp)
29502950 {
29512951 int ret;
2952− int num_pages = PAGE_CACHE_ALIGN(len) >> PAGE_CACHE_SHIFT;
2952+ int num_pages = PAGE_ALIGN(len) >> PAGE_SHIFT;
29532953 struct page **src_pgarr, **dst_pgarr;
29542954
29552955 /*
@@ -2987,12 +2987,12 @@ static int btrfs_cmp_data(struct inode *src, u64 loff, struct inode *dst, · 31 unmodified lines
29872987 int ret = 0;
29882988 int i;
29892989 struct page *src_page, *dst_page;
2990− unsigned int cmp_len = PAGE_CACHE_SIZE;
2990+ unsigned int cmp_len = PAGE_SIZE;
29912991 void *addr, *dst_addr;
29922992
29932993 i = 0;
29942994 while (len) {
2995− if (len < PAGE_CACHE_SIZE)
2995+ if (len < PAGE_SIZE)
29962996 cmp_len = len;
29972997
29982998 BUG_ON(i >= cmp->num_pages);
@@ -3191,7 +3191,7 @@ ssize_t btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen, · 192 unmodified lines
31913191 if (olen > BTRFS_MAX_DEDUPE_LEN)
31923192 olen = BTRFS_MAX_DEDUPE_LEN;
31933193
3194− if (WARN_ON_ONCE(bs < PAGE_CACHE_SIZE)) {
3194+ if (WARN_ON_ONCE(bs < PAGE_SIZE)) {
31953195 /*
31963196 * Btrfs does not support blocksize < page_size. As a
31973197 * result, btrfs_cmp_data() won't correctly handle
@@ -3891,8 +3891,8 @@ static noinline int btrfs_clone_files(struct file *file, struct file *file_src, · 693 unmodified lines
38913891 * data immediately and not the previous data.
38923892 */
38933893 truncate_inode_pages_range(&inode->i_data,
3894− round_down(destoff, PAGE_CACHE_SIZE),
3895− round_up(destoff + len, PAGE_CACHE_SIZE) - 1);
3894+ round_down(destoff, PAGE_SIZE),
3895+ round_up(destoff + len, PAGE_SIZE) - 1);
38963896 out_unlock:
38973897 if (!same_inode)
38983898 btrfs_double_inode_unlock(src, inode);
@@ -4124,7 +4124,7 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) · 225 unmodified lines
41244124 /* we generally have at most 6 or so space infos, one for each raid
41254125 * level. So, a whole page should be more than enough for everyone
41264126 */
4127− if (alloc_size > PAGE_CACHE_SIZE)
4127+ if (alloc_size > PAGE_SIZE)
41284128 return -ENOMEM;
41294129
41304130 space_args.total_spaces = 0;
fs/btrfs/lzo.c+16−16
@@ -55,8 +55,8 @@ static struct list_head *lzo_alloc_workspace(void) · 54 unmodified lines
5555 return ERR_PTR(-ENOMEM);
5656
5757 workspace->mem = vmalloc(LZO1X_MEM_COMPRESS);
58− workspace->buf = vmalloc(lzo1x_worst_compress(PAGE_CACHE_SIZE));
59− workspace->cbuf = vmalloc(lzo1x_worst_compress(PAGE_CACHE_SIZE));
58+ workspace->buf = vmalloc(lzo1x_worst_compress(PAGE_SIZE));
59+ workspace->cbuf = vmalloc(lzo1x_worst_compress(PAGE_SIZE));
6060 if (!workspace->mem || !workspace->buf || !workspace->cbuf)
6161 goto fail;
6262
@@ -116,7 +116,7 @@ static int lzo_compress_pages(struct list_head *ws, · 53 unmodified lines
116116 *total_out = 0;
117117 *total_in = 0;
118118
119− in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT);
119+ in_page = find_get_page(mapping, start >> PAGE_SHIFT);
120120 data_in = kmap(in_page);
121121
122122 /*
@@ -133,10 +133,10 @@ static int lzo_compress_pages(struct list_head *ws, · 10 unmodified lines
133133 tot_out = LZO_LEN;
134134 pages[0] = out_page;
135135 nr_pages = 1;
136− pg_bytes_left = PAGE_CACHE_SIZE - LZO_LEN;
136+ pg_bytes_left = PAGE_SIZE - LZO_LEN;
137137
138138 /* compress at most one page of data each time */
139− in_len = min(len, PAGE_CACHE_SIZE);
139+ in_len = min(len, PAGE_SIZE);
140140 while (tot_in < len) {
141141 ret = lzo1x_1_compress(data_in, in_len, workspace->cbuf,
142142 &out_len, workspace->mem);
@@ -201,7 +201,7 @@ static int lzo_compress_pages(struct list_head *ws, · 58 unmodified lines
201201 cpage_out = kmap(out_page);
202202 pages[nr_pages++] = out_page;
203203
204− pg_bytes_left = PAGE_CACHE_SIZE;
204+ pg_bytes_left = PAGE_SIZE;
205205 out_offset = 0;
206206 }
207207 }
@@ -221,12 +221,12 @@ static int lzo_compress_pages(struct list_head *ws, · 13 unmodified lines
221221
222222 bytes_left = len - tot_in;
223223 kunmap(in_page);
224− page_cache_release(in_page);
224+ put_page(in_page);
225225
226− start += PAGE_CACHE_SIZE;
227− in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT);
226+ start += PAGE_SIZE;
227+ in_page = find_get_page(mapping, start >> PAGE_SHIFT);
228228 data_in = kmap(in_page);
229− in_len = min(bytes_left, PAGE_CACHE_SIZE);
229+ in_len = min(bytes_left, PAGE_SIZE);
230230 }
231231
232232 if (tot_out > tot_in)
@@ -248,7 +248,7 @@ out: · 15 unmodified lines
248248
249249 if (in_page) {
250250 kunmap(in_page);
251− page_cache_release(in_page);
251+ put_page(in_page);
252252 }
253253
254254 return ret;
@@ -266,7 +266,7 @@ static int lzo_decompress_biovec(struct list_head *ws, · 11 unmodified lines
266266 char *data_in;
267267 unsigned long page_in_index = 0;
268268 unsigned long page_out_index = 0;
269− unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_CACHE_SIZE);
269+ unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_SIZE);
270270 unsigned long buf_start;
271271 unsigned long buf_offset = 0;
272272 unsigned long bytes;
@@ -289,7 +289,7 @@ static int lzo_decompress_biovec(struct list_head *ws, · 16 unmodified lines
289289 tot_in = LZO_LEN;
290290 in_offset = LZO_LEN;
291291 tot_len = min_t(size_t, srclen, tot_len);
292− in_page_bytes_left = PAGE_CACHE_SIZE - LZO_LEN;
292+ in_page_bytes_left = PAGE_SIZE - LZO_LEN;
293293
294294 tot_out = 0;
295295 pg_offset = 0;
@@ -345,12 +345,12 @@ cont: · 49 unmodified lines
345345
346346 data_in = kmap(pages_in[++page_in_index]);
347347
348− in_page_bytes_left = PAGE_CACHE_SIZE;
348+ in_page_bytes_left = PAGE_SIZE;
349349 in_offset = 0;
350350 }
351351 }
352352
353− out_len = lzo1x_worst_compress(PAGE_CACHE_SIZE);
353+ out_len = lzo1x_worst_compress(PAGE_SIZE);
354354 ret = lzo1x_decompress_safe(buf, in_len, workspace->buf,
355355 &out_len);
356356 if (need_unmap)
@@ -399,7 +399,7 @@ static int lzo_decompress(struct list_head *ws, unsigned char *data_in, · 42 unmodified lines
399399 in_len = read_compress_length(data_in);
400400 data_in += LZO_LEN;
401401
402− out_len = PAGE_CACHE_SIZE;
402+ out_len = PAGE_SIZE;
403403 ret = lzo1x_decompress_safe(data_in, in_len, workspace->buf, &out_len);
404404 if (ret != LZO_E_OK) {
405405 printk(KERN_WARNING "BTRFS: decompress failed!\n");
fs/btrfs/raid56.c+14−14
@@ -270,7 +270,7 @@ static void cache_rbio_pages(struct btrfs_raid_bio *rbio) · 269 unmodified lines
270270 s = kmap(rbio->bio_pages[i]);
271271 d = kmap(rbio->stripe_pages[i]);
272272
273− memcpy(d, s, PAGE_CACHE_SIZE);
273+ memcpy(d, s, PAGE_SIZE);
274274
275275 kunmap(rbio->bio_pages[i]);
276276 kunmap(rbio->stripe_pages[i]);
@@ -962,7 +962,7 @@ static struct page *page_in_rbio(struct btrfs_raid_bio *rbio, · 685 unmodified lines
962962 */
963963 static unsigned long rbio_nr_pages(unsigned long stripe_len, int nr_stripes)
964964 {
965− return DIV_ROUND_UP(stripe_len, PAGE_CACHE_SIZE) * nr_stripes;
965+ return DIV_ROUND_UP(stripe_len, PAGE_SIZE) * nr_stripes;
966966 }
967967
968968 /*
@@ -1078,7 +1078,7 @@ static int rbio_add_io_page(struct btrfs_raid_bio *rbio, · 109 unmodified lines
10781078 u64 disk_start;
10791079
10801080 stripe = &rbio->bbio->stripes[stripe_nr];
1081− disk_start = stripe->physical + (page_index << PAGE_CACHE_SHIFT);
1081+ disk_start = stripe->physical + (page_index << PAGE_SHIFT);
10821082
10831083 /* if the device is missing, just fail this stripe */
10841084 if (!stripe->dev->bdev)
@@ -1096,8 +1096,8 @@ static int rbio_add_io_page(struct btrfs_raid_bio *rbio, · 11 unmodified lines
10961096 if (last_end == disk_start && stripe->dev->bdev &&
10971097 !last->bi_error &&
10981098 last->bi_bdev == stripe->dev->bdev) {
1099− ret = bio_add_page(last, page, PAGE_CACHE_SIZE, 0);
1100− if (ret == PAGE_CACHE_SIZE)
1099+ ret = bio_add_page(last, page, PAGE_SIZE, 0);
1100+ if (ret == PAGE_SIZE)
11011101 return 0;
11021102 }
11031103 }
@@ -1111,7 +1111,7 @@ static int rbio_add_io_page(struct btrfs_raid_bio *rbio, · 7 unmodified lines
11111111 bio->bi_bdev = stripe->dev->bdev;
11121112 bio->bi_iter.bi_sector = disk_start >> 9;
11131113
1114− bio_add_page(bio, page, PAGE_CACHE_SIZE, 0);
1114+ bio_add_page(bio, page, PAGE_SIZE, 0);
11151115 bio_list_add(bio_list, bio);
11161116 return 0;
11171117 }
@@ -1154,7 +1154,7 @@ static void index_rbio_pages(struct btrfs_raid_bio *rbio) · 36 unmodified lines
11541154 bio_list_for_each(bio, &rbio->bio_list) {
11551155 start = (u64)bio->bi_iter.bi_sector << 9;
11561156 stripe_offset = start - rbio->bbio->raid_map[0];
1157− page_index = stripe_offset >> PAGE_CACHE_SHIFT;
1157+ page_index = stripe_offset >> PAGE_SHIFT;
11581158
11591159 for (i = 0; i < bio->bi_vcnt; i++) {
11601160 p = bio->bi_io_vec[i].bv_page;
@@ -1253,7 +1253,7 @@ static noinline void finish_rmw(struct btrfs_raid_bio *rbio) · 92 unmodified lines
12531253 } else {
12541254 /* raid5 */
12551255 memcpy(pointers[nr_data], pointers[0], PAGE_SIZE);
1256− run_xor(pointers + 1, nr_data - 1, PAGE_CACHE_SIZE);
1256+ run_xor(pointers + 1, nr_data - 1, PAGE_SIZE);
12571257 }
12581258
12591259
@@ -1914,7 +1914,7 @@ pstripe: · 654 unmodified lines
19141914 /* Copy parity block into failed block to start with */
19151915 memcpy(pointers[faila],
19161916 pointers[rbio->nr_data],
1917− PAGE_CACHE_SIZE);
1917+ PAGE_SIZE);
19181918
19191919 /* rearrange the pointer array */
19201920 p = pointers[faila];
@@ -1923,7 +1923,7 @@ pstripe: · 2 unmodified lines
19231923 pointers[rbio->nr_data - 1] = p;
19241924
19251925 /* xor in the rest */
1926− run_xor(pointers, rbio->nr_data - 1, PAGE_CACHE_SIZE);
1926+ run_xor(pointers, rbio->nr_data - 1, PAGE_SIZE);
19271927 }
19281928 /* if we're doing this rebuild as part of an rmw, go through
19291929 * and set all of our private rbio pages in the
@@ -2250,7 +2250,7 @@ void raid56_add_scrub_pages(struct btrfs_raid_bio *rbio, struct page *page, · 320 unmodified lines
22502250 ASSERT(logical + PAGE_SIZE <= rbio->bbio->raid_map[0] +
22512251 rbio->stripe_len * rbio->nr_data);
22522252 stripe_offset = (int)(logical - rbio->bbio->raid_map[0]);
2253− index = stripe_offset >> PAGE_CACHE_SHIFT;
2253+ index = stripe_offset >> PAGE_SHIFT;
22542254 rbio->bio_pages[index] = page;
22552255 }
22562256
@@ -2365,14 +2365,14 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio, · 108 unmodified lines
23652365 } else {
23662366 /* raid5 */
23672367 memcpy(pointers[nr_data], pointers[0], PAGE_SIZE);
2368− run_xor(pointers + 1, nr_data - 1, PAGE_CACHE_SIZE);
2368+ run_xor(pointers + 1, nr_data - 1, PAGE_SIZE);
23692369 }
23702370
23712371 /* Check scrubbing pairty and repair it */
23722372 p = rbio_stripe_page(rbio, rbio->scrubp, pagenr);
23732373 parity = kmap(p);
2374− if (memcmp(parity, pointers[rbio->scrubp], PAGE_CACHE_SIZE))
2375− memcpy(parity, pointers[rbio->scrubp], PAGE_CACHE_SIZE);
2374+ if (memcmp(parity, pointers[rbio->scrubp], PAGE_SIZE))
2375+ memcpy(parity, pointers[rbio->scrubp], PAGE_SIZE);
23762376 else
23772377 /* Parity is right, needn't writeback */
23782378 bitmap_clear(rbio->dbitmap, pagenr, 1);
fs/btrfs/reada.c+15−15
@@ -226,7 +226,7 @@ int btree_readahead_hook(struct btrfs_fs_info *fs_info, · 225 unmodified lines
226226 /* find extent */
227227 spin_lock(&fs_info->reada_lock);
228228 re = radix_tree_lookup(&fs_info->reada_tree,
229− start >> PAGE_CACHE_SHIFT);
229+ start >> PAGE_SHIFT);
230230 if (re)
231231 re->refcnt++;
232232 spin_unlock(&fs_info->reada_lock);
@@ -257,7 +257,7 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info, · 24 unmodified lines
257257 zone = NULL;
258258 spin_lock(&fs_info->reada_lock);
259259 ret = radix_tree_gang_lookup(&dev->reada_zones, (void **)&zone,
260− logical >> PAGE_CACHE_SHIFT, 1);
260+ logical >> PAGE_SHIFT, 1);
261261 if (ret == 1 && logical >= zone->start && logical <= zone->end) {
262262 kref_get(&zone->refcnt);
263263 spin_unlock(&fs_info->reada_lock);
@@ -294,13 +294,13 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info, · 30 unmodified lines
294294
295295 spin_lock(&fs_info->reada_lock);
296296 ret = radix_tree_insert(&dev->reada_zones,
297− (unsigned long)(zone->end >> PAGE_CACHE_SHIFT),
297+ (unsigned long)(zone->end >> PAGE_SHIFT),
298298 zone);
299299
300300 if (ret == -EEXIST) {
301301 kfree(zone);
302302 ret = radix_tree_gang_lookup(&dev->reada_zones, (void **)&zone,
303− logical >> PAGE_CACHE_SHIFT, 1);
303+ logical >> PAGE_SHIFT, 1);
304304 if (ret == 1 && logical >= zone->start && logical <= zone->end)
305305 kref_get(&zone->refcnt);
306306 else
@@ -326,7 +326,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, · 19 unmodified lines
326326 u64 length;
327327 int real_stripes;
328328 int nzones = 0;
329− unsigned long index = logical >> PAGE_CACHE_SHIFT;
329+ unsigned long index = logical >> PAGE_SHIFT;
330330 int dev_replace_is_ongoing;
331331 int have_zone = 0;
332332
@@ -495,7 +495,7 @@ static void reada_extent_put(struct btrfs_fs_info *fs_info, · 162 unmodified lines
495495 struct reada_extent *re)
496496 {
497497 int i;
498− unsigned long index = re->logical >> PAGE_CACHE_SHIFT;
498+ unsigned long index = re->logical >> PAGE_SHIFT;
499499
500500 spin_lock(&fs_info->reada_lock);
501501 if (--re->refcnt) {
@@ -538,7 +538,7 @@ static void reada_zone_release(struct kref *kref) · 36 unmodified lines
538538 struct reada_zone *zone = container_of(kref, struct reada_zone, refcnt);
539539
540540 radix_tree_delete(&zone->device->reada_zones,
541− zone->end >> PAGE_CACHE_SHIFT);
541+ zone->end >> PAGE_SHIFT);
542542
543543 kfree(zone);
544544 }
@@ -587,7 +587,7 @@ static int reada_add_block(struct reada_control *rc, u64 logical, · 42 unmodified lines
587587 static void reada_peer_zones_set_lock(struct reada_zone *zone, int lock)
588588 {
589589 int i;
590− unsigned long index = zone->end >> PAGE_CACHE_SHIFT;
590+ unsigned long index = zone->end >> PAGE_SHIFT;
591591
592592 for (i = 0; i < zone->ndevs; ++i) {
593593 struct reada_zone *peer;
@@ -622,7 +622,7 @@ static int reada_pick_zone(struct btrfs_device *dev) · 28 unmodified lines
622622 (void **)&zone, index, 1);
623623 if (ret == 0)
624624 break;
625− index = (zone->end >> PAGE_CACHE_SHIFT) + 1;
625+ index = (zone->end >> PAGE_SHIFT) + 1;
626626 if (zone->locked) {
627627 if (zone->elems > top_locked_elems) {
628628 top_locked_elems = zone->elems;
@@ -673,7 +673,7 @@ static int reada_start_machine_dev(struct btrfs_fs_info *fs_info, · 44 unmodified lines
673673 * plugging to speed things up
674674 */
675675 ret = radix_tree_gang_lookup(&dev->reada_extents, (void **)&re,
676− dev->reada_next >> PAGE_CACHE_SHIFT, 1);
676+ dev->reada_next >> PAGE_SHIFT, 1);
677677 if (ret == 0 || re->logical > dev->reada_curr_zone->end) {
678678 ret = reada_pick_zone(dev);
679679 if (!ret) {
@@ -682,7 +682,7 @@ static int reada_start_machine_dev(struct btrfs_fs_info *fs_info, · 2 unmodified lines
682682 }
683683 re = NULL;
684684 ret = radix_tree_gang_lookup(&dev->reada_extents, (void **)&re,
685− dev->reada_next >> PAGE_CACHE_SHIFT, 1);
685+ dev->reada_next >> PAGE_SHIFT, 1);
686686 }
687687 if (ret == 0) {
688688 spin_unlock(&fs_info->reada_lock);
@@ -838,7 +838,7 @@ static void dump_devs(struct btrfs_fs_info *fs_info, int all) · 149 unmodified lines
838838 printk(KERN_CONT " curr off %llu",
839839 device->reada_next - zone->start);
840840 printk(KERN_CONT "\n");
841− index = (zone->end >> PAGE_CACHE_SHIFT) + 1;
841+ index = (zone->end >> PAGE_SHIFT) + 1;
842842 }
843843 cnt = 0;
844844 index = 0;
@@ -864,7 +864,7 @@ static void dump_devs(struct btrfs_fs_info *fs_info, int all) · 19 unmodified lines
864864 }
865865 }
866866 printk(KERN_CONT "\n");
867− index = (re->logical >> PAGE_CACHE_SHIFT) + 1;
867+ index = (re->logical >> PAGE_SHIFT) + 1;
868868 if (++cnt > 15)
869869 break;
870870 }
@@ -880,7 +880,7 @@ static void dump_devs(struct btrfs_fs_info *fs_info, int all) · 9 unmodified lines
880880 if (ret == 0)
881881 break;
882882 if (!re->scheduled) {
883− index = (re->logical >> PAGE_CACHE_SHIFT) + 1;
883+ index = (re->logical >> PAGE_SHIFT) + 1;
884884 continue;
885885 }
886886 printk(KERN_DEBUG
@@ -897,7 +897,7 @@ static void dump_devs(struct btrfs_fs_info *fs_info, int all) · 10 unmodified lines
897897 }
898898 }
899899 printk(KERN_CONT "\n");
900− index = (re->logical >> PAGE_CACHE_SHIFT) + 1;
900+ index = (re->logical >> PAGE_SHIFT) + 1;
901901 }
902902 spin_unlock(&fs_info->reada_lock);
903903 }
fs/btrfs/relocation.c+8−8
@@ -3129,10 +3129,10 @@ static int relocate_file_extent_cluster(struct inode *inode, · 3128 unmodified lines
31293129 if (ret)
31303130 goto out;
31313131
3132− index = (cluster->start - offset) >> PAGE_CACHE_SHIFT;
3133− last_index = (cluster->end - offset) >> PAGE_CACHE_SHIFT;
3132+ index = (cluster->start - offset) >> PAGE_SHIFT;
3133+ last_index = (cluster->end - offset) >> PAGE_SHIFT;
31343134 while (index <= last_index) {
3135− ret = btrfs_delalloc_reserve_metadata(inode, PAGE_CACHE_SIZE);
3135+ ret = btrfs_delalloc_reserve_metadata(inode, PAGE_SIZE);
31363136 if (ret)
31373137 goto out;
31383138
@@ -3145,7 +3145,7 @@ static int relocate_file_extent_cluster(struct inode *inode, · 6 unmodified lines
31453145 mask);
31463146 if (!page) {
31473147 btrfs_delalloc_release_metadata(inode,
3148− PAGE_CACHE_SIZE);
3148+ PAGE_SIZE);
31493149 ret = -ENOMEM;
31503150 goto out;
31513151 }
@@ -3162,16 +3162,16 @@ static int relocate_file_extent_cluster(struct inode *inode, · 10 unmodified lines
31623162 lock_page(page);
31633163 if (!PageUptodate(page)) {
31643164 unlock_page(page);
3165− page_cache_release(page);
3165+ put_page(page);
31663166 btrfs_delalloc_release_metadata(inode,
3167− PAGE_CACHE_SIZE);
3167+ PAGE_SIZE);
31683168 ret = -EIO;
31693169 goto out;
31703170 }
31713171 }
31723172
31733173 page_start = page_offset(page);
3174− page_end = page_start + PAGE_CACHE_SIZE - 1;
3174+ page_end = page_start + PAGE_SIZE - 1;
31753175
31763176 lock_extent(&BTRFS_I(inode)->io_tree, page_start, page_end);
31773177
@@ -3191,7 +3191,7 @@ static int relocate_file_extent_cluster(struct inode *inode, · 13 unmodified lines
31913191 unlock_extent(&BTRFS_I(inode)->io_tree,
31923192 page_start, page_end);
31933193 unlock_page(page);
3194− page_cache_release(page);
3194+ put_page(page);
31953195
31963196 index++;
31973197 balance_dirty_pages_ratelimited(inode->i_mapping);
fs/btrfs/scrub.c+12−12
@@ -703,7 +703,7 @@ static int scrub_fixup_readpage(u64 inum, u64 offset, u64 root, void *fixup_ctx) · 702 unmodified lines
703703 if (IS_ERR(inode))
704704 return PTR_ERR(inode);
705705
706− index = offset >> PAGE_CACHE_SHIFT;
706+ index = offset >> PAGE_SHIFT;
707707
708708 page = find_or_create_page(inode->i_mapping, index, GFP_NOFS);
709709 if (!page) {
@@ -1636,7 +1636,7 @@ static int scrub_write_page_to_dev_replace(struct scrub_block *sblock, · 926 unmodified lines
16361636 if (spage->io_error) {
16371637 void *mapped_buffer = kmap_atomic(spage->page);
16381638
1639− memset(mapped_buffer, 0, PAGE_CACHE_SIZE);
1639+ memset(mapped_buffer, 0, PAGE_SIZE);
16401640 flush_dcache_page(spage->page);
16411641 kunmap_atomic(mapped_buffer);
16421642 }
@@ -4294,8 +4294,8 @@ static int copy_nocow_pages_for_inode(u64 inum, u64 offset, u64 root, · 2651 unmodified lines
42944294 goto out;
42954295 }
42964296
4297− while (len >= PAGE_CACHE_SIZE) {
4298− index = offset >> PAGE_CACHE_SHIFT;
4297+ while (len >= PAGE_SIZE) {
4298+ index = offset >> PAGE_SHIFT;
42994299 again:
43004300 page = find_or_create_page(inode->i_mapping, index, GFP_NOFS);
43014301 if (!page) {
@@ -4326,7 +4326,7 @@ again: · 24 unmodified lines
43264326 */
43274327 if (page->mapping != inode->i_mapping) {
43284328 unlock_page(page);
4329− page_cache_release(page);
4329+ put_page(page);
43304330 goto again;
43314331 }
43324332 if (!PageUptodate(page)) {
@@ -4348,15 +4348,15 @@ again: · 15 unmodified lines
43484348 ret = err;
43494349 next_page:
43504350 unlock_page(page);
4351− page_cache_release(page);
4351+ put_page(page);
43524352
43534353 if (ret)
43544354 break;
43554355
4356− offset += PAGE_CACHE_SIZE;
4357− physical_for_dev_replace += PAGE_CACHE_SIZE;
4358− nocow_ctx_logical += PAGE_CACHE_SIZE;
4359− len -= PAGE_CACHE_SIZE;
4356+ offset += PAGE_SIZE;
4357+ physical_for_dev_replace += PAGE_SIZE;
4358+ nocow_ctx_logical += PAGE_SIZE;
4359+ len -= PAGE_SIZE;
43604360 }
43614361 ret = COPY_COMPLETE;
43624362 out:
@@ -4390,8 +4390,8 @@ static int write_page_nocow(struct scrub_ctx *sctx, · 27 unmodified lines
43904390 bio->bi_iter.bi_size = 0;
43914391 bio->bi_iter.bi_sector = physical_for_dev_replace >> 9;
43924392 bio->bi_bdev = dev->bdev;
4393− ret = bio_add_page(bio, page, PAGE_CACHE_SIZE, 0);
4394− if (ret != PAGE_CACHE_SIZE) {
4393+ ret = bio_add_page(bio, page, PAGE_SIZE, 0);
4394+ if (ret != PAGE_SIZE) {
43954395 leave_with_eio:
43964396 bio_put(bio);
43974397 btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_WRITE_ERRS);
fs/btrfs/send.c+8−8
@@ -4449,9 +4449,9 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len) · 4448 unmodified lines
44494449 struct page *page;
44504450 char *addr;
44514451 struct btrfs_key key;
4452− pgoff_t index = offset >> PAGE_CACHE_SHIFT;
4452+ pgoff_t index = offset >> PAGE_SHIFT;
44534453 pgoff_t last_index;
4454− unsigned pg_offset = offset & ~PAGE_CACHE_MASK;
4454+ unsigned pg_offset = offset & ~PAGE_MASK;
44554455 ssize_t ret = 0;
44564456
44574457 key.objectid = sctx->cur_ino;
@@ -4471,7 +4471,7 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len) · 13 unmodified lines
44714471 if (len == 0)
44724472 goto out;
44734473
4474− last_index = (offset + len - 1) >> PAGE_CACHE_SHIFT;
4474+ last_index = (offset + len - 1) >> PAGE_SHIFT;
44754475
44764476 /* initial readahead */
44774477 memset(&sctx->ra, 0, sizeof(struct file_ra_state));
@@ -4481,7 +4481,7 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len) · 3 unmodified lines
44814481
44824482 while (index <= last_index) {
44834483 unsigned cur_len = min_t(unsigned, len,
4484− PAGE_CACHE_SIZE - pg_offset);
4484+ PAGE_SIZE - pg_offset);
44854485 page = find_or_create_page(inode->i_mapping, index, GFP_KERNEL);
44864486 if (!page) {
44874487 ret = -ENOMEM;
@@ -4493,7 +4493,7 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len) · 5 unmodified lines
44934493 lock_page(page);
44944494 if (!PageUptodate(page)) {
44954495 unlock_page(page);
4496− page_cache_release(page);
4496+ put_page(page);
44974497 ret = -EIO;
44984498 break;
44994499 }
@@ -4503,7 +4503,7 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len) · 3 unmodified lines
45034503 memcpy(sctx->read_buf + ret, addr + pg_offset, cur_len);
45044504 kunmap(page);
45054505 unlock_page(page);
4506− page_cache_release(page);
4506+ put_page(page);
45074507 index++;
45084508 pg_offset = 0;
45094509 len -= cur_len;
@@ -4804,7 +4804,7 @@ static int clone_range(struct send_ctx *sctx, · 294 unmodified lines
48044804 type = btrfs_file_extent_type(leaf, ei);
48054805 if (type == BTRFS_FILE_EXTENT_INLINE) {
48064806 ext_len = btrfs_file_extent_inline_len(leaf, slot, ei);
4807− ext_len = PAGE_CACHE_ALIGN(ext_len);
4807+ ext_len = PAGE_ALIGN(ext_len);
48084808 } else {
48094809 ext_len = btrfs_file_extent_num_bytes(leaf, ei);
48104810 }
@@ -4886,7 +4886,7 @@ static int send_write_or_clone(struct send_ctx *sctx, · 75 unmodified lines
48864886 * but there may be items after this page. Make
48874887 * sure to send the whole thing
48884888 */
4889− len = PAGE_CACHE_ALIGN(len);
4889+ len = PAGE_ALIGN(len);
48904890 } else {
48914891 len = btrfs_file_extent_num_bytes(path->nodes[0], ei);
48924892 }
fs/btrfs/tests/extent-io-tests.c+21−21
@@ -32,8 +32,8 @@ static noinline int process_page_range(struct inode *inode, u64 start, u64 end, · 31 unmodified lines
3232 {
3333 int ret;
3434 struct page *pages[16];
35− unsigned long index = start >> PAGE_CACHE_SHIFT;
36− unsigned long end_index = end >> PAGE_CACHE_SHIFT;
35+ unsigned long index = start >> PAGE_SHIFT;
36+ unsigned long end_index = end >> PAGE_SHIFT;
3737 unsigned long nr_pages = end_index - index + 1;
3838 int i;
3939 int count = 0;
@@ -49,9 +49,9 @@ static noinline int process_page_range(struct inode *inode, u64 start, u64 end, · 9 unmodified lines
4949 count++;
5050 if (flags & PROCESS_UNLOCK && PageLocked(pages[i]))
5151 unlock_page(pages[i]);
52− page_cache_release(pages[i]);
52+ put_page(pages[i]);
5353 if (flags & PROCESS_RELEASE)
54− page_cache_release(pages[i]);
54+ put_page(pages[i]);
5555 }
5656 nr_pages -= ret;
5757 index += ret;
@@ -93,7 +93,7 @@ static int test_find_delalloc(void) · 35 unmodified lines
9393 * everything to make sure our pages don't get evicted and screw up our
9494 * test.
9595 */
96− for (index = 0; index < (total_dirty >> PAGE_CACHE_SHIFT); index++) {
96+ for (index = 0; index < (total_dirty >> PAGE_SHIFT); index++) {
9797 page = find_or_create_page(inode->i_mapping, index, GFP_KERNEL);
9898 if (!page) {
9999 test_msg("Failed to allocate test page\n");
@@ -104,7 +104,7 @@ static int test_find_delalloc(void) · 4 unmodified lines
104104 if (index) {
105105 unlock_page(page);
106106 } else {
107− page_cache_get(page);
107+ get_page(page);
108108 locked_page = page;
109109 }
110110 }
@@ -129,7 +129,7 @@ static int test_find_delalloc(void) · 18 unmodified lines
129129 }
130130 unlock_extent(&tmp, start, end);
131131 unlock_page(locked_page);
132− page_cache_release(locked_page);
132+ put_page(locked_page);
133133
134134 /*
135135 * Test this scenario
@@ -139,7 +139,7 @@ static int test_find_delalloc(void) · 3 unmodified lines
139139 */
140140 test_start = SZ_64M;
141141 locked_page = find_lock_page(inode->i_mapping,
142− test_start >> PAGE_CACHE_SHIFT);
142+ test_start >> PAGE_SHIFT);
143143 if (!locked_page) {
144144 test_msg("Couldn't find the locked page\n");
145145 goto out_bits;
@@ -165,7 +165,7 @@ static int test_find_delalloc(void) · 19 unmodified lines
165165 }
166166 unlock_extent(&tmp, start, end);
167167 /* locked_page was unlocked above */
168− page_cache_release(locked_page);
168+ put_page(locked_page);
169169
170170 /*
171171 * Test this scenario
@@ -174,7 +174,7 @@ static int test_find_delalloc(void) · 2 unmodified lines
174174 */
175175 test_start = max_bytes + 4096;
176176 locked_page = find_lock_page(inode->i_mapping, test_start >>
177− PAGE_CACHE_SHIFT);
177+ PAGE_SHIFT);
178178 if (!locked_page) {
179179 test_msg("Could'nt find the locked page\n");
180180 goto out_bits;
@@ -225,13 +225,13 @@ static int test_find_delalloc(void) · 44 unmodified lines
225225 * range we want to find.
226226 */
227227 page = find_get_page(inode->i_mapping,
228− (max_bytes + SZ_1M) >> PAGE_CACHE_SHIFT);
228+ (max_bytes + SZ_1M) >> PAGE_SHIFT);
229229 if (!page) {
230230 test_msg("Couldn't find our page\n");
231231 goto out_bits;
232232 }
233233 ClearPageDirty(page);
234− page_cache_release(page);
234+ put_page(page);
235235
236236 /* We unlocked it in the previous test */
237237 lock_page(locked_page);
@@ -249,9 +249,9 @@ static int test_find_delalloc(void) · 11 unmodified lines
249249 test_msg("Didn't find our range\n");
250250 goto out_bits;
251251 }
252− if (start != test_start && end != test_start + PAGE_CACHE_SIZE - 1) {
252+ if (start != test_start && end != test_start + PAGE_SIZE - 1) {
253253 test_msg("Expected start %Lu end %Lu, got start %Lu end %Lu\n",
254− test_start, test_start + PAGE_CACHE_SIZE - 1, start,
254+ test_start, test_start + PAGE_SIZE - 1, start,
255255 end);
256256 goto out_bits;
257257 }
@@ -265,7 +265,7 @@ out_bits: · 7 unmodified lines
265265 clear_extent_bits(&tmp, 0, total_dirty - 1, (unsigned)-1, GFP_KERNEL);
266266 out:
267267 if (locked_page)
268− page_cache_release(locked_page);
268+ put_page(locked_page);
269269 process_page_range(inode, 0, total_dirty - 1,
270270 PROCESS_UNLOCK | PROCESS_RELEASE);
271271 iput(inode);
@@ -298,9 +298,9 @@ static int __test_eb_bitmaps(unsigned long *bitmap, struct extent_buffer *eb, · 26 unmodified lines
298298 return -EINVAL;
299299 }
300300
301− bitmap_set(bitmap, (PAGE_CACHE_SIZE - sizeof(long) / 2) * BITS_PER_BYTE,
301+ bitmap_set(bitmap, (PAGE_SIZE - sizeof(long) / 2) * BITS_PER_BYTE,
302302 sizeof(long) * BITS_PER_BYTE);
303− extent_buffer_bitmap_set(eb, PAGE_CACHE_SIZE - sizeof(long) / 2, 0,
303+ extent_buffer_bitmap_set(eb, PAGE_SIZE - sizeof(long) / 2, 0,
304304 sizeof(long) * BITS_PER_BYTE);
305305 if (memcmp_extent_buffer(eb, bitmap, 0, len) != 0) {
306306 test_msg("Setting straddling pages failed\n");
@@ -309,10 +309,10 @@ static int __test_eb_bitmaps(unsigned long *bitmap, struct extent_buffer *eb, · 2 unmodified lines
309309
310310 bitmap_set(bitmap, 0, len * BITS_PER_BYTE);
311311 bitmap_clear(bitmap,
312− (PAGE_CACHE_SIZE - sizeof(long) / 2) * BITS_PER_BYTE,
312+ (PAGE_SIZE - sizeof(long) / 2) * BITS_PER_BYTE,
313313 sizeof(long) * BITS_PER_BYTE);
314314 extent_buffer_bitmap_set(eb, 0, 0, len * BITS_PER_BYTE);
315− extent_buffer_bitmap_clear(eb, PAGE_CACHE_SIZE - sizeof(long) / 2, 0,
315+ extent_buffer_bitmap_clear(eb, PAGE_SIZE - sizeof(long) / 2, 0,
316316 sizeof(long) * BITS_PER_BYTE);
317317 if (memcmp_extent_buffer(eb, bitmap, 0, len) != 0) {
318318 test_msg("Clearing straddling pages failed\n");
@@ -353,7 +353,7 @@ static int __test_eb_bitmaps(unsigned long *bitmap, struct extent_buffer *eb, · 34 unmodified lines
353353
354354 static int test_eb_bitmaps(void)
355355 {
356− unsigned long len = PAGE_CACHE_SIZE * 4;
356+ unsigned long len = PAGE_SIZE * 4;
357357 unsigned long *bitmap;
358358 struct extent_buffer *eb;
359359 int ret;
@@ -379,7 +379,7 @@ static int test_eb_bitmaps(void) · 19 unmodified lines
379379
380380 /* Do it over again with an extent buffer which isn't page-aligned. */
381381 free_extent_buffer(eb);
382− eb = __alloc_dummy_extent_buffer(NULL, PAGE_CACHE_SIZE / 2, len);
382+ eb = __alloc_dummy_extent_buffer(NULL, PAGE_SIZE / 2, len);
383383 if (!eb) {
384384 test_msg("Couldn't allocate test extent buffer\n");
385385 kfree(bitmap);
fs/btrfs/tests/free-space-tests.c+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222 #include "../disk-io.h"
2323 #include "../free-space-cache.h"
2424
25−#define BITS_PER_BITMAP (PAGE_CACHE_SIZE * 8)
25+#define BITS_PER_BITMAP (PAGE_SIZE * 8)
2626
2727 /*
2828 * This test just does basic sanity checking, making sure we can add an exten
fs/btrfs/volumes.c+7−7
@@ -1025,16 +1025,16 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, · 1024 unmodified lines
10251025 }
10261026
10271027 /* make sure our super fits in the device */
1028− if (bytenr + PAGE_CACHE_SIZE >= i_size_read(bdev->bd_inode))
1028+ if (bytenr + PAGE_SIZE >= i_size_read(bdev->bd_inode))
10291029 goto error_bdev_put;
10301030
10311031 /* make sure our super fits in the page */
1032− if (sizeof(*disk_super) > PAGE_CACHE_SIZE)
1032+ if (sizeof(*disk_super) > PAGE_SIZE)
10331033 goto error_bdev_put;
10341034
10351035 /* make sure our super doesn't straddle pages on disk */
1036− index = bytenr >> PAGE_CACHE_SHIFT;
1037− if ((bytenr + sizeof(*disk_super) - 1) >> PAGE_CACHE_SHIFT != index)
1036+ index = bytenr >> PAGE_SHIFT;
1037+ if ((bytenr + sizeof(*disk_super) - 1) >> PAGE_SHIFT != index)
10381038 goto error_bdev_put;
10391039
10401040 /* pull in the page with our super */
@@ -1047,7 +1047,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, · 6 unmodified lines
10471047 p = kmap(page);
10481048
10491049 /* align our pointer to the offset of the super block */
1050− disk_super = p + (bytenr & ~PAGE_CACHE_MASK);
1050+ disk_super = p + (bytenr & ~PAGE_MASK);
10511051
10521052 if (btrfs_super_bytenr(disk_super) != bytenr ||
10531053 btrfs_super_magic(disk_super) != BTRFS_MAGIC)
@@ -1075,7 +1075,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, · 21 unmodified lines
10751075
10761076 error_unmap:
10771077 kunmap(page);
1078− page_cache_release(page);
1078+ put_page(page);
10791079
10801080 error_bdev_put:
10811081 blkdev_put(bdev, flags);
@@ -6527,7 +6527,7 @@ int btrfs_read_sys_array(struct btrfs_root *root) · 5445 unmodified lines
65276527 * but sb spans only this function. Add an explicit SetPageUptodate call
65286528 * to silence the warning eg. on PowerPC 64.
65296529 */
6530− if (PAGE_CACHE_SIZE > BTRFS_SUPER_INFO_SIZE)
6530+ if (PAGE_SIZE > BTRFS_SUPER_INFO_SIZE)
65316531 SetPageUptodate(sb->pages[0]);
65326532
65336533 write_extent_buffer(sb, super_copy, 0, BTRFS_SUPER_INFO_SIZE);
fs/btrfs/zlib.c+19−19
@@ -59,7 +59,7 @@ static struct list_head *zlib_alloc_workspace(void) · 58 unmodified lines
5959 workspacesize = max(zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL),
6060 zlib_inflate_workspacesize());
6161 workspace->strm.workspace = vmalloc(workspacesize);
62− workspace->buf = kmalloc(PAGE_CACHE_SIZE, GFP_NOFS);
62+ workspace->buf = kmalloc(PAGE_SIZE, GFP_NOFS);
6363 if (!workspace->strm.workspace || !workspace->buf)
6464 goto fail;
6565
@@ -103,7 +103,7 @@ static int zlib_compress_pages(struct list_head *ws, · 37 unmodified lines
103103 workspace->strm.total_in = 0;
104104 workspace->strm.total_out = 0;
105105
106− in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT);
106+ in_page = find_get_page(mapping, start >> PAGE_SHIFT);
107107 data_in = kmap(in_page);
108108
109109 out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM);
@@ -117,8 +117,8 @@ static int zlib_compress_pages(struct list_head *ws, · 7 unmodified lines
117117
118118 workspace->strm.next_in = data_in;
119119 workspace->strm.next_out = cpage_out;
120− workspace->strm.avail_out = PAGE_CACHE_SIZE;
121− workspace->strm.avail_in = min(len, PAGE_CACHE_SIZE);
120+ workspace->strm.avail_out = PAGE_SIZE;
121+ workspace->strm.avail_in = min(len, PAGE_SIZE);
122122
123123 while (workspace->strm.total_in < len) {
124124 ret = zlib_deflate(&workspace->strm, Z_SYNC_FLUSH);
@@ -156,7 +156,7 @@ static int zlib_compress_pages(struct list_head *ws, · 31 unmodified lines
156156 cpage_out = kmap(out_page);
157157 pages[nr_pages] = out_page;
158158 nr_pages++;
159− workspace->strm.avail_out = PAGE_CACHE_SIZE;
159+ workspace->strm.avail_out = PAGE_SIZE;
160160 workspace->strm.next_out = cpage_out;
161161 }
162162 /* we're all done */
@@ -170,14 +170,14 @@ static int zlib_compress_pages(struct list_head *ws, · 7 unmodified lines
170170
171171 bytes_left = len - workspace->strm.total_in;
172172 kunmap(in_page);
173− page_cache_release(in_page);
173+ put_page(in_page);
174174
175− start += PAGE_CACHE_SIZE;
175+ start += PAGE_SIZE;
176176 in_page = find_get_page(mapping,
177− start >> PAGE_CACHE_SHIFT);
177+ start >> PAGE_SHIFT);
178178 data_in = kmap(in_page);
179179 workspace->strm.avail_in = min(bytes_left,
180− PAGE_CACHE_SIZE);
180+ PAGE_SIZE);
181181 workspace->strm.next_in = data_in;
182182 }
183183 }
@@ -205,7 +205,7 @@ out: · 21 unmodified lines
205205
206206 if (in_page) {
207207 kunmap(in_page);
208− page_cache_release(in_page);
208+ put_page(in_page);
209209 }
210210 return ret;
211211 }
@@ -223,18 +223,18 @@ static int zlib_decompress_biovec(struct list_head *ws, struct page **pages_in, · 11 unmodified lines
223223 size_t total_out = 0;
224224 unsigned long page_in_index = 0;
225225 unsigned long page_out_index = 0;
226− unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_CACHE_SIZE);
226+ unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_SIZE);
227227 unsigned long buf_start;
228228 unsigned long pg_offset;
229229
230230 data_in = kmap(pages_in[page_in_index]);
231231 workspace->strm.next_in = data_in;
232− workspace->strm.avail_in = min_t(size_t, srclen, PAGE_CACHE_SIZE);
232+ workspace->strm.avail_in = min_t(size_t, srclen, PAGE_SIZE);
233233 workspace->strm.total_in = 0;
234234
235235 workspace->strm.total_out = 0;
236236 workspace->strm.next_out = workspace->buf;
237− workspace->strm.avail_out = PAGE_CACHE_SIZE;
237+ workspace->strm.avail_out = PAGE_SIZE;
238238 pg_offset = 0;
239239
240240 /* If it's deflate, and it's got no preset dictionary, then
@@ -274,7 +274,7 @@ static int zlib_decompress_biovec(struct list_head *ws, struct page **pages_in, · 33 unmodified lines
274274 }
275275
276276 workspace->strm.next_out = workspace->buf;
277− workspace->strm.avail_out = PAGE_CACHE_SIZE;
277+ workspace->strm.avail_out = PAGE_SIZE;
278278
279279 if (workspace->strm.avail_in == 0) {
280280 unsigned long tmp;
@@ -288,7 +288,7 @@ static int zlib_decompress_biovec(struct list_head *ws, struct page **pages_in, · 7 unmodified lines
288288 workspace->strm.next_in = data_in;
289289 tmp = srclen - workspace->strm.total_in;
290290 workspace->strm.avail_in = min(tmp,
291− PAGE_CACHE_SIZE);
291+ PAGE_SIZE);
292292 }
293293 }
294294 if (ret != Z_STREAM_END)
@@ -325,7 +325,7 @@ static int zlib_decompress(struct list_head *ws, unsigned char *data_in, · 30 unmodified lines
325325 workspace->strm.total_in = 0;
326326
327327 workspace->strm.next_out = workspace->buf;
328− workspace->strm.avail_out = PAGE_CACHE_SIZE;
328+ workspace->strm.avail_out = PAGE_SIZE;
329329 workspace->strm.total_out = 0;
330330 /* If it's deflate, and it's got no preset dictionary, then
331331 we can tell zlib to skip the adler32 check. */
@@ -368,8 +368,8 @@ static int zlib_decompress(struct list_head *ws, unsigned char *data_in, · 36 unmodified lines
368368 else
369369 buf_offset = 0;
370370
371− bytes = min(PAGE_CACHE_SIZE - pg_offset,
372− PAGE_CACHE_SIZE - buf_offset);
371+ bytes = min(PAGE_SIZE - pg_offset,
372+ PAGE_SIZE - buf_offset);
373373 bytes = min(bytes, bytes_left);
374374
375375 kaddr = kmap_atomic(dest_page);
@@ -380,7 +380,7 @@ static int zlib_decompress(struct list_head *ws, unsigned char *data_in, · 4 unmodified lines
380380 bytes_left -= bytes;
381381 next:
382382 workspace->strm.next_out = workspace->buf;
383− workspace->strm.avail_out = PAGE_CACHE_SIZE;
383+ workspace->strm.avail_out = PAGE_SIZE;
384384 }
385385
386386 if (ret != Z_STREAM_END && bytes_left != 0)
fs/buffer.c+50−50
@@ -129,7 +129,7 @@ __clear_page_buffers(struct page *page) · 128 unmodified lines
129129 {
130130 ClearPagePrivate(page);
131131 set_page_private(page, 0);
132− page_cache_release(page);
132+ put_page(page);
133133 }
134134
135135 static void buffer_io_error(struct buffer_head *bh, char *msg)
@@ -207,7 +207,7 @@ __find_get_block_slow(struct block_device *bdev, sector_t block) · 71 unmodified lines
207207 struct page *page;
208208 int all_mapped = 1;
209209
210− index = block >> (PAGE_CACHE_SHIFT - bd_inode->i_blkbits);
210+ index = block >> (PAGE_SHIFT - bd_inode->i_blkbits);
211211 page = find_get_page_flags(bd_mapping, index, FGP_ACCESSED);
212212 if (!page)
213213 goto out;
@@ -245,7 +245,7 @@ __find_get_block_slow(struct block_device *bdev, sector_t block) · 31 unmodified lines
245245 }
246246 out_unlock:
247247 spin_unlock(&bd_mapping->private_lock);
248− page_cache_release(page);
248+ put_page(page);
249249 out:
250250 return ret;
251251 }
@@ -1040,7 +1040,7 @@ done: · 788 unmodified lines
10401040 ret = (block < end_block) ? 1 : -ENXIO;
10411041 failed:
10421042 unlock_page(page);
1043− page_cache_release(page);
1043+ put_page(page);
10441044 return ret;
10451045 }
10461046
@@ -1533,7 +1533,7 @@ void block_invalidatepage(struct page *page, unsigned int offset, · 486 unmodified lines
15331533 /*
15341534 * Check for overflow
15351535 */
1536− BUG_ON(stop > PAGE_CACHE_SIZE || stop < length);
1536+ BUG_ON(stop > PAGE_SIZE || stop < length);
15371537
15381538 head = page_buffers(page);
15391539 bh = head;
@@ -1716,7 +1716,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, · 176 unmodified lines
17161716 blocksize = bh->b_size;
17171717 bbits = block_size_bits(blocksize);
17181718
1719− block = (sector_t)page->index << (PAGE_CACHE_SHIFT - bbits);
1719+ block = (sector_t)page->index << (PAGE_SHIFT - bbits);
17201720 last_block = (i_size_read(inode) - 1) >> bbits;
17211721
17221722 /*
@@ -1894,7 +1894,7 @@ EXPORT_SYMBOL(page_zero_new_buffers); · 171 unmodified lines
18941894 int __block_write_begin(struct page *page, loff_t pos, unsigned len,
18951895 get_block_t *get_block)
18961896 {
1897− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
1897+ unsigned from = pos & (PAGE_SIZE - 1);
18981898 unsigned to = from + len;
18991899 struct inode *inode = page->mapping->host;
19001900 unsigned block_start, block_end;
@@ -1904,15 +1904,15 @@ int __block_write_begin(struct page *page, loff_t pos, unsigned len, · 3 unmodified lines
19041904 struct buffer_head *bh, *head, *wait[2], **wait_bh=wait;
19051905
19061906 BUG_ON(!PageLocked(page));
1907− BUG_ON(from > PAGE_CACHE_SIZE);
1908− BUG_ON(to > PAGE_CACHE_SIZE);
1907+ BUG_ON(from > PAGE_SIZE);
1908+ BUG_ON(to > PAGE_SIZE);
19091909 BUG_ON(from > to);
19101910
19111911 head = create_page_buffers(page, inode, 0);
19121912 blocksize = head->b_size;
19131913 bbits = block_size_bits(blocksize);
19141914
1915− block = (sector_t)page->index << (PAGE_CACHE_SHIFT - bbits);
1915+ block = (sector_t)page->index << (PAGE_SHIFT - bbits);
19161916
19171917 for(bh = head, block_start = 0; bh != head || !block_start;
19181918 block++, block_start=block_end, bh = bh->b_this_page) {
@@ -2020,7 +2020,7 @@ static int __block_commit_write(struct inode *inode, struct page *page, · 101 unmodified lines
20202020 int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len,
20212021 unsigned flags, struct page **pagep, get_block_t *get_block)
20222022 {
2023− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
2023+ pgoff_t index = pos >> PAGE_SHIFT;
20242024 struct page *page;
20252025 int status;
20262026
@@ -2031,7 +2031,7 @@ int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, · 4 unmodified lines
20312031 status = __block_write_begin(page, pos, len, get_block);
20322032 if (unlikely(status)) {
20332033 unlock_page(page);
2034− page_cache_release(page);
2034+ put_page(page);
20352035 page = NULL;
20362036 }
20372037
@@ -2047,7 +2047,7 @@ int block_write_end(struct file *file, struct address_space *mapping, · 9 unmodified lines
20472047 struct inode *inode = mapping->host;
20482048 unsigned start;
20492049
2050− start = pos & (PAGE_CACHE_SIZE - 1);
2050+ start = pos & (PAGE_SIZE - 1);
20512051
20522052 if (unlikely(copied < len)) {
20532053 /*
@@ -2099,7 +2099,7 @@ int generic_write_end(struct file *file, struct address_space *mapping, · 45 unmodified lines
20992099 }
21002100
21012101 unlock_page(page);
2102− page_cache_release(page);
2102+ put_page(page);
21032103
21042104 if (old_size < pos)
21052105 pagecache_isize_extended(inode, old_size, pos);
@@ -2136,9 +2136,9 @@ int block_is_partially_uptodate(struct page *page, unsigned long from, · 30 unmodified lines
21362136
21372137 head = page_buffers(page);
21382138 blocksize = head->b_size;
2139− to = min_t(unsigned, PAGE_CACHE_SIZE - from, count);
2139+ to = min_t(unsigned, PAGE_SIZE - from, count);
21402140 to = from + to;
2141− if (from < blocksize && to > PAGE_CACHE_SIZE - blocksize)
2141+ if (from < blocksize && to > PAGE_SIZE - blocksize)
21422142 return 0;
21432143
21442144 bh = head;
@@ -2181,7 +2181,7 @@ int block_read_full_page(struct page *page, get_block_t *get_block) · 36 unmodified lines
21812181 blocksize = head->b_size;
21822182 bbits = block_size_bits(blocksize);
21832183
2184− iblock = (sector_t)page->index << (PAGE_CACHE_SHIFT - bbits);
2184+ iblock = (sector_t)page->index << (PAGE_SHIFT - bbits);
21852185 lblock = (i_size_read(inode)+blocksize-1) >> bbits;
21862186 bh = head;
21872187 nr = 0;
@@ -2295,16 +2295,16 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping, · 107 unmodified lines
22952295 unsigned zerofrom, offset, len;
22962296 int err = 0;
22972297
2298− index = pos >> PAGE_CACHE_SHIFT;
2299− offset = pos & ~PAGE_CACHE_MASK;
2298+ index = pos >> PAGE_SHIFT;
2299+ offset = pos & ~PAGE_MASK;
23002300
2301− while (index > (curidx = (curpos = *bytes)>>PAGE_CACHE_SHIFT)) {
2302− zerofrom = curpos & ~PAGE_CACHE_MASK;
2301+ while (index > (curidx = (curpos = *bytes)>>PAGE_SHIFT)) {
2302+ zerofrom = curpos & ~PAGE_MASK;
23032303 if (zerofrom & (blocksize-1)) {
23042304 *bytes |= (blocksize-1);
23052305 (*bytes)++;
23062306 }
2307− len = PAGE_CACHE_SIZE - zerofrom;
2307+ len = PAGE_SIZE - zerofrom;
23082308
23092309 err = pagecache_write_begin(file, mapping, curpos, len,
23102310 AOP_FLAG_UNINTERRUPTIBLE,
@@ -2329,7 +2329,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping, · 18 unmodified lines
23292329
23302330 /* page covers the boundary, find the boundary offset */
23312331 if (index == curidx) {
2332− zerofrom = curpos & ~PAGE_CACHE_MASK;
2332+ zerofrom = curpos & ~PAGE_MASK;
23332333 /* if we will expand the thing last block will be filled */
23342334 if (offset <= zerofrom) {
23352335 goto out;
@@ -2375,7 +2375,7 @@ int cont_write_begin(struct file *file, struct address_space *mapping, · 39 unmodified lines
23752375 if (err)
23762376 return err;
23772377
2378− zerofrom = *bytes & ~PAGE_CACHE_MASK;
2378+ zerofrom = *bytes & ~PAGE_MASK;
23792379 if (pos+len > *bytes && zerofrom & (blocksize-1)) {
23802380 *bytes |= (blocksize-1);
23812381 (*bytes)++;
@@ -2430,10 +2430,10 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, · 48 unmodified lines
24302430 }
24312431
24322432 /* page is wholly or partially inside EOF */
2433− if (((page->index + 1) << PAGE_CACHE_SHIFT) > size)
2434− end = size & ~PAGE_CACHE_MASK;
2433+ if (((page->index + 1) << PAGE_SHIFT) > size)
2434+ end = size & ~PAGE_MASK;
24352435 else
2436− end = PAGE_CACHE_SIZE;
2436+ end = PAGE_SIZE;
24372437
24382438 ret = __block_write_begin(page, 0, end, get_block);
24392439 if (!ret)
@@ -2508,8 +2508,8 @@ int nobh_write_begin(struct address_space *mapping, · 68 unmodified lines
25082508 int ret = 0;
25092509 int is_mapped_to_disk = 1;
25102510
2511− index = pos >> PAGE_CACHE_SHIFT;
2512− from = pos & (PAGE_CACHE_SIZE - 1);
2511+ index = pos >> PAGE_SHIFT;
2512+ from = pos & (PAGE_SIZE - 1);
25132513 to = from + len;
25142514
25152515 page = grab_cache_page_write_begin(mapping, index, flags);
@@ -2543,7 +2543,7 @@ int nobh_write_begin(struct address_space *mapping, · 27 unmodified lines
25432543 goto out_release;
25442544 }
25452545
2546− block_in_file = (sector_t)page->index << (PAGE_CACHE_SHIFT - blkbits);
2546+ block_in_file = (sector_t)page->index << (PAGE_SHIFT - blkbits);
25472547
25482548 /*
25492549 * We loop across all blocks in the page, whether or not they are
@@ -2551,7 +2551,7 @@ int nobh_write_begin(struct address_space *mapping, · 1 unmodified line
25512551 * page is fully mapped-to-disk.
25522552 */
25532553 for (block_start = 0, block_in_page = 0, bh = head;
2554− block_start < PAGE_CACHE_SIZE;
2554+ block_start < PAGE_SIZE;
25552555 block_in_page++, block_start += blocksize, bh = bh->b_this_page) {
25562556 int create;
25572557
@@ -2623,7 +2623,7 @@ failed: · 65 unmodified lines
26232623
26242624 out_release:
26252625 unlock_page(page);
2626− page_cache_release(page);
2626+ put_page(page);
26272627 *pagep = NULL;
26282628
26292629 return ret;
@@ -2653,7 +2653,7 @@ int nobh_write_end(struct file *file, struct address_space *mapping, · 23 unmodified lines
26532653 }
26542654
26552655 unlock_page(page);
2656− page_cache_release(page);
2656+ put_page(page);
26572657
26582658 while (head) {
26592659 bh = head;
@@ -2675,7 +2675,7 @@ int nobh_writepage(struct page *page, get_block_t *get_block, · 15 unmodified lines
26752675 {
26762676 struct inode * const inode = page->mapping->host;
26772677 loff_t i_size = i_size_read(inode);
2678− const pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
2678+ const pgoff_t end_index = i_size >> PAGE_SHIFT;
26792679 unsigned offset;
26802680 int ret;
26812681
@@ -2684,7 +2684,7 @@ int nobh_writepage(struct page *page, get_block_t *get_block, · 2 unmodified lines
26842684 goto out;
26852685
26862686 /* Is the page fully outside i_size? (truncate in progress) */
2687− offset = i_size & (PAGE_CACHE_SIZE-1);
2687+ offset = i_size & (PAGE_SIZE-1);
26882688 if (page->index >= end_index+1 || !offset) {
26892689 /*
26902690 * The page may have dirty, unmapped buffers. For example,
@@ -2707,7 +2707,7 @@ int nobh_writepage(struct page *page, get_block_t *get_block, · 16 unmodified lines
27072707 * the page size, the remaining memory is zeroed when mapped, and
27082708 * writes to that region are not written out to the file."
27092709 */
2710− zero_user_segment(page, offset, PAGE_CACHE_SIZE);
2710+ zero_user_segment(page, offset, PAGE_SIZE);
27112711 out:
27122712 ret = mpage_writepage(page, get_block, wbc);
27132713 if (ret == -EAGAIN)
@@ -2720,8 +2720,8 @@ EXPORT_SYMBOL(nobh_writepage); · 6 unmodified lines
27202720 int nobh_truncate_page(struct address_space *mapping,
27212721 loff_t from, get_block_t *get_block)
27222722 {
2723− pgoff_t index = from >> PAGE_CACHE_SHIFT;
2724− unsigned offset = from & (PAGE_CACHE_SIZE-1);
2723+ pgoff_t index = from >> PAGE_SHIFT;
2724+ unsigned offset = from & (PAGE_SIZE-1);
27252725 unsigned blocksize;
27262726 sector_t iblock;
27272727 unsigned length, pos;
@@ -2738,7 +2738,7 @@ int nobh_truncate_page(struct address_space *mapping, · 10 unmodified lines
27382738 return 0;
27392739
27402740 length = blocksize - length;
2741− iblock = (sector_t)index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
2741+ iblock = (sector_t)index << (PAGE_SHIFT - inode->i_blkbits);
27422742
27432743 page = grab_cache_page(mapping, index);
27442744 err = -ENOMEM;
@@ -2748,7 +2748,7 @@ int nobh_truncate_page(struct address_space *mapping, · 3 unmodified lines
27482748 if (page_has_buffers(page)) {
27492749 has_buffers:
27502750 unlock_page(page);
2751− page_cache_release(page);
2751+ put_page(page);
27522752 return block_truncate_page(mapping, from, get_block);
27532753 }
27542754
@@ -2772,7 +2772,7 @@ has_buffers: · 17 unmodified lines
27722772 if (!PageUptodate(page)) {
27732773 err = mapping->a_ops->readpage(NULL, page);
27742774 if (err) {
2775− page_cache_release(page);
2775+ put_page(page);
27762776 goto out;
27772777 }
27782778 lock_page(page);
@@ -2789,7 +2789,7 @@ has_buffers: · 10 unmodified lines
27892789
27902790 unlock:
27912791 unlock_page(page);
2792− page_cache_release(page);
2792+ put_page(page);
27932793 out:
27942794 return err;
27952795 }
@@ -2798,8 +2798,8 @@ EXPORT_SYMBOL(nobh_truncate_page); · 2 unmodified lines
27982798 int block_truncate_page(struct address_space *mapping,
27992799 loff_t from, get_block_t *get_block)
28002800 {
2801− pgoff_t index = from >> PAGE_CACHE_SHIFT;
2802− unsigned offset = from & (PAGE_CACHE_SIZE-1);
2801+ pgoff_t index = from >> PAGE_SHIFT;
2802+ unsigned offset = from & (PAGE_SIZE-1);
28032803 unsigned blocksize;
28042804 sector_t iblock;
28052805 unsigned length, pos;
@@ -2816,7 +2816,7 @@ int block_truncate_page(struct address_space *mapping, · 10 unmodified lines
28162816 return 0;
28172817
28182818 length = blocksize - length;
2819− iblock = (sector_t)index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
2819+ iblock = (sector_t)index << (PAGE_SHIFT - inode->i_blkbits);
28202820
28212821 page = grab_cache_page(mapping, index);
28222822 err = -ENOMEM;
@@ -2865,7 +2865,7 @@ int block_truncate_page(struct address_space *mapping, · 42 unmodified lines
28652865
28662866 unlock:
28672867 unlock_page(page);
2868− page_cache_release(page);
2868+ put_page(page);
28692869 out:
28702870 return err;
28712871 }
@@ -2879,7 +2879,7 @@ int block_write_full_page(struct page *page, get_block_t *get_block, · 7 unmodified lines
28792879 {
28802880 struct inode * const inode = page->mapping->host;
28812881 loff_t i_size = i_size_read(inode);
2882− const pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
2882+ const pgoff_t end_index = i_size >> PAGE_SHIFT;
28832883 unsigned offset;
28842884
28852885 /* Is the page fully inside i_size? */
@@ -2888,14 +2888,14 @@ int block_write_full_page(struct page *page, get_block_t *get_block, · 2 unmodified lines
28882888 end_buffer_async_write);
28892889
28902890 /* Is the page fully outside i_size? (truncate in progress) */
2891− offset = i_size & (PAGE_CACHE_SIZE-1);
2891+ offset = i_size & (PAGE_SIZE-1);
28922892 if (page->index >= end_index+1 || !offset) {
28932893 /*
28942894 * The page may have dirty, unmapped buffers. For example,
28952895 * they may have been added in ext3_writepage(). Make them
28962896 * freeable here, so the page does not leak.
28972897 */
2898− do_invalidatepage(page, 0, PAGE_CACHE_SIZE);
2898+ do_invalidatepage(page, 0, PAGE_SIZE);
28992899 unlock_page(page);
29002900 return 0; /* don't care */
29012901 }
@@ -2907,7 +2907,7 @@ int block_write_full_page(struct page *page, get_block_t *get_block, · 5 unmodified lines
29072907 * the page size, the remaining memory is zeroed when mapped, and
29082908 * writes to that region are not written out to the file."
29092909 */
2910− zero_user_segment(page, offset, PAGE_CACHE_SIZE);
2910+ zero_user_segment(page, offset, PAGE_SIZE);
29112911 return __block_write_full_page(inode, page, get_block, wbc,
29122912 end_buffer_async_write);
29132913 }
fs/cachefiles/rdwr.c+19−19
@@ -194,10 +194,10 @@ static void cachefiles_read_copier(struct fscache_operation *_op) · 193 unmodified lines
194194 error = -EIO;
195195 }
196196
197− page_cache_release(monitor->back_page);
197+ put_page(monitor->back_page);
198198
199199 fscache_end_io(op, monitor->netfs_page, error);
200− page_cache_release(monitor->netfs_page);
200+ put_page(monitor->netfs_page);
201201 fscache_retrieval_complete(op, 1);
202202 fscache_put_retrieval(op);
203203 kfree(monitor);
@@ -288,8 +288,8 @@ monitor_backing_page: · 84 unmodified lines
288288 _debug("- monitor add");
289289
290290 /* install the monitor */
291− page_cache_get(monitor->netfs_page);
292− page_cache_get(backpage);
291+ get_page(monitor->netfs_page);
292+ get_page(backpage);
293293 monitor->back_page = backpage;
294294 monitor->monitor.private = backpage;
295295 add_page_wait_queue(backpage, &monitor->monitor);
@@ -310,7 +310,7 @@ backing_page_already_present: · 14 unmodified lines
310310 _debug("- present");
311311
312312 if (newpage) {
313− page_cache_release(newpage);
313+ put_page(newpage);
314314 newpage = NULL;
315315 }
316316
@@ -342,7 +342,7 @@ success: · 25 unmodified lines
342342
343343 out:
344344 if (backpage)
345− page_cache_release(backpage);
345+ put_page(backpage);
346346 if (monitor) {
347347 fscache_put_retrieval(monitor->op);
348348 kfree(monitor);
@@ -363,7 +363,7 @@ io_error: · 14 unmodified lines
363363 goto out;
364364
365365 nomem_page:
366− page_cache_release(newpage);
366+ put_page(newpage);
367367 nomem_monitor:
368368 fscache_put_retrieval(monitor->op);
369369 kfree(monitor);
@@ -530,7 +530,7 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, · 160 unmodified lines
530530 netpage->index, cachefiles_gfp);
531531 if (ret < 0) {
532532 if (ret == -EEXIST) {
533− page_cache_release(netpage);
533+ put_page(netpage);
534534 fscache_retrieval_complete(op, 1);
535535 continue;
536536 }
@@ -538,10 +538,10 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, · 1 unmodified line
538538 }
539539
540540 /* install a monitor */
541− page_cache_get(netpage);
541+ get_page(netpage);
542542 monitor->netfs_page = netpage;
543543
544− page_cache_get(backpage);
544+ get_page(backpage);
545545 monitor->back_page = backpage;
546546 monitor->monitor.private = backpage;
547547 add_page_wait_queue(backpage, &monitor->monitor);
@@ -555,10 +555,10 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, · 7 unmodified lines
555555 unlock_page(backpage);
556556 }
557557
558− page_cache_release(backpage);
558+ put_page(backpage);
559559 backpage = NULL;
560560
561− page_cache_release(netpage);
561+ put_page(netpage);
562562 netpage = NULL;
563563 continue;
564564
@@ -603,7 +603,7 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, · 38 unmodified lines
603603 netpage->index, cachefiles_gfp);
604604 if (ret < 0) {
605605 if (ret == -EEXIST) {
606− page_cache_release(netpage);
606+ put_page(netpage);
607607 fscache_retrieval_complete(op, 1);
608608 continue;
609609 }
@@ -612,14 +612,14 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, · 2 unmodified lines
612612
613613 copy_highpage(netpage, backpage);
614614
615− page_cache_release(backpage);
615+ put_page(backpage);
616616 backpage = NULL;
617617
618618 fscache_mark_page_cached(op, netpage);
619619
620620 /* the netpage is unlocked and marked up to date here */
621621 fscache_end_io(op, netpage, 0);
622− page_cache_release(netpage);
622+ put_page(netpage);
623623 netpage = NULL;
624624 fscache_retrieval_complete(op, 1);
625625 continue;
@@ -632,11 +632,11 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, · 6 unmodified lines
632632 out:
633633 /* tidy up */
634634 if (newpage)
635− page_cache_release(newpage);
635+ put_page(newpage);
636636 if (netpage)
637− page_cache_release(netpage);
637+ put_page(netpage);
638638 if (backpage)
639− page_cache_release(backpage);
639+ put_page(backpage);
640640 if (monitor) {
641641 fscache_put_retrieval(op);
642642 kfree(monitor);
@@ -644,7 +644,7 @@ out: · 1 unmodified line
644644
645645 list_for_each_entry_safe(netpage, _n, list, lru) {
646646 list_del(&netpage->lru);
647− page_cache_release(netpage);
647+ put_page(netpage);
648648 fscache_retrieval_complete(op, 1);
649649 }
650650
fs/ceph/addr.c+57−57
@@ -143,7 +143,7 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset, · 142 unmodified lines
143143 inode = page->mapping->host;
144144 ci = ceph_inode(inode);
145145
146− if (offset != 0 || length != PAGE_CACHE_SIZE) {
146+ if (offset != 0 || length != PAGE_SIZE) {
147147 dout("%p invalidatepage %p idx %lu partial dirty page %u~%u\n",
148148 inode, page, page->index, offset, length);
149149 return;
@@ -197,10 +197,10 @@ static int readpage_nounlock(struct file *filp, struct page *page) · 47 unmodified lines
197197 &ceph_inode_to_client(inode)->client->osdc;
198198 int err = 0;
199199 u64 off = page_offset(page);
200− u64 len = PAGE_CACHE_SIZE;
200+ u64 len = PAGE_SIZE;
201201
202202 if (off >= i_size_read(inode)) {
203− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
203+ zero_user_segment(page, 0, PAGE_SIZE);
204204 SetPageUptodate(page);
205205 return 0;
206206 }
@@ -212,7 +212,7 @@ static int readpage_nounlock(struct file *filp, struct page *page) · 5 unmodified lines
212212 */
213213 if (off == 0)
214214 return -EINVAL;
215− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
215+ zero_user_segment(page, 0, PAGE_SIZE);
216216 SetPageUptodate(page);
217217 return 0;
218218 }
@@ -234,9 +234,9 @@ static int readpage_nounlock(struct file *filp, struct page *page) · 15 unmodified lines
234234 ceph_fscache_readpage_cancel(inode, page);
235235 goto out;
236236 }
237− if (err < PAGE_CACHE_SIZE)
237+ if (err < PAGE_SIZE)
238238 /* zero fill remainder of page */
239− zero_user_segment(page, err, PAGE_CACHE_SIZE);
239+ zero_user_segment(page, err, PAGE_SIZE);
240240 else
241241 flush_dcache_page(page);
242242
@@ -278,10 +278,10 @@ static void finish_read(struct ceph_osd_request *req, struct ceph_msg *msg) · 35 unmodified lines
278278
279279 if (rc < 0 && rc != -ENOENT)
280280 goto unlock;
281− if (bytes < (int)PAGE_CACHE_SIZE) {
281+ if (bytes < (int)PAGE_SIZE) {
282282 /* zero (remainder of) page */
283283 int s = bytes < 0 ? 0 : bytes;
284− zero_user_segment(page, s, PAGE_CACHE_SIZE);
284+ zero_user_segment(page, s, PAGE_SIZE);
285285 }
286286 dout("finish_read %p uptodate %p idx %lu\n", inode, page,
287287 page->index);
@@ -290,8 +290,8 @@ static void finish_read(struct ceph_osd_request *req, struct ceph_msg *msg) · 2 unmodified lines
290290 ceph_readpage_to_fscache(inode, page);
291291 unlock:
292292 unlock_page(page);
293− page_cache_release(page);
294− bytes -= PAGE_CACHE_SIZE;
293+ put_page(page);
294+ bytes -= PAGE_SIZE;
295295 }
296296 kfree(osd_data->pages);
297297 }
@@ -336,7 +336,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) · 38 unmodified lines
336336 if (max && nr_pages == max)
337337 break;
338338 }
339− len = nr_pages << PAGE_CACHE_SHIFT;
339+ len = nr_pages << PAGE_SHIFT;
340340 dout("start_read %p nr_pages %d is %lld~%lld\n", inode, nr_pages,
341341 off, len);
342342 vino = ceph_vino(inode);
@@ -364,7 +364,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) · 21 unmodified lines
364364 if (add_to_page_cache_lru(page, &inode->i_data, page->index,
365365 GFP_KERNEL)) {
366366 ceph_fscache_uncache_page(inode, page);
367− page_cache_release(page);
367+ put_page(page);
368368 dout("start_read %p add_to_page_cache failed %p\n",
369369 inode, page);
370370 nr_pages = i;
@@ -415,8 +415,8 @@ static int ceph_readpages(struct file *file, struct address_space *mapping, · 44 unmodified lines
415415 if (rc == 0)
416416 goto out;
417417
418− if (fsc->mount_options->rsize >= PAGE_CACHE_SIZE)
419− max = (fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1)
418+ if (fsc->mount_options->rsize >= PAGE_SIZE)
419+ max = (fsc->mount_options->rsize + PAGE_SIZE - 1)
420420 >> PAGE_SHIFT;
421421
422422 dout("readpages %p file %p nr_pages %d max %d\n", inode,
@@ -484,7 +484,7 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc) · 61 unmodified lines
484484 long writeback_stat;
485485 u64 truncate_size;
486486 u32 truncate_seq;
487− int err = 0, len = PAGE_CACHE_SIZE;
487+ int err = 0, len = PAGE_SIZE;
488488
489489 dout("writepage %p idx %lu\n", page, page->index);
490490
@@ -725,9 +725,9 @@ static int ceph_writepages_start(struct address_space *mapping, · 234 unmodified lines
725725 }
726726 if (fsc->mount_options->wsize && fsc->mount_options->wsize < wsize)
727727 wsize = fsc->mount_options->wsize;
728− if (wsize < PAGE_CACHE_SIZE)
729− wsize = PAGE_CACHE_SIZE;
730− max_pages_ever = wsize >> PAGE_CACHE_SHIFT;
728+ if (wsize < PAGE_SIZE)
729+ wsize = PAGE_SIZE;
730+ max_pages_ever = wsize >> PAGE_SHIFT;
731731
732732 pagevec_init(&pvec, 0);
733733
@@ -737,8 +737,8 @@ static int ceph_writepages_start(struct address_space *mapping, · 3 unmodified lines
737737 end = -1;
738738 dout(" cyclic, start at %lu\n", start);
739739 } else {
740− start = wbc->range_start >> PAGE_CACHE_SHIFT;
741− end = wbc->range_end >> PAGE_CACHE_SHIFT;
740+ start = wbc->range_start >> PAGE_SHIFT;
741+ end = wbc->range_end >> PAGE_SHIFT;
742742 if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
743743 range_whole = 1;
744744 should_loop = 0;
@@ -887,7 +887,7 @@ get_more_pages: · 142 unmodified lines
887887
888888 num_ops = 1 + do_sync;
889889 strip_unit_end = page->index +
890− ((len - 1) >> PAGE_CACHE_SHIFT);
890+ ((len - 1) >> PAGE_SHIFT);
891891
892892 BUG_ON(pages);
893893 max_pages = calc_pages_for(0, (u64)len);
@@ -901,7 +901,7 @@ get_more_pages: · 7 unmodified lines
901901
902902 len = 0;
903903 } else if (page->index !=
904− (offset + len) >> PAGE_CACHE_SHIFT) {
904+ (offset + len) >> PAGE_SHIFT) {
905905 if (num_ops >= (pool ? CEPH_OSD_SLAB_OPS :
906906 CEPH_OSD_MAX_OPS)) {
907907 redirty_page_for_writepage(wbc, page);
@@ -929,7 +929,7 @@ get_more_pages: · 21 unmodified lines
929929
930930 pages[locked_pages] = page;
931931 locked_pages++;
932− len += PAGE_CACHE_SIZE;
932+ len += PAGE_SIZE;
933933 }
934934
935935 /* did we get anything? */
@@ -981,7 +981,7 @@ new_request: · 45 unmodified lines
981981 BUG_ON(IS_ERR(req));
982982 }
983983 BUG_ON(len < page_offset(pages[locked_pages - 1]) +
984− PAGE_CACHE_SIZE - offset);
984+ PAGE_SIZE - offset);
985985
986986 req->r_callback = writepages_finish;
987987 req->r_inode = inode;
@@ -1011,7 +1011,7 @@ new_request: · 23 unmodified lines
10111011 }
10121012
10131013 set_page_writeback(pages[i]);
1014− len += PAGE_CACHE_SIZE;
1014+ len += PAGE_SIZE;
10151015 }
10161016
10171017 if (snap_size != -1) {
@@ -1020,7 +1020,7 @@ new_request: · 2 unmodified lines
10201020 /* writepages_finish() clears writeback pages
10211021 * according to the data length, so make sure
10221022 * data length covers all locked pages */
1023− u64 min_len = len + 1 - PAGE_CACHE_SIZE;
1023+ u64 min_len = len + 1 - PAGE_SIZE;
10241024 len = min(len, (u64)i_size_read(inode) - offset);
10251025 len = max(len, min_len);
10261026 }
@@ -1135,8 +1135,8 @@ static int ceph_update_writeable_page(struct file *file, · 108 unmodified lines
11351135 {
11361136 struct inode *inode = file_inode(file);
11371137 struct ceph_inode_info *ci = ceph_inode(inode);
1138− loff_t page_off = pos & PAGE_CACHE_MASK;
1139− int pos_in_page = pos & ~PAGE_CACHE_MASK;
1138+ loff_t page_off = pos & PAGE_MASK;
1139+ int pos_in_page = pos & ~PAGE_MASK;
11401140 int end_in_page = pos_in_page + len;
11411141 loff_t i_size;
11421142 int r;
@@ -1191,7 +1191,7 @@ retry_locked: · 48 unmodified lines
11911191 }
11921192
11931193 /* full page? */
1194− if (pos_in_page == 0 && len == PAGE_CACHE_SIZE)
1194+ if (pos_in_page == 0 && len == PAGE_SIZE)
11951195 return 0;
11961196
11971197 /* past end of file? */
@@ -1199,12 +1199,12 @@ retry_locked: · 1 unmodified line
11991199
12001200 if (page_off >= i_size ||
12011201 (pos_in_page == 0 && (pos+len) >= i_size &&
1202− end_in_page - pos_in_page != PAGE_CACHE_SIZE)) {
1202+ end_in_page - pos_in_page != PAGE_SIZE)) {
12031203 dout(" zeroing %p 0 - %d and %d - %d\n",
1204− page, pos_in_page, end_in_page, (int)PAGE_CACHE_SIZE);
1204+ page, pos_in_page, end_in_page, (int)PAGE_SIZE);
12051205 zero_user_segments(page,
12061206 0, pos_in_page,
1207− end_in_page, PAGE_CACHE_SIZE);
1207+ end_in_page, PAGE_SIZE);
12081208 return 0;
12091209 }
12101210
@@ -1228,7 +1228,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping, · 17 unmodified lines
12281228 {
12291229 struct inode *inode = file_inode(file);
12301230 struct page *page;
1231− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
1231+ pgoff_t index = pos >> PAGE_SHIFT;
12321232 int r;
12331233
12341234 do {
@@ -1242,7 +1242,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping, · 7 unmodified lines
12421242
12431243 r = ceph_update_writeable_page(file, pos, len, page);
12441244 if (r < 0)
1245− page_cache_release(page);
1245+ put_page(page);
12461246 else
12471247 *pagep = page;
12481248 } while (r == -EAGAIN);
@@ -1259,7 +1259,7 @@ static int ceph_write_end(struct file *file, struct address_space *mapping, · 10 unmodified lines
12591259 struct page *page, void *fsdata)
12601260 {
12611261 struct inode *inode = file_inode(file);
1262− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
1262+ unsigned from = pos & (PAGE_SIZE - 1);
12631263 int check_cap = 0;
12641264
12651265 dout("write_end file %p inode %p page %p %d~%d (%d)\n", file,
@@ -1279,7 +1279,7 @@ static int ceph_write_end(struct file *file, struct address_space *mapping, · 13 unmodified lines
12791279 set_page_dirty(page);
12801280
12811281 unlock_page(page);
1282− page_cache_release(page);
1282+ put_page(page);
12831283
12841284 if (check_cap)
12851285 ceph_check_caps(ceph_inode(inode), CHECK_CAPS_AUTHONLY, NULL);
@@ -1322,11 +1322,11 @@ static int ceph_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 36 unmodified lines
13221322 struct ceph_inode_info *ci = ceph_inode(inode);
13231323 struct ceph_file_info *fi = vma->vm_file->private_data;
13241324 struct page *pinned_page = NULL;
1325− loff_t off = vmf->pgoff << PAGE_CACHE_SHIFT;
1325+ loff_t off = vmf->pgoff << PAGE_SHIFT;
13261326 int want, got, ret;
13271327
13281328 dout("filemap_fault %p %llx.%llx %llu~%zd trying to get caps\n",
1329− inode, ceph_vinop(inode), off, (size_t)PAGE_CACHE_SIZE);
1329+ inode, ceph_vinop(inode), off, (size_t)PAGE_SIZE);
13301330 if (fi->fmode & CEPH_FILE_MODE_LAZY)
13311331 want = CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_LAZYIO;
13321332 else
@@ -1343,7 +1343,7 @@ static int ceph_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 10 unmodified lines
13431343 }
13441344 }
13451345 dout("filemap_fault %p %llu~%zd got cap refs on %s\n",
1346− inode, off, (size_t)PAGE_CACHE_SIZE, ceph_cap_string(got));
1346+ inode, off, (size_t)PAGE_SIZE, ceph_cap_string(got));
13471347
13481348 if ((got & (CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_LAZYIO)) ||
13491349 ci->i_inline_version == CEPH_INLINE_NONE)
@@ -1352,16 +1352,16 @@ static int ceph_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 2 unmodified lines
13521352 ret = -EAGAIN;
13531353
13541354 dout("filemap_fault %p %llu~%zd dropping cap refs on %s ret %d\n",
1355− inode, off, (size_t)PAGE_CACHE_SIZE, ceph_cap_string(got), ret);
1355+ inode, off, (size_t)PAGE_SIZE, ceph_cap_string(got), ret);
13561356 if (pinned_page)
1357− page_cache_release(pinned_page);
1357+ put_page(pinned_page);
13581358 ceph_put_cap_refs(ci, got);
13591359
13601360 if (ret != -EAGAIN)
13611361 return ret;
13621362
13631363 /* read inline data */
1364− if (off >= PAGE_CACHE_SIZE) {
1364+ if (off >= PAGE_SIZE) {
13651365 /* does not support inline data > PAGE_SIZE */
13661366 ret = VM_FAULT_SIGBUS;
13671367 } else {
@@ -1378,12 +1378,12 @@ static int ceph_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 10 unmodified lines
13781378 CEPH_STAT_CAP_INLINE_DATA, true);
13791379 if (ret1 < 0 || off >= i_size_read(inode)) {
13801380 unlock_page(page);
1381− page_cache_release(page);
1381+ put_page(page);
13821382 ret = VM_FAULT_SIGBUS;
13831383 goto out;
13841384 }
1385− if (ret1 < PAGE_CACHE_SIZE)
1386− zero_user_segment(page, ret1, PAGE_CACHE_SIZE);
1385+ if (ret1 < PAGE_SIZE)
1386+ zero_user_segment(page, ret1, PAGE_SIZE);
13871387 else
13881388 flush_dcache_page(page);
13891389 SetPageUptodate(page);
@@ -1392,7 +1392,7 @@ static int ceph_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 2 unmodified lines
13921392 }
13931393 out:
13941394 dout("filemap_fault %p %llu~%zd read inline data ret %d\n",
1395− inode, off, (size_t)PAGE_CACHE_SIZE, ret);
1395+ inode, off, (size_t)PAGE_SIZE, ret);
13961396 return ret;
13971397 }
13981398
@@ -1430,10 +1430,10 @@ static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 31 unmodified lines
14301430 }
14311431 }
14321432
1433− if (off + PAGE_CACHE_SIZE <= size)
1434− len = PAGE_CACHE_SIZE;
1433+ if (off + PAGE_SIZE <= size)
1434+ len = PAGE_SIZE;
14351435 else
1436− len = size & ~PAGE_CACHE_MASK;
1436+ len = size & ~PAGE_MASK;
14371437
14381438 dout("page_mkwrite %p %llx.%llx %llu~%zd getting caps i_size %llu\n",
14391439 inode, ceph_vinop(inode), off, len, size);
@@ -1519,7 +1519,7 @@ void ceph_fill_inline_data(struct inode *inode, struct page *locked_page, · 79 unmodified lines
15191519 return;
15201520 if (PageUptodate(page)) {
15211521 unlock_page(page);
1522− page_cache_release(page);
1522+ put_page(page);
15231523 return;
15241524 }
15251525 }
@@ -1534,14 +1534,14 @@ void ceph_fill_inline_data(struct inode *inode, struct page *locked_page, · 8 unmodified lines
15341534 }
15351535
15361536 if (page != locked_page) {
1537− if (len < PAGE_CACHE_SIZE)
1538− zero_user_segment(page, len, PAGE_CACHE_SIZE);
1537+ if (len < PAGE_SIZE)
1538+ zero_user_segment(page, len, PAGE_SIZE);
15391539 else
15401540 flush_dcache_page(page);
15411541
15421542 SetPageUptodate(page);
15431543 unlock_page(page);
1544− page_cache_release(page);
1544+ put_page(page);
15451545 }
15461546 }
15471547
@@ -1578,7 +1578,7 @@ int ceph_uninline_data(struct file *filp, struct page *locked_page) · 30 unmodified lines
15781578 from_pagecache = true;
15791579 lock_page(page);
15801580 } else {
1581− page_cache_release(page);
1581+ put_page(page);
15821582 page = NULL;
15831583 }
15841584 }
@@ -1586,8 +1586,8 @@ int ceph_uninline_data(struct file *filp, struct page *locked_page) · 1 unmodified line
15861586
15871587 if (page) {
15881588 len = i_size_read(inode);
1589− if (len > PAGE_CACHE_SIZE)
1590− len = PAGE_CACHE_SIZE;
1589+ if (len > PAGE_SIZE)
1590+ len = PAGE_SIZE;
15911591 } else {
15921592 page = __page_cache_alloc(GFP_NOFS);
15931593 if (!page) {
@@ -1670,7 +1670,7 @@ out: · 76 unmodified lines
16701670 if (page && page != locked_page) {
16711671 if (from_pagecache) {
16721672 unlock_page(page);
1673− page_cache_release(page);
1673+ put_page(page);
16741674 } else
16751675 __free_pages(page, 0);
16761676 }
fs/ceph/caps.c+1−1
@@ -2510,7 +2510,7 @@ int ceph_get_caps(struct ceph_inode_info *ci, int need, int want, · 2509 unmodified lines
25102510 *pinned_page = page;
25112511 break;
25122512 }
2513− page_cache_release(page);
2513+ put_page(page);
25142514 }
25152515 /*
25162516 * drop cap refs first because getattr while
fs/ceph/dir.c+2−2
@@ -129,7 +129,7 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx, · 128 unmodified lines
129129 struct inode *dir = d_inode(parent);
130130 struct dentry *dentry, *last = NULL;
131131 struct ceph_dentry_info *di;
132− unsigned nsize = PAGE_CACHE_SIZE / sizeof(struct dentry *);
132+ unsigned nsize = PAGE_SIZE / sizeof(struct dentry *);
133133 int err = 0;
134134 loff_t ptr_pos = 0;
135135 struct ceph_readdir_cache_control cache_ctl = {};
@@ -154,7 +154,7 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx, · 18 unmodified lines
154154 }
155155
156156 err = -EAGAIN;
157− pgoff = ptr_pos >> PAGE_CACHE_SHIFT;
157+ pgoff = ptr_pos >> PAGE_SHIFT;
158158 if (!cache_ctl.page || pgoff != page_index(cache_ctl.page)) {
159159 ceph_readdir_cache_release(&cache_ctl);
160160 cache_ctl.page = find_lock_page(&dir->i_data, pgoff);
fs/ceph/file.c+16−16
@@ -466,7 +466,7 @@ more: · 465 unmodified lines
466466 ret += zlen;
467467 }
468468
469− didpages = (page_align + ret) >> PAGE_CACHE_SHIFT;
469+ didpages = (page_align + ret) >> PAGE_SHIFT;
470470 pos += ret;
471471 read = pos - off;
472472 left -= ret;
@@ -806,8 +806,8 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter, · 333 unmodified lines
806806
807807 if (write) {
808808 ret = invalidate_inode_pages2_range(inode->i_mapping,
809− pos >> PAGE_CACHE_SHIFT,
810− (pos + count) >> PAGE_CACHE_SHIFT);
809+ pos >> PAGE_SHIFT,
810+ (pos + count) >> PAGE_SHIFT);
811811 if (ret < 0)
812812 dout("invalidate_inode_pages2_range returned %d\n", ret);
813813
@@ -872,7 +872,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter, · 58 unmodified lines
872872 * may block.
873873 */
874874 truncate_inode_pages_range(inode->i_mapping, pos,
875− (pos+len) | (PAGE_CACHE_SIZE - 1));
875+ (pos+len) | (PAGE_SIZE - 1));
876876
877877 osd_req_op_init(req, 1, CEPH_OSD_OP_STARTSYNC, 0);
878878 }
@@ -1006,8 +1006,8 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos, · 127 unmodified lines
10061006 return ret;
10071007
10081008 ret = invalidate_inode_pages2_range(inode->i_mapping,
1009− pos >> PAGE_CACHE_SHIFT,
1010− (pos + count) >> PAGE_CACHE_SHIFT);
1009+ pos >> PAGE_SHIFT,
1010+ (pos + count) >> PAGE_SHIFT);
10111011 if (ret < 0)
10121012 dout("invalidate_inode_pages2_range returned %d\n", ret);
10131013
@@ -1036,7 +1036,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos, · 22 unmodified lines
10361036 * write from beginning of first page,
10371037 * regardless of io alignment
10381038 */
1039− num_pages = (len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
1039+ num_pages = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
10401040
10411041 pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL);
10421042 if (IS_ERR(pages)) {
@@ -1159,7 +1159,7 @@ again: · 116 unmodified lines
11591159 dout("aio_read %p %llx.%llx dropping cap refs on %s = %d\n",
11601160 inode, ceph_vinop(inode), ceph_cap_string(got), (int)ret);
11611161 if (pinned_page) {
1162− page_cache_release(pinned_page);
1162+ put_page(pinned_page);
11631163 pinned_page = NULL;
11641164 }
11651165 ceph_put_cap_refs(ci, got);
@@ -1188,10 +1188,10 @@ again: · 22 unmodified lines
11881188 if (retry_op == READ_INLINE) {
11891189 BUG_ON(ret > 0 || read > 0);
11901190 if (iocb->ki_pos < i_size &&
1191− iocb->ki_pos < PAGE_CACHE_SIZE) {
1191+ iocb->ki_pos < PAGE_SIZE) {
11921192 loff_t end = min_t(loff_t, i_size,
11931193 iocb->ki_pos + len);
1194− end = min_t(loff_t, end, PAGE_CACHE_SIZE);
1194+ end = min_t(loff_t, end, PAGE_SIZE);
11951195 if (statret < end)
11961196 zero_user_segment(page, statret, end);
11971197 ret = copy_page_to_iter(page,
@@ -1463,21 +1463,21 @@ static inline void ceph_zero_partial_page( · 265 unmodified lines
14631463 struct inode *inode, loff_t offset, unsigned size)
14641464 {
14651465 struct page *page;
1466− pgoff_t index = offset >> PAGE_CACHE_SHIFT;
1466+ pgoff_t index = offset >> PAGE_SHIFT;
14671467
14681468 page = find_lock_page(inode->i_mapping, index);
14691469 if (page) {
14701470 wait_on_page_writeback(page);
1471− zero_user(page, offset & (PAGE_CACHE_SIZE - 1), size);
1471+ zero_user(page, offset & (PAGE_SIZE - 1), size);
14721472 unlock_page(page);
1473− page_cache_release(page);
1473+ put_page(page);
14741474 }
14751475 }
14761476
14771477 static void ceph_zero_pagecache_range(struct inode *inode, loff_t offset,
14781478 loff_t length)
14791479 {
1480− loff_t nearly = round_up(offset, PAGE_CACHE_SIZE);
1480+ loff_t nearly = round_up(offset, PAGE_SIZE);
14811481 if (offset < nearly) {
14821482 loff_t size = nearly - offset;
14831483 if (length < size)
@@ -1486,8 +1486,8 @@ static void ceph_zero_pagecache_range(struct inode *inode, loff_t offset, · 2 unmodified lines
14861486 offset += size;
14871487 length -= size;
14881488 }
1489− if (length >= PAGE_CACHE_SIZE) {
1490− loff_t size = round_down(length, PAGE_CACHE_SIZE);
1489+ if (length >= PAGE_SIZE) {
1490+ loff_t size = round_down(length, PAGE_SIZE);
14911491 truncate_pagecache_range(inode, offset, offset + size - 1);
14921492 offset += size;
14931493 length -= size;
fs/ceph/inode.c+3−3
@@ -1338,7 +1338,7 @@ void ceph_readdir_cache_release(struct ceph_readdir_cache_control *ctl) · 1337 unmodified lines
13381338 {
13391339 if (ctl->page) {
13401340 kunmap(ctl->page);
1341− page_cache_release(ctl->page);
1341+ put_page(ctl->page);
13421342 ctl->page = NULL;
13431343 }
13441344 }
@@ -1348,7 +1348,7 @@ static int fill_readdir_cache(struct inode *dir, struct dentry *dn, · 3 unmodified lines
13481348 struct ceph_mds_request *req)
13491349 {
13501350 struct ceph_inode_info *ci = ceph_inode(dir);
1351− unsigned nsize = PAGE_CACHE_SIZE / sizeof(struct dentry*);
1351+ unsigned nsize = PAGE_SIZE / sizeof(struct dentry*);
13521352 unsigned idx = ctl->index % nsize;
13531353 pgoff_t pgoff = ctl->index / nsize;
13541354
@@ -1367,7 +1367,7 @@ static int fill_readdir_cache(struct inode *dir, struct dentry *dn, · 12 unmodified lines
13671367 unlock_page(ctl->page);
13681368 ctl->dentries = kmap(ctl->page);
13691369 if (idx == 0)
1370− memset(ctl->dentries, 0, PAGE_CACHE_SIZE);
1370+ memset(ctl->dentries, 0, PAGE_SIZE);
13711371 }
13721372
13731373 if (req->r_dir_release_cnt == atomic64_read(&ci->i_release_count) &&
fs/ceph/mds_client.c+1−1
@@ -1610,7 +1610,7 @@ again: · 1609 unmodified lines
16101610 while (!list_empty(&tmp_list)) {
16111611 if (!msg) {
16121612 msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPRELEASE,
1613− PAGE_CACHE_SIZE, GFP_NOFS, false);
1613+ PAGE_SIZE, GFP_NOFS, false);
16141614 if (!msg)
16151615 goto out_err;
16161616 head = msg->front.iov_base;
fs/ceph/mds_client.h+1−1
@@ -97,7 +97,7 @@ struct ceph_mds_reply_info_parsed { · 96 unmodified lines
9797 /*
9898 * cap releases are batched and sent to the MDS en masse.
9999 */
100−#define CEPH_CAPS_PER_RELEASE ((PAGE_CACHE_SIZE - \
100+#define CEPH_CAPS_PER_RELEASE ((PAGE_SIZE - \
101101 sizeof(struct ceph_mds_cap_release)) / \
102102 sizeof(struct ceph_mds_cap_item))
103103
fs/ceph/super.c+4−4
@@ -560,7 +560,7 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, · 559 unmodified lines
560560
561561 /* set up mempools */
562562 err = -ENOMEM;
563− page_count = fsc->mount_options->wsize >> PAGE_CACHE_SHIFT;
563+ page_count = fsc->mount_options->wsize >> PAGE_SHIFT;
564564 size = sizeof (struct page *) * (page_count ? page_count : 1);
565565 fsc->wb_pagevec_pool = mempool_create_kmalloc_pool(10, size);
566566 if (!fsc->wb_pagevec_pool)
@@ -912,13 +912,13 @@ static int ceph_register_bdi(struct super_block *sb, · 345 unmodified lines
912912 int err;
913913
914914 /* set ra_pages based on rasize mount option? */
915− if (fsc->mount_options->rasize >= PAGE_CACHE_SIZE)
915+ if (fsc->mount_options->rasize >= PAGE_SIZE)
916916 fsc->backing_dev_info.ra_pages =
917− (fsc->mount_options->rasize + PAGE_CACHE_SIZE - 1)
917+ (fsc->mount_options->rasize + PAGE_SIZE - 1)
918918 >> PAGE_SHIFT;
919919 else
920920 fsc->backing_dev_info.ra_pages =
921− VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE;
921+ VM_MAX_READAHEAD * 1024 / PAGE_SIZE;
922922
923923 err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld",
924924 atomic_long_inc_return(&bdi_seq));
fs/cifs/cifsfs.c+1−1
@@ -962,7 +962,7 @@ static int cifs_clone_file_range(struct file *src_file, loff_t off, · 961 unmodified lines
962962 cifs_dbg(FYI, "about to flush pages\n");
963963 /* should we flush first and last page first */
964964 truncate_inode_pages_range(&target_inode->i_data, destoff,
965− PAGE_CACHE_ALIGN(destoff + len)-1);
965+ PAGE_ALIGN(destoff + len)-1);
966966
967967 if (target_tcon->ses->server->ops->duplicate_extents)
968968 rc = target_tcon->ses->server->ops->duplicate_extents(xid,
fs/cifs/cifssmb.c+8−8
@@ -1929,17 +1929,17 @@ cifs_writev_requeue(struct cifs_writedata *wdata) · 1928 unmodified lines
19291929
19301930 wsize = server->ops->wp_retry_size(inode);
19311931 if (wsize < rest_len) {
1932− nr_pages = wsize / PAGE_CACHE_SIZE;
1932+ nr_pages = wsize / PAGE_SIZE;
19331933 if (!nr_pages) {
19341934 rc = -ENOTSUPP;
19351935 break;
19361936 }
1937− cur_len = nr_pages * PAGE_CACHE_SIZE;
1938− tailsz = PAGE_CACHE_SIZE;
1937+ cur_len = nr_pages * PAGE_SIZE;
1938+ tailsz = PAGE_SIZE;
19391939 } else {
1940− nr_pages = DIV_ROUND_UP(rest_len, PAGE_CACHE_SIZE);
1940+ nr_pages = DIV_ROUND_UP(rest_len, PAGE_SIZE);
19411941 cur_len = rest_len;
1942− tailsz = rest_len - (nr_pages - 1) * PAGE_CACHE_SIZE;
1942+ tailsz = rest_len - (nr_pages - 1) * PAGE_SIZE;
19431943 }
19441944
19451945 wdata2 = cifs_writedata_alloc(nr_pages, cifs_writev_complete);
@@ -1957,7 +1957,7 @@ cifs_writev_requeue(struct cifs_writedata *wdata) · 11 unmodified lines
19571957 wdata2->sync_mode = wdata->sync_mode;
19581958 wdata2->nr_pages = nr_pages;
19591959 wdata2->offset = page_offset(wdata2->pages[0]);
1960− wdata2->pagesz = PAGE_CACHE_SIZE;
1960+ wdata2->pagesz = PAGE_SIZE;
19611961 wdata2->tailsz = tailsz;
19621962 wdata2->bytes = cur_len;
19631963
@@ -1975,7 +1975,7 @@ cifs_writev_requeue(struct cifs_writedata *wdata) · 11 unmodified lines
19751975 if (rc != 0 && rc != -EAGAIN) {
19761976 SetPageError(wdata2->pages[j]);
19771977 end_page_writeback(wdata2->pages[j]);
1978− page_cache_release(wdata2->pages[j]);
1978+ put_page(wdata2->pages[j]);
19791979 }
19801980 }
19811981
@@ -2018,7 +2018,7 @@ cifs_writev_complete(struct work_struct *work) · 36 unmodified lines
20182018 else if (wdata->result < 0)
20192019 SetPageError(page);
20202020 end_page_writeback(page);
2021− page_cache_release(page);
2021+ put_page(page);
20222022 }
20232023 if (wdata->result != -EAGAIN)
20242024 mapping_set_error(inode->i_mapping, wdata->result);
fs/cifs/connect.c+1−1
@@ -3630,7 +3630,7 @@ try_mount_again: · 3629 unmodified lines
36303630 cifs_sb->rsize = server->ops->negotiate_rsize(tcon, volume_info);
36313631
36323632 /* tune readahead according to rsize */
3633− cifs_sb->bdi.ra_pages = cifs_sb->rsize / PAGE_CACHE_SIZE;
3633+ cifs_sb->bdi.ra_pages = cifs_sb->rsize / PAGE_SIZE;
36343634
36353635 remote_path_check:
36363636 #ifdef CONFIG_CIFS_DFS_UPCALL
fs/cifs/file.c+47−47
@@ -1833,7 +1833,7 @@ refind_writable: · 1832 unmodified lines
18331833 static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
18341834 {
18351835 struct address_space *mapping = page->mapping;
1836− loff_t offset = (loff_t)page->index << PAGE_CACHE_SHIFT;
1836+ loff_t offset = (loff_t)page->index << PAGE_SHIFT;
18371837 char *write_data;
18381838 int rc = -EFAULT;
18391839 int bytes_written = 0;
@@ -1849,7 +1849,7 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to) · 9 unmodified lines
18491849 write_data = kmap(page);
18501850 write_data += from;
18511851
1852− if ((to > PAGE_CACHE_SIZE) || (from > to)) {
1852+ if ((to > PAGE_SIZE) || (from > to)) {
18531853 kunmap(page);
18541854 return -EIO;
18551855 }
@@ -1991,7 +1991,7 @@ wdata_prepare_pages(struct cifs_writedata *wdata, unsigned int found_pages, · 135 unmodified lines
19911991
19921992 /* put any pages we aren't going to use */
19931993 for (i = nr_pages; i < found_pages; i++) {
1994− page_cache_release(wdata->pages[i]);
1994+ put_page(wdata->pages[i]);
19951995 wdata->pages[i] = NULL;
19961996 }
19971997
@@ -2009,11 +2009,11 @@ wdata_send_pages(struct cifs_writedata *wdata, unsigned int nr_pages, · 11 unmodified lines
20092009 wdata->sync_mode = wbc->sync_mode;
20102010 wdata->nr_pages = nr_pages;
20112011 wdata->offset = page_offset(wdata->pages[0]);
2012− wdata->pagesz = PAGE_CACHE_SIZE;
2012+ wdata->pagesz = PAGE_SIZE;
20132013 wdata->tailsz = min(i_size_read(mapping->host) -
20142014 page_offset(wdata->pages[nr_pages - 1]),
2015− (loff_t)PAGE_CACHE_SIZE);
2016− wdata->bytes = ((nr_pages - 1) * PAGE_CACHE_SIZE) + wdata->tailsz;
2015+ (loff_t)PAGE_SIZE);
2016+ wdata->bytes = ((nr_pages - 1) * PAGE_SIZE) + wdata->tailsz;
20172017
20182018 if (wdata->cfile != NULL)
20192019 cifsFileInfo_put(wdata->cfile);
@@ -2047,15 +2047,15 @@ static int cifs_writepages(struct address_space *mapping, · 27 unmodified lines
20472047 * If wsize is smaller than the page cache size, default to writing
20482048 * one page at a time via cifs_writepage
20492049 */
2050− if (cifs_sb->wsize < PAGE_CACHE_SIZE)
2050+ if (cifs_sb->wsize < PAGE_SIZE)
20512051 return generic_writepages(mapping, wbc);
20522052
20532053 if (wbc->range_cyclic) {
20542054 index = mapping->writeback_index; /* Start from prev offset */
20552055 end = -1;
20562056 } else {
2057− index = wbc->range_start >> PAGE_CACHE_SHIFT;
2058− end = wbc->range_end >> PAGE_CACHE_SHIFT;
2057+ index = wbc->range_start >> PAGE_SHIFT;
2058+ end = wbc->range_end >> PAGE_SHIFT;
20592059 if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
20602060 range_whole = true;
20612061 scanned = true;
@@ -2071,7 +2071,7 @@ retry: · 9 unmodified lines
20712071 if (rc)
20722072 break;
20732073
2074− tofind = min((wsize / PAGE_CACHE_SIZE) - 1, end - index) + 1;
2074+ tofind = min((wsize / PAGE_SIZE) - 1, end - index) + 1;
20752075
20762076 wdata = wdata_alloc_and_fillpages(tofind, mapping, end, &index,
20772077 &found_pages);
@@ -2111,7 +2111,7 @@ retry: · 33 unmodified lines
21112111 else
21122112 SetPageError(wdata->pages[i]);
21132113 end_page_writeback(wdata->pages[i]);
2114− page_cache_release(wdata->pages[i]);
2114+ put_page(wdata->pages[i]);
21152115 }
21162116 if (rc != -EAGAIN)
21172117 mapping_set_error(mapping, rc);
@@ -2154,7 +2154,7 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc) · 36 unmodified lines
21542154
21552155 xid = get_xid();
21562156 /* BB add check for wbc flags */
2157− page_cache_get(page);
2157+ get_page(page);
21582158 if (!PageUptodate(page))
21592159 cifs_dbg(FYI, "ppw - page not up to date\n");
21602160
@@ -2170,7 +2170,7 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc) · 9 unmodified lines
21702170 */
21712171 set_page_writeback(page);
21722172 retry_write:
2173− rc = cifs_partialpagewrite(page, 0, PAGE_CACHE_SIZE);
2173+ rc = cifs_partialpagewrite(page, 0, PAGE_SIZE);
21742174 if (rc == -EAGAIN && wbc->sync_mode == WB_SYNC_ALL)
21752175 goto retry_write;
21762176 else if (rc == -EAGAIN)
@@ -2180,7 +2180,7 @@ retry_write: · 3 unmodified lines
21802180 else
21812181 SetPageUptodate(page);
21822182 end_page_writeback(page);
2183− page_cache_release(page);
2183+ put_page(page);
21842184 free_xid(xid);
21852185 return rc;
21862186 }
@@ -2214,12 +2214,12 @@ static int cifs_write_end(struct file *file, struct address_space *mapping, · 27 unmodified lines
22142214 if (copied == len)
22152215 SetPageUptodate(page);
22162216 ClearPageChecked(page);
2217− } else if (!PageUptodate(page) && copied == PAGE_CACHE_SIZE)
2217+ } else if (!PageUptodate(page) && copied == PAGE_SIZE)
22182218 SetPageUptodate(page);
22192219
22202220 if (!PageUptodate(page)) {
22212221 char *page_data;
2222− unsigned offset = pos & (PAGE_CACHE_SIZE - 1);
2222+ unsigned offset = pos & (PAGE_SIZE - 1);
22232223 unsigned int xid;
22242224
22252225 xid = get_xid();
@@ -2248,7 +2248,7 @@ static int cifs_write_end(struct file *file, struct address_space *mapping, · 22 unmodified lines
22482248 }
22492249
22502250 unlock_page(page);
2251− page_cache_release(page);
2251+ put_page(page);
22522252
22532253 return rc;
22542254 }
@@ -3286,9 +3286,9 @@ cifs_readv_complete(struct work_struct *work) · 1031 unmodified lines
32863286 (rdata->result == -EAGAIN && got_bytes))
32873287 cifs_readpage_to_fscache(rdata->mapping->host, page);
32883288
3289− got_bytes -= min_t(unsigned int, PAGE_CACHE_SIZE, got_bytes);
3289+ got_bytes -= min_t(unsigned int, PAGE_SIZE, got_bytes);
32903290
3291− page_cache_release(page);
3291+ put_page(page);
32923292 rdata->pages[i] = NULL;
32933293 }
32943294 kref_put(&rdata->refcount, cifs_readdata_release);
@@ -3307,21 +3307,21 @@ cifs_readpages_read_into_pages(struct TCP_Server_Info *server, · 12 unmodified lines
33073307
33083308 /* determine the eof that the server (probably) has */
33093309 eof = CIFS_I(rdata->mapping->host)->server_eof;
3310− eof_index = eof ? (eof - 1) >> PAGE_CACHE_SHIFT : 0;
3310+ eof_index = eof ? (eof - 1) >> PAGE_SHIFT : 0;
33113311 cifs_dbg(FYI, "eof=%llu eof_index=%lu\n", eof, eof_index);
33123312
33133313 rdata->got_bytes = 0;
3314− rdata->tailsz = PAGE_CACHE_SIZE;
3314+ rdata->tailsz = PAGE_SIZE;
33153315 for (i = 0; i < nr_pages; i++) {
33163316 struct page *page = rdata->pages[i];
33173317
3318− if (len >= PAGE_CACHE_SIZE) {
3318+ if (len >= PAGE_SIZE) {
33193319 /* enough data to fill the page */
33203320 iov.iov_base = kmap(page);
3321− iov.iov_len = PAGE_CACHE_SIZE;
3321+ iov.iov_len = PAGE_SIZE;
33223322 cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n",
33233323 i, page->index, iov.iov_base, iov.iov_len);
3324− len -= PAGE_CACHE_SIZE;
3324+ len -= PAGE_SIZE;
33253325 } else if (len > 0) {
33263326 /* enough for partial page, fill and zero the rest */
33273327 iov.iov_base = kmap(page);
@@ -3329,7 +3329,7 @@ cifs_readpages_read_into_pages(struct TCP_Server_Info *server, · 1 unmodified line
33293329 cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n",
33303330 i, page->index, iov.iov_base, iov.iov_len);
33313331 memset(iov.iov_base + len,
3332− '\0', PAGE_CACHE_SIZE - len);
3332+ '\0', PAGE_SIZE - len);
33333333 rdata->tailsz = len;
33343334 len = 0;
33353335 } else if (page->index > eof_index) {
@@ -3341,12 +3341,12 @@ cifs_readpages_read_into_pages(struct TCP_Server_Info *server, · 5 unmodified lines
33413341 * to prevent the VFS from repeatedly attempting to
33423342 * fill them until the writes are flushed.
33433343 */
3344− zero_user(page, 0, PAGE_CACHE_SIZE);
3344+ zero_user(page, 0, PAGE_SIZE);
33453345 lru_cache_add_file(page);
33463346 flush_dcache_page(page);
33473347 SetPageUptodate(page);
33483348 unlock_page(page);
3349− page_cache_release(page);
3349+ put_page(page);
33503350 rdata->pages[i] = NULL;
33513351 rdata->nr_pages--;
33523352 continue;
@@ -3354,7 +3354,7 @@ cifs_readpages_read_into_pages(struct TCP_Server_Info *server, · 1 unmodified line
33543354 /* no need to hold page hostage */
33553355 lru_cache_add_file(page);
33563356 unlock_page(page);
3357− page_cache_release(page);
3357+ put_page(page);
33583358 rdata->pages[i] = NULL;
33593359 rdata->nr_pages--;
33603360 continue;
@@ -3402,8 +3402,8 @@ readpages_get_pages(struct address_space *mapping, struct list_head *page_list, · 41 unmodified lines
34023402 }
34033403
34043404 /* move first page to the tmplist */
3405− *offset = (loff_t)page->index << PAGE_CACHE_SHIFT;
3406− *bytes = PAGE_CACHE_SIZE;
3405+ *offset = (loff_t)page->index << PAGE_SHIFT;
3406+ *bytes = PAGE_SIZE;
34073407 *nr_pages = 1;
34083408 list_move_tail(&page->lru, tmplist);
34093409
@@ -3415,7 +3415,7 @@ readpages_get_pages(struct address_space *mapping, struct list_head *page_list, · 5 unmodified lines
34153415 break;
34163416
34173417 /* would this page push the read over the rsize? */
3418− if (*bytes + PAGE_CACHE_SIZE > rsize)
3418+ if (*bytes + PAGE_SIZE > rsize)
34193419 break;
34203420
34213421 __SetPageLocked(page);
@@ -3424,7 +3424,7 @@ readpages_get_pages(struct address_space *mapping, struct list_head *page_list, · 2 unmodified lines
34243424 break;
34253425 }
34263426 list_move_tail(&page->lru, tmplist);
3427− (*bytes) += PAGE_CACHE_SIZE;
3427+ (*bytes) += PAGE_SIZE;
34283428 expected_index++;
34293429 (*nr_pages)++;
34303430 }
@@ -3493,7 +3493,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, · 62 unmodified lines
34933493 * reach this point however since we set ra_pages to 0 when the
34943494 * rsize is smaller than a cache page.
34953495 */
3496− if (unlikely(rsize < PAGE_CACHE_SIZE)) {
3496+ if (unlikely(rsize < PAGE_SIZE)) {
34973497 add_credits_and_wake_if(server, credits, 0);
34983498 return 0;
34993499 }
@@ -3512,7 +3512,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, · 12 unmodified lines
35123512 list_del(&page->lru);
35133513 lru_cache_add_file(page);
35143514 unlock_page(page);
3515− page_cache_release(page);
3515+ put_page(page);
35163516 }
35173517 rc = -ENOMEM;
35183518 add_credits_and_wake_if(server, credits, 0);
@@ -3524,7 +3524,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, · 5 unmodified lines
35243524 rdata->offset = offset;
35253525 rdata->bytes = bytes;
35263526 rdata->pid = pid;
3527− rdata->pagesz = PAGE_CACHE_SIZE;
3527+ rdata->pagesz = PAGE_SIZE;
35283528 rdata->read_into_pages = cifs_readpages_read_into_pages;
35293529 rdata->credits = credits;
35303530
@@ -3542,7 +3542,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, · 11 unmodified lines
35423542 page = rdata->pages[i];
35433543 lru_cache_add_file(page);
35443544 unlock_page(page);
3545− page_cache_release(page);
3545+ put_page(page);
35463546 }
35473547 /* Fallback to the readpage in error/reconnect cases */
35483548 kref_put(&rdata->refcount, cifs_readdata_release);
@@ -3577,7 +3577,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page, · 28 unmodified lines
35773577 read_data = kmap(page);
35783578 /* for reads over a certain size could initiate async read ahead */
35793579
3580− rc = cifs_read(file, read_data, PAGE_CACHE_SIZE, poffset);
3580+ rc = cifs_read(file, read_data, PAGE_SIZE, poffset);
35813581
35823582 if (rc < 0)
35833583 goto io_error;
@@ -3587,8 +3587,8 @@ static int cifs_readpage_worker(struct file *file, struct page *page, · 3 unmodified lines
35873587 file_inode(file)->i_atime =
35883588 current_fs_time(file_inode(file)->i_sb);
35893589
3590− if (PAGE_CACHE_SIZE > rc)
3591− memset(read_data + rc, 0, PAGE_CACHE_SIZE - rc);
3590+ if (PAGE_SIZE > rc)
3591+ memset(read_data + rc, 0, PAGE_SIZE - rc);
35923592
35933593 flush_dcache_page(page);
35943594 SetPageUptodate(page);
@@ -3608,7 +3608,7 @@ read_complete: · 13 unmodified lines
36083608
36093609 static int cifs_readpage(struct file *file, struct page *page)
36103610 {
3611− loff_t offset = (loff_t)page->index << PAGE_CACHE_SHIFT;
3611+ loff_t offset = (loff_t)page->index << PAGE_SHIFT;
36123612 int rc = -EACCES;
36133613 unsigned int xid;
36143614
@@ -3679,8 +3679,8 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping, · 64 unmodified lines
36793679 struct page **pagep, void **fsdata)
36803680 {
36813681 int oncethru = 0;
3682− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
3683− loff_t offset = pos & (PAGE_CACHE_SIZE - 1);
3682+ pgoff_t index = pos >> PAGE_SHIFT;
3683+ loff_t offset = pos & (PAGE_SIZE - 1);
36843684 loff_t page_start = pos & PAGE_MASK;
36853685 loff_t i_size;
36863686 struct page *page;
@@ -3703,7 +3703,7 @@ start: · 16 unmodified lines
37033703 * the server. If the write is short, we'll end up doing a sync write
37043704 * instead.
37053705 */
3706− if (len == PAGE_CACHE_SIZE)
3706+ if (len == PAGE_SIZE)
37073707 goto out;
37083708
37093709 /*
@@ -3718,7 +3718,7 @@ start: · 8 unmodified lines
37183718 (offset == 0 && (pos + len) >= i_size)) {
37193719 zero_user_segments(page, 0, offset,
37203720 offset + len,
3721− PAGE_CACHE_SIZE);
3721+ PAGE_SIZE);
37223722 /*
37233723 * PageChecked means that the parts of the page
37243724 * to which we're not writing are considered up
@@ -3737,7 +3737,7 @@ start: · 12 unmodified lines
37373737 * do a sync write instead since PG_uptodate isn't set.
37383738 */
37393739 cifs_readpage_worker(file, page, &page_start);
3740− page_cache_release(page);
3740+ put_page(page);
37413741 oncethru = 1;
37423742 goto start;
37433743 } else {
@@ -3764,7 +3764,7 @@ static void cifs_invalidate_page(struct page *page, unsigned int offset, · 20 unmodified lines
37643764 {
37653765 struct cifsInodeInfo *cifsi = CIFS_I(page->mapping->host);
37663766
3767− if (offset == 0 && length == PAGE_CACHE_SIZE)
3767+ if (offset == 0 && length == PAGE_SIZE)
37683768 cifs_fscache_invalidate_page(page, &cifsi->vfs_inode);
37693769 }
37703770
@@ -3772,7 +3772,7 @@ static int cifs_launder_page(struct page *page) · 1 unmodified line
37723772 {
37733773 int rc = 0;
37743774 loff_t range_start = page_offset(page);
3775− loff_t range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1);
3775+ loff_t range_end = range_start + (loff_t)(PAGE_SIZE - 1);
37763776 struct writeback_control wbc = {
37773777 .sync_mode = WB_SYNC_ALL,
37783778 .nr_to_write = 0,
fs/cifs/inode.c+5−5
@@ -59,7 +59,7 @@ static void cifs_set_ops(struct inode *inode) · 58 unmodified lines
5959
6060 /* check if server can support readpages */
6161 if (cifs_sb_master_tcon(cifs_sb)->ses->server->maxBuf <
62− PAGE_CACHE_SIZE + MAX_CIFS_HDR_SIZE)
62+ PAGE_SIZE + MAX_CIFS_HDR_SIZE)
6363 inode->i_data.a_ops = &cifs_addr_ops_smallbuf;
6464 else
6565 inode->i_data.a_ops = &cifs_addr_ops;
@@ -2019,8 +2019,8 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, · 1953 unmodified lines
20192019
20202020 static int cifs_truncate_page(struct address_space *mapping, loff_t from)
20212021 {
2022− pgoff_t index = from >> PAGE_CACHE_SHIFT;
2023− unsigned offset = from & (PAGE_CACHE_SIZE - 1);
2022+ pgoff_t index = from >> PAGE_SHIFT;
2023+ unsigned offset = from & (PAGE_SIZE - 1);
20242024 struct page *page;
20252025 int rc = 0;
20262026
@@ -2028,9 +2028,9 @@ static int cifs_truncate_page(struct address_space *mapping, loff_t from) · 1 unmodified line
20282028 if (!page)
20292029 return -ENOMEM;
20302030
2031− zero_user_segment(page, offset, PAGE_CACHE_SIZE);
2031+ zero_user_segment(page, offset, PAGE_SIZE);
20322032 unlock_page(page);
2033− page_cache_release(page);
2033+ put_page(page);
20342034 return rc;
20352035 }
20362036
fs/configfs/mount.c+2−2
@@ -71,8 +71,8 @@ static int configfs_fill_super(struct super_block *sb, void *data, int silent) · 70 unmodified lines
7171 struct inode *inode;
7272 struct dentry *root;
7373
74− sb->s_blocksize = PAGE_CACHE_SIZE;
75− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
74+ sb->s_blocksize = PAGE_SIZE;
75+ sb->s_blocksize_bits = PAGE_SHIFT;
7676 sb->s_magic = CONFIGFS_MAGIC;
7777 sb->s_op = &configfs_ops;
7878 sb->s_time_gran = 1;
fs/cramfs/inode.c+15−15
@@ -152,7 +152,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb, · 151 unmodified lines
152152 */
153153 #define BLKS_PER_BUF_SHIFT (2)
154154 #define BLKS_PER_BUF (1 << BLKS_PER_BUF_SHIFT)
155−#define BUFFER_SIZE (BLKS_PER_BUF*PAGE_CACHE_SIZE)
155+#define BUFFER_SIZE (BLKS_PER_BUF*PAGE_SIZE)
156156
157157 static unsigned char read_buffers[READ_BUFFERS][BUFFER_SIZE];
158158 static unsigned buffer_blocknr[READ_BUFFERS];
@@ -173,8 +173,8 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i · 14 unmodified lines
173173
174174 if (!len)
175175 return NULL;
176− blocknr = offset >> PAGE_CACHE_SHIFT;
177− offset &= PAGE_CACHE_SIZE - 1;
176+ blocknr = offset >> PAGE_SHIFT;
177+ offset &= PAGE_SIZE - 1;
178178
179179 /* Check if an existing buffer already has the data.. */
180180 for (i = 0; i < READ_BUFFERS; i++) {
@@ -184,14 +184,14 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i · 3 unmodified lines
184184 continue;
185185 if (blocknr < buffer_blocknr[i])
186186 continue;
187− blk_offset = (blocknr - buffer_blocknr[i]) << PAGE_CACHE_SHIFT;
187+ blk_offset = (blocknr - buffer_blocknr[i]) << PAGE_SHIFT;
188188 blk_offset += offset;
189189 if (blk_offset + len > BUFFER_SIZE)
190190 continue;
191191 return read_buffers[i] + blk_offset;
192192 }
193193
194− devsize = mapping->host->i_size >> PAGE_CACHE_SHIFT;
194+ devsize = mapping->host->i_size >> PAGE_SHIFT;
195195
196196 /* Ok, read in BLKS_PER_BUF pages completely first. */
197197 for (i = 0; i < BLKS_PER_BUF; i++) {
@@ -213,7 +213,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i · 15 unmodified lines
213213 wait_on_page_locked(page);
214214 if (!PageUptodate(page)) {
215215 /* asynchronous error */
216− page_cache_release(page);
216+ put_page(page);
217217 pages[i] = NULL;
218218 }
219219 }
@@ -229,12 +229,12 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i · 9 unmodified lines
229229 struct page *page = pages[i];
230230
231231 if (page) {
232− memcpy(data, kmap(page), PAGE_CACHE_SIZE);
232+ memcpy(data, kmap(page), PAGE_SIZE);
233233 kunmap(page);
234− page_cache_release(page);
234+ put_page(page);
235235 } else
236− memset(data, 0, PAGE_CACHE_SIZE);
237− data += PAGE_CACHE_SIZE;
236+ memset(data, 0, PAGE_SIZE);
237+ data += PAGE_SIZE;
238238 }
239239 return read_buffers[buffer] + offset;
240240 }
@@ -353,7 +353,7 @@ static int cramfs_statfs(struct dentry *dentry, struct kstatfs *buf) · 112 unmodified lines
353353 u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
354354
355355 buf->f_type = CRAMFS_MAGIC;
356− buf->f_bsize = PAGE_CACHE_SIZE;
356+ buf->f_bsize = PAGE_SIZE;
357357 buf->f_blocks = CRAMFS_SB(sb)->blocks;
358358 buf->f_bfree = 0;
359359 buf->f_bavail = 0;
@@ -496,7 +496,7 @@ static int cramfs_readpage(struct file *file, struct page *page) · 136 unmodified lines
496496 int bytes_filled;
497497 void *pgdata;
498498
499− maxblock = (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
499+ maxblock = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
500500 bytes_filled = 0;
501501 pgdata = kmap(page);
502502
@@ -516,14 +516,14 @@ static int cramfs_readpage(struct file *file, struct page *page) · 13 unmodified lines
516516
517517 if (compr_len == 0)
518518 ; /* hole */
519− else if (unlikely(compr_len > (PAGE_CACHE_SIZE << 1))) {
519+ else if (unlikely(compr_len > (PAGE_SIZE << 1))) {
520520 pr_err("bad compressed blocksize %u\n",
521521 compr_len);
522522 goto err;
523523 } else {
524524 mutex_lock(&read_mutex);
525525 bytes_filled = cramfs_uncompress_block(pgdata,
526− PAGE_CACHE_SIZE,
526+ PAGE_SIZE,
527527 cramfs_read(sb, start_offset, compr_len),
528528 compr_len);
529529 mutex_unlock(&read_mutex);
@@ -532,7 +532,7 @@ static int cramfs_readpage(struct file *file, struct page *page) · 2 unmodified lines
532532 }
533533 }
534534
535− memset(pgdata + bytes_filled, 0, PAGE_CACHE_SIZE - bytes_filled);
535+ memset(pgdata + bytes_filled, 0, PAGE_SIZE - bytes_filled);
536536 flush_dcache_page(page);
537537 kunmap(page);
538538 SetPageUptodate(page);
fs/crypto/crypto.c+4−4
@@ -175,10 +175,10 @@ static int do_page_crypto(struct inode *inode, · 174 unmodified lines
175175 FS_XTS_TWEAK_SIZE - sizeof(index));
176176
177177 sg_init_table(&dst, 1);
178− sg_set_page(&dst, dest_page, PAGE_CACHE_SIZE, 0);
178+ sg_set_page(&dst, dest_page, PAGE_SIZE, 0);
179179 sg_init_table(&src, 1);
180− sg_set_page(&src, src_page, PAGE_CACHE_SIZE, 0);
181− skcipher_request_set_crypt(req, &src, &dst, PAGE_CACHE_SIZE,
180+ sg_set_page(&src, src_page, PAGE_SIZE, 0);
181+ skcipher_request_set_crypt(req, &src, &dst, PAGE_SIZE,
182182 xts_tweak);
183183 if (rw == FS_DECRYPT)
184184 res = crypto_skcipher_decrypt(req);
@@ -287,7 +287,7 @@ int fscrypt_zeroout_range(struct inode *inode, pgoff_t lblk, · 102 unmodified lines
287287 struct bio *bio;
288288 int ret, err = 0;
289289
290− BUG_ON(inode->i_sb->s_blocksize != PAGE_CACHE_SIZE);
290+ BUG_ON(inode->i_sb->s_blocksize != PAGE_SIZE);
291291
292292 ctx = fscrypt_get_ctx(inode);
293293 if (IS_ERR(ctx))
fs/dax.c+15−15
@@ -323,7 +323,7 @@ static int dax_load_hole(struct address_space *mapping, struct page *page, · 322 unmodified lines
323323 size = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT;
324324 if (vmf->pgoff >= size) {
325325 unlock_page(page);
326− page_cache_release(page);
326+ put_page(page);
327327 return VM_FAULT_SIGBUS;
328328 }
329329
@@ -351,7 +351,7 @@ static int copy_user_bh(struct page *to, struct inode *inode, · 21 unmodified lines
351351 }
352352
353353 #define NO_SECTOR -1
354−#define DAX_PMD_INDEX(page_index) (page_index & (PMD_MASK >> PAGE_CACHE_SHIFT))
354+#define DAX_PMD_INDEX(page_index) (page_index & (PMD_MASK >> PAGE_SHIFT))
355355
356356 static int dax_radix_entry(struct address_space *mapping, pgoff_t index,
357357 sector_t sector, bool pmd_entry, bool dirty)
@@ -506,8 +506,8 @@ int dax_writeback_mapping_range(struct address_space *mapping, · 148 unmodified lines
506506 if (!mapping->nrexceptional || wbc->sync_mode != WB_SYNC_ALL)
507507 return 0;
508508
509− start_index = wbc->range_start >> PAGE_CACHE_SHIFT;
510− end_index = wbc->range_end >> PAGE_CACHE_SHIFT;
509+ start_index = wbc->range_start >> PAGE_SHIFT;
510+ end_index = wbc->range_end >> PAGE_SHIFT;
511511 pmd_index = DAX_PMD_INDEX(start_index);
512512
513513 rcu_read_lock();
@@ -642,12 +642,12 @@ int __dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf, · 128 unmodified lines
642642 page = find_get_page(mapping, vmf->pgoff);
643643 if (page) {
644644 if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags)) {
645− page_cache_release(page);
645+ put_page(page);
646646 return VM_FAULT_RETRY;
647647 }
648648 if (unlikely(page->mapping != mapping)) {
649649 unlock_page(page);
650− page_cache_release(page);
650+ put_page(page);
651651 goto repeat;
652652 }
653653 size = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT;
@@ -711,10 +711,10 @@ int __dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf, · 57 unmodified lines
711711
712712 if (page) {
713713 unmap_mapping_range(mapping, vmf->pgoff << PAGE_SHIFT,
714− PAGE_CACHE_SIZE, 0);
714+ PAGE_SIZE, 0);
715715 delete_from_page_cache(page);
716716 unlock_page(page);
717− page_cache_release(page);
717+ put_page(page);
718718 page = NULL;
719719 }
720720
@@ -747,7 +747,7 @@ int __dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf, · 26 unmodified lines
747747 unlock_page:
748748 if (page) {
749749 unlock_page(page);
750− page_cache_release(page);
750+ put_page(page);
751751 }
752752 goto out;
753753 }
@@ -1104,18 +1104,18 @@ int dax_zero_page_range(struct inode *inode, loff_t from, unsigned length, · 350 unmodified lines
11041104 get_block_t get_block)
11051105 {
11061106 struct buffer_head bh;
1107− pgoff_t index = from >> PAGE_CACHE_SHIFT;
1108− unsigned offset = from & (PAGE_CACHE_SIZE-1);
1107+ pgoff_t index = from >> PAGE_SHIFT;
1108+ unsigned offset = from & (PAGE_SIZE-1);
11091109 int err;
11101110
11111111 /* Block boundary? Nothing to do */
11121112 if (!length)
11131113 return 0;
1114− BUG_ON((offset + length) > PAGE_CACHE_SIZE);
1114+ BUG_ON((offset + length) > PAGE_SIZE);
11151115
11161116 memset(&bh, 0, sizeof(bh));
11171117 bh.b_bdev = inode->i_sb->s_bdev;
1118− bh.b_size = PAGE_CACHE_SIZE;
1118+ bh.b_size = PAGE_SIZE;
11191119 err = get_block(inode, index, &bh, 0);
11201120 if (err < 0)
11211121 return err;
@@ -1123,7 +1123,7 @@ int dax_zero_page_range(struct inode *inode, loff_t from, unsigned length, · 1 unmodified line
11231123 struct block_device *bdev = bh.b_bdev;
11241124 struct blk_dax_ctl dax = {
11251125 .sector = to_sector(&bh, inode),
1126− .size = PAGE_CACHE_SIZE,
1126+ .size = PAGE_SIZE,
11271127 };
11281128
11291129 if (dax_map_atomic(bdev, &dax) < 0)
@@ -1154,7 +1154,7 @@ EXPORT_SYMBOL_GPL(dax_zero_page_range); · 24 unmodified lines
11541154 */
11551155 int dax_truncate_page(struct inode *inode, loff_t from, get_block_t get_block)
11561156 {
1157− unsigned length = PAGE_CACHE_ALIGN(from) - from;
1157+ unsigned length = PAGE_ALIGN(from) - from;
11581158 return dax_zero_page_range(inode, from, length, get_block);
11591159 }
11601160 EXPORT_SYMBOL_GPL(dax_truncate_page);
fs/direct-io.c+13−13
@@ -172,7 +172,7 @@ static inline int dio_refill_pages(struct dio *dio, struct dio_submit *sdio) · 171 unmodified lines
172172 */
173173 if (dio->page_errors == 0)
174174 dio->page_errors = ret;
175− page_cache_get(page);
175+ get_page(page);
176176 dio->pages[0] = page;
177177 sdio->head = 0;
178178 sdio->tail = 1;
@@ -424,7 +424,7 @@ static inline void dio_bio_submit(struct dio *dio, struct dio_submit *sdio) · 245 unmodified lines
424424 static inline void dio_cleanup(struct dio *dio, struct dio_submit *sdio)
425425 {
426426 while (sdio->head < sdio->tail)
427− page_cache_release(dio->pages[sdio->head++]);
427+ put_page(dio->pages[sdio->head++]);
428428 }
429429
430430 /*
@@ -487,7 +487,7 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio) · 56 unmodified lines
487487 if (dio->rw == READ && !PageCompound(page) &&
488488 dio->should_dirty)
489489 set_page_dirty_lock(page);
490− page_cache_release(page);
490+ put_page(page);
491491 }
492492 err = bio->bi_error;
493493 bio_put(bio);
@@ -696,7 +696,7 @@ static inline int dio_bio_add_page(struct dio_submit *sdio) · 202 unmodified lines
696696 */
697697 if ((sdio->cur_page_len + sdio->cur_page_offset) == PAGE_SIZE)
698698 sdio->pages_in_io--;
699− page_cache_get(sdio->cur_page);
699+ get_page(sdio->cur_page);
700700 sdio->final_block_in_bio = sdio->cur_page_block +
701701 (sdio->cur_page_len >> sdio->blkbits);
702702 ret = 0;
@@ -810,13 +810,13 @@ submit_page_section(struct dio *dio, struct dio_submit *sdio, struct page *page, · 107 unmodified lines
810810 */
811811 if (sdio->cur_page) {
812812 ret = dio_send_cur_page(dio, sdio, map_bh);
813− page_cache_release(sdio->cur_page);
813+ put_page(sdio->cur_page);
814814 sdio->cur_page = NULL;
815815 if (ret)
816816 return ret;
817817 }
818818
819− page_cache_get(page); /* It is in dio */
819+ get_page(page); /* It is in dio */
820820 sdio->cur_page = page;
821821 sdio->cur_page_offset = offset;
822822 sdio->cur_page_len = len;
@@ -830,7 +830,7 @@ out: · 7 unmodified lines
830830 if (sdio->boundary) {
831831 ret = dio_send_cur_page(dio, sdio, map_bh);
832832 dio_bio_submit(dio, sdio);
833− page_cache_release(sdio->cur_page);
833+ put_page(sdio->cur_page);
834834 sdio->cur_page = NULL;
835835 }
836836 return ret;
@@ -947,7 +947,7 @@ static int do_direct_IO(struct dio *dio, struct dio_submit *sdio, · 110 unmodified lines
947947
948948 ret = get_more_blocks(dio, sdio, map_bh);
949949 if (ret) {
950− page_cache_release(page);
950+ put_page(page);
951951 goto out;
952952 }
953953 if (!buffer_mapped(map_bh))
@@ -988,7 +988,7 @@ do_holes: · 34 unmodified lines
988988
989989 /* AKPM: eargh, -ENOTBLK is a hack */
990990 if (dio->rw & WRITE) {
991− page_cache_release(page);
991+ put_page(page);
992992 return -ENOTBLK;
993993 }
994994
@@ -1001,7 +1001,7 @@ do_holes: · 6 unmodified lines
10011001 if (sdio->block_in_file >=
10021002 i_size_aligned >> blkbits) {
10031003 /* We hit eof */
1004− page_cache_release(page);
1004+ put_page(page);
10051005 goto out;
10061006 }
10071007 zero_user(page, from, 1 << blkbits);
@@ -1041,7 +1041,7 @@ do_holes: · 33 unmodified lines
10411041 sdio->next_block_for_io,
10421042 map_bh);
10431043 if (ret) {
1044− page_cache_release(page);
1044+ put_page(page);
10451045 goto out;
10461046 }
10471047 sdio->next_block_for_io += this_chunk_blocks;
@@ -1057,7 +1057,7 @@ next_block: · 9 unmodified lines
10571057 }
10581058
10591059 /* Drop the ref which was taken in get_user_pages() */
1060− page_cache_release(page);
1060+ put_page(page);
10611061 }
10621062 out:
10631063 return ret;
@@ -1281,7 +1281,7 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, · 217 unmodified lines
12811281 ret2 = dio_send_cur_page(dio, &sdio, &map_bh);
12821282 if (retval == 0)
12831283 retval = ret2;
1284− page_cache_release(sdio.cur_page);
1284+ put_page(sdio.cur_page);
12851285 sdio.cur_page = NULL;
12861286 }
12871287 if (sdio.bio)
fs/dlm/lowcomms.c+4−4
@@ -640,7 +640,7 @@ static int receive_from_sock(struct connection *con) · 639 unmodified lines
640640 con->rx_page = alloc_page(GFP_ATOMIC);
641641 if (con->rx_page == NULL)
642642 goto out_resched;
643− cbuf_init(&con->cb, PAGE_CACHE_SIZE);
643+ cbuf_init(&con->cb, PAGE_SIZE);
644644 }
645645
646646 /*
@@ -657,7 +657,7 @@ static int receive_from_sock(struct connection *con) · 10 unmodified lines
657657 * buffer and the start of the currently used section (cb.base)
658658 */
659659 if (cbuf_data(&con->cb) >= con->cb.base) {
660− iov[0].iov_len = PAGE_CACHE_SIZE - cbuf_data(&con->cb);
660+ iov[0].iov_len = PAGE_SIZE - cbuf_data(&con->cb);
661661 iov[1].iov_len = con->cb.base;
662662 iov[1].iov_base = page_address(con->rx_page);
663663 nvec = 2;
@@ -675,7 +675,7 @@ static int receive_from_sock(struct connection *con) · 11 unmodified lines
675675 ret = dlm_process_incoming_buffer(con->nodeid,
676676 page_address(con->rx_page),
677677 con->cb.base, con->cb.len,
678− PAGE_CACHE_SIZE);
678+ PAGE_SIZE);
679679 if (ret == -EBADMSG) {
680680 log_print("lowcomms: addr=%p, base=%u, len=%u, read=%d",
681681 page_address(con->rx_page), con->cb.base,
@@ -1416,7 +1416,7 @@ void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc) · 734 unmodified lines
14161416 spin_lock(&con->writequeue_lock);
14171417 e = list_entry(con->writequeue.prev, struct writequeue_entry, list);
14181418 if ((&e->list == &con->writequeue) ||
1419− (PAGE_CACHE_SIZE - e->end < len)) {
1419+ (PAGE_SIZE - e->end < len)) {
14201420 e = NULL;
14211421 } else {
14221422 offset = e->end;
fs/ecryptfs/crypto.c+11−11
@@ -286,7 +286,7 @@ int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg, · 285 unmodified lines
286286 pg = virt_to_page(addr);
287287 offset = offset_in_page(addr);
288288 sg_set_page(&sg[i], pg, 0, offset);
289− remainder_of_page = PAGE_CACHE_SIZE - offset;
289+ remainder_of_page = PAGE_SIZE - offset;
290290 if (size >= remainder_of_page) {
291291 sg[i].length = remainder_of_page;
292292 addr += remainder_of_page;
@@ -400,7 +400,7 @@ static loff_t lower_offset_for_page(struct ecryptfs_crypt_stat *crypt_stat, · 107 unmodified lines
400400 struct page *page)
401401 {
402402 return ecryptfs_lower_header_size(crypt_stat) +
403− ((loff_t)page->index << PAGE_CACHE_SHIFT);
403+ ((loff_t)page->index << PAGE_SHIFT);
404404 }
405405
406406 /**
@@ -428,7 +428,7 @@ static int crypt_extent(struct ecryptfs_crypt_stat *crypt_stat, · 21 unmodified lines
428428 size_t extent_size = crypt_stat->extent_size;
429429 int rc;
430430
431− extent_base = (((loff_t)page_index) * (PAGE_CACHE_SIZE / extent_size));
431+ extent_base = (((loff_t)page_index) * (PAGE_SIZE / extent_size));
432432 rc = ecryptfs_derive_iv(extent_iv, crypt_stat,
433433 (extent_base + extent_offset));
434434 if (rc) {
@@ -498,7 +498,7 @@ int ecryptfs_encrypt_page(struct page *page) · 63 unmodified lines
498498 }
499499
500500 for (extent_offset = 0;
501− extent_offset < (PAGE_CACHE_SIZE / crypt_stat->extent_size);
501+ extent_offset < (PAGE_SIZE / crypt_stat->extent_size);
502502 extent_offset++) {
503503 rc = crypt_extent(crypt_stat, enc_extent_page, page,
504504 extent_offset, ENCRYPT);
@@ -512,7 +512,7 @@ int ecryptfs_encrypt_page(struct page *page) · 7 unmodified lines
512512 lower_offset = lower_offset_for_page(crypt_stat, page);
513513 enc_extent_virt = kmap(enc_extent_page);
514514 rc = ecryptfs_write_lower(ecryptfs_inode, enc_extent_virt, lower_offset,
515− PAGE_CACHE_SIZE);
515+ PAGE_SIZE);
516516 kunmap(enc_extent_page);
517517 if (rc < 0) {
518518 ecryptfs_printk(KERN_ERR,
@@ -560,7 +560,7 @@ int ecryptfs_decrypt_page(struct page *page) · 41 unmodified lines
560560
561561 lower_offset = lower_offset_for_page(crypt_stat, page);
562562 page_virt = kmap(page);
563− rc = ecryptfs_read_lower(page_virt, lower_offset, PAGE_CACHE_SIZE,
563+ rc = ecryptfs_read_lower(page_virt, lower_offset, PAGE_SIZE,
564564 ecryptfs_inode);
565565 kunmap(page);
566566 if (rc < 0) {
@@ -571,7 +571,7 @@ int ecryptfs_decrypt_page(struct page *page) · 4 unmodified lines
571571 }
572572
573573 for (extent_offset = 0;
574− extent_offset < (PAGE_CACHE_SIZE / crypt_stat->extent_size);
574+ extent_offset < (PAGE_SIZE / crypt_stat->extent_size);
575575 extent_offset++) {
576576 rc = crypt_extent(crypt_stat, page, page,
577577 extent_offset, DECRYPT);
@@ -659,11 +659,11 @@ void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat) · 81 unmodified lines
659659 if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR)
660660 crypt_stat->metadata_size = ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE;
661661 else {
662− if (PAGE_CACHE_SIZE <= ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE)
662+ if (PAGE_SIZE <= ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE)
663663 crypt_stat->metadata_size =
664664 ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE;
665665 else
666− crypt_stat->metadata_size = PAGE_CACHE_SIZE;
666+ crypt_stat->metadata_size = PAGE_SIZE;
667667 }
668668 }
669669
@@ -1442,7 +1442,7 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry) · 772 unmodified lines
14421442 ECRYPTFS_VALIDATE_HEADER_SIZE);
14431443 if (rc) {
14441444 /* metadata is not in the file header, so try xattrs */
1445− memset(page_virt, 0, PAGE_CACHE_SIZE);
1445+ memset(page_virt, 0, PAGE_SIZE);
14461446 rc = ecryptfs_read_xattr_region(page_virt, ecryptfs_inode);
14471447 if (rc) {
14481448 printk(KERN_DEBUG "Valid eCryptfs headers not found in "
@@ -1475,7 +1475,7 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry) · 26 unmodified lines
14751475 }
14761476 out:
14771477 if (page_virt) {
1478− memset(page_virt, 0, PAGE_CACHE_SIZE);
1478+ memset(page_virt, 0, PAGE_SIZE);
14791479 kmem_cache_free(ecryptfs_header_cache, page_virt);
14801480 }
14811481 return rc;
fs/ecryptfs/inode.c+2−2
@@ -765,8 +765,8 @@ static int truncate_upper(struct dentry *dentry, struct iattr *ia, · 764 unmodified lines
765765 * in which ia->ia_size is located. Fill in the end of
766766 * that page from (ia->ia_size & ~PAGE_CACHE_MASK) to
767767 * PAGE_CACHE_SIZE with zeros. */
768− size_t num_zeros = (PAGE_CACHE_SIZE
769− - (ia->ia_size & ~PAGE_CACHE_MASK));
768+ size_t num_zeros = (PAGE_SIZE
769+ - (ia->ia_size & ~PAGE_MASK));
770770
771771 if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) {
772772 truncate_setsize(inode, ia->ia_size);
fs/ecryptfs/keystore.c+1−1
@@ -1798,7 +1798,7 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat, · 1797 unmodified lines
17981798 * added the our &auth_tok_list */
17991799 next_packet_is_auth_tok_packet = 1;
18001800 while (next_packet_is_auth_tok_packet) {
1801− size_t max_packet_size = ((PAGE_CACHE_SIZE - 8) - i);
1801+ size_t max_packet_size = ((PAGE_SIZE - 8) - i);
18021802
18031803 switch (src[i]) {
18041804 case ECRYPTFS_TAG_3_PACKET_TYPE:
fs/ecryptfs/main.c+4−4
@@ -695,12 +695,12 @@ static struct ecryptfs_cache_info { · 694 unmodified lines
695695 {
696696 .cache = &ecryptfs_header_cache,
697697 .name = "ecryptfs_headers",
698− .size = PAGE_CACHE_SIZE,
698+ .size = PAGE_SIZE,
699699 },
700700 {
701701 .cache = &ecryptfs_xattr_cache,
702702 .name = "ecryptfs_xattr_cache",
703− .size = PAGE_CACHE_SIZE,
703+ .size = PAGE_SIZE,
704704 },
705705 {
706706 .cache = &ecryptfs_key_record_cache,
@@ -818,7 +818,7 @@ static int __init ecryptfs_init(void) · 111 unmodified lines
818818 {
819819 int rc;
820820
821− if (ECRYPTFS_DEFAULT_EXTENT_SIZE > PAGE_CACHE_SIZE) {
821+ if (ECRYPTFS_DEFAULT_EXTENT_SIZE > PAGE_SIZE) {
822822 rc = -EINVAL;
823823 ecryptfs_printk(KERN_ERR, "The eCryptfs extent size is "
824824 "larger than the host's page size, and so "
@@ -826,7 +826,7 @@ static int __init ecryptfs_init(void) · 1 unmodified line
826826 "default eCryptfs extent size is [%u] bytes; "
827827 "the page size is [%lu] bytes.\n",
828828 ECRYPTFS_DEFAULT_EXTENT_SIZE,
829− (unsigned long)PAGE_CACHE_SIZE);
829+ (unsigned long)PAGE_SIZE);
830830 goto out;
831831 }
832832 rc = ecryptfs_init_kmem_caches();
fs/ecryptfs/mmap.c+22−22
@@ -122,7 +122,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page, · 121 unmodified lines
122122 struct ecryptfs_crypt_stat *crypt_stat)
123123 {
124124 loff_t extent_num_in_page = 0;
125− loff_t num_extents_per_page = (PAGE_CACHE_SIZE
125+ loff_t num_extents_per_page = (PAGE_SIZE
126126 / crypt_stat->extent_size);
127127 int rc = 0;
128128
@@ -138,7 +138,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page, · 9 unmodified lines
138138 char *page_virt;
139139
140140 page_virt = kmap_atomic(page);
141− memset(page_virt, 0, PAGE_CACHE_SIZE);
141+ memset(page_virt, 0, PAGE_SIZE);
142142 /* TODO: Support more than one header extent */
143143 if (view_extent_num == 0) {
144144 size_t written;
@@ -164,8 +164,8 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page, · 19 unmodified lines
164164 - crypt_stat->metadata_size);
165165
166166 rc = ecryptfs_read_lower_page_segment(
167− page, (lower_offset >> PAGE_CACHE_SHIFT),
168− (lower_offset & ~PAGE_CACHE_MASK),
167+ page, (lower_offset >> PAGE_SHIFT),
168+ (lower_offset & ~PAGE_MASK),
169169 crypt_stat->extent_size, page->mapping->host);
170170 if (rc) {
171171 printk(KERN_ERR "%s: Error attempting to read "
@@ -198,7 +198,7 @@ static int ecryptfs_readpage(struct file *file, struct page *page) · 26 unmodified lines
198198
199199 if (!crypt_stat || !(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) {
200200 rc = ecryptfs_read_lower_page_segment(page, page->index, 0,
201− PAGE_CACHE_SIZE,
201+ PAGE_SIZE,
202202 page->mapping->host);
203203 } else if (crypt_stat->flags & ECRYPTFS_VIEW_AS_ENCRYPTED) {
204204 if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) {
@@ -215,7 +215,7 @@ static int ecryptfs_readpage(struct file *file, struct page *page) · 10 unmodified lines
215215
216216 } else {
217217 rc = ecryptfs_read_lower_page_segment(
218− page, page->index, 0, PAGE_CACHE_SIZE,
218+ page, page->index, 0, PAGE_SIZE,
219219 page->mapping->host);
220220 if (rc) {
221221 printk(KERN_ERR "Error reading page; rc = "
@@ -250,12 +250,12 @@ static int fill_zeros_to_end_of_page(struct page *page, unsigned int to) · 28 unmodified lines
250250 struct inode *inode = page->mapping->host;
251251 int end_byte_in_page;
252252
253− if ((i_size_read(inode) / PAGE_CACHE_SIZE) != page->index)
253+ if ((i_size_read(inode) / PAGE_SIZE) != page->index)
254254 goto out;
255− end_byte_in_page = i_size_read(inode) % PAGE_CACHE_SIZE;
255+ end_byte_in_page = i_size_read(inode) % PAGE_SIZE;
256256 if (to > end_byte_in_page)
257257 end_byte_in_page = to;
258− zero_user_segment(page, end_byte_in_page, PAGE_CACHE_SIZE);
258+ zero_user_segment(page, end_byte_in_page, PAGE_SIZE);
259259 out:
260260 return 0;
261261 }
@@ -279,7 +279,7 @@ static int ecryptfs_write_begin(struct file *file, · 17 unmodified lines
279279 loff_t pos, unsigned len, unsigned flags,
280280 struct page **pagep, void **fsdata)
281281 {
282− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
282+ pgoff_t index = pos >> PAGE_SHIFT;
283283 struct page *page;
284284 loff_t prev_page_end_size;
285285 int rc = 0;
@@ -289,14 +289,14 @@ static int ecryptfs_write_begin(struct file *file, · 3 unmodified lines
289289 return -ENOMEM;
290290 *pagep = page;
291291
292− prev_page_end_size = ((loff_t)index << PAGE_CACHE_SHIFT);
292+ prev_page_end_size = ((loff_t)index << PAGE_SHIFT);
293293 if (!PageUptodate(page)) {
294294 struct ecryptfs_crypt_stat *crypt_stat =
295295 &ecryptfs_inode_to_private(mapping->host)->crypt_stat;
296296
297297 if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) {
298298 rc = ecryptfs_read_lower_page_segment(
299− page, index, 0, PAGE_CACHE_SIZE, mapping->host);
299+ page, index, 0, PAGE_SIZE, mapping->host);
300300 if (rc) {
301301 printk(KERN_ERR "%s: Error attempting to read "
302302 "lower page segment; rc = [%d]\n",
@@ -322,7 +322,7 @@ static int ecryptfs_write_begin(struct file *file, · 19 unmodified lines
322322 SetPageUptodate(page);
323323 } else {
324324 rc = ecryptfs_read_lower_page_segment(
325− page, index, 0, PAGE_CACHE_SIZE,
325+ page, index, 0, PAGE_SIZE,
326326 mapping->host);
327327 if (rc) {
328328 printk(KERN_ERR "%s: Error reading "
@@ -336,9 +336,9 @@ static int ecryptfs_write_begin(struct file *file, · 7 unmodified lines
336336 } else {
337337 if (prev_page_end_size
338338 >= i_size_read(page->mapping->host)) {
339− zero_user(page, 0, PAGE_CACHE_SIZE);
339+ zero_user(page, 0, PAGE_SIZE);
340340 SetPageUptodate(page);
341− } else if (len < PAGE_CACHE_SIZE) {
341+ } else if (len < PAGE_SIZE) {
342342 rc = ecryptfs_decrypt_page(page);
343343 if (rc) {
344344 printk(KERN_ERR "%s: Error decrypting "
@@ -371,11 +371,11 @@ static int ecryptfs_write_begin(struct file *file, · 26 unmodified lines
371371 * of page? Zero it out. */
372372 if ((i_size_read(mapping->host) == prev_page_end_size)
373373 && (pos != 0))
374− zero_user(page, 0, PAGE_CACHE_SIZE);
374+ zero_user(page, 0, PAGE_SIZE);
375375 out:
376376 if (unlikely(rc)) {
377377 unlock_page(page);
378− page_cache_release(page);
378+ put_page(page);
379379 *pagep = NULL;
380380 }
381381 return rc;
@@ -437,7 +437,7 @@ static int ecryptfs_write_inode_size_to_xattr(struct inode *ecryptfs_inode) · 55 unmodified lines
437437 }
438438 inode_lock(lower_inode);
439439 size = lower_inode->i_op->getxattr(lower_dentry, ECRYPTFS_XATTR_NAME,
440− xattr_virt, PAGE_CACHE_SIZE);
440+ xattr_virt, PAGE_SIZE);
441441 if (size < 0)
442442 size = 8;
443443 put_unaligned_be64(i_size_read(ecryptfs_inode), xattr_virt);
@@ -479,8 +479,8 @@ static int ecryptfs_write_end(struct file *file, · 35 unmodified lines
479479 loff_t pos, unsigned len, unsigned copied,
480480 struct page *page, void *fsdata)
481481 {
482− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
483− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
482+ pgoff_t index = pos >> PAGE_SHIFT;
483+ unsigned from = pos & (PAGE_SIZE - 1);
484484 unsigned to = from + copied;
485485 struct inode *ecryptfs_inode = mapping->host;
486486 struct ecryptfs_crypt_stat *crypt_stat =
@@ -500,7 +500,7 @@ static int ecryptfs_write_end(struct file *file, · 13 unmodified lines
500500 goto out;
501501 }
502502 if (!PageUptodate(page)) {
503− if (copied < PAGE_CACHE_SIZE) {
503+ if (copied < PAGE_SIZE) {
504504 rc = 0;
505505 goto out;
506506 }
@@ -533,7 +533,7 @@ static int ecryptfs_write_end(struct file *file, · 26 unmodified lines
533533 rc = copied;
534534 out:
535535 unlock_page(page);
536− page_cache_release(page);
536+ put_page(page);
537537 return rc;
538538 }
539539
fs/ecryptfs/read_write.c+7−7
@@ -74,7 +74,7 @@ int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode, · 73 unmodified lines
7474 loff_t offset;
7575 int rc;
7676
77− offset = ((((loff_t)page_for_lower->index) << PAGE_CACHE_SHIFT)
77+ offset = ((((loff_t)page_for_lower->index) << PAGE_SHIFT)
7878 + offset_in_page);
7979 virt = kmap(page_for_lower);
8080 rc = ecryptfs_write_lower(ecryptfs_inode, virt, offset, size);
@@ -123,9 +123,9 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset, · 42 unmodified lines
123123 else
124124 pos = offset;
125125 while (pos < (offset + size)) {
126− pgoff_t ecryptfs_page_idx = (pos >> PAGE_CACHE_SHIFT);
127− size_t start_offset_in_page = (pos & ~PAGE_CACHE_MASK);
128− size_t num_bytes = (PAGE_CACHE_SIZE - start_offset_in_page);
126+ pgoff_t ecryptfs_page_idx = (pos >> PAGE_SHIFT);
127+ size_t start_offset_in_page = (pos & ~PAGE_MASK);
128+ size_t num_bytes = (PAGE_SIZE - start_offset_in_page);
129129 loff_t total_remaining_bytes = ((offset + size) - pos);
130130
131131 if (fatal_signal_pending(current)) {
@@ -165,7 +165,7 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset, · 33 unmodified lines
165165 * Fill in zero values to the end of the page */
166166 memset(((char *)ecryptfs_page_virt
167167 + start_offset_in_page), 0,
168− PAGE_CACHE_SIZE - start_offset_in_page);
168+ PAGE_SIZE - start_offset_in_page);
169169 }
170170
171171 /* pos >= offset, we are now writing the data request */
@@ -186,7 +186,7 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset, · 14 unmodified lines
186186 ecryptfs_page,
187187 start_offset_in_page,
188188 data_offset);
189− page_cache_release(ecryptfs_page);
189+ put_page(ecryptfs_page);
190190 if (rc) {
191191 printk(KERN_ERR "%s: Error encrypting "
192192 "page; rc = [%d]\n", __func__, rc);
@@ -262,7 +262,7 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs, · 69 unmodified lines
262262 loff_t offset;
263263 int rc;
264264
265− offset = ((((loff_t)page_index) << PAGE_CACHE_SHIFT) + offset_in_page);
265+ offset = ((((loff_t)page_index) << PAGE_SHIFT) + offset_in_page);
266266 virt = kmap(page_for_ecryptfs);
267267 rc = ecryptfs_read_lower(virt, offset, size, ecryptfs_inode);
268268 if (rc > 0)
fs/efivarfs/super.c+2−2
@@ -197,8 +197,8 @@ static int efivarfs_fill_super(struct super_block *sb, void *data, int silent) · 196 unmodified lines
197197 efivarfs_sb = sb;
198198
199199 sb->s_maxbytes = MAX_LFS_FILESIZE;
200− sb->s_blocksize = PAGE_CACHE_SIZE;
201− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
200+ sb->s_blocksize = PAGE_SIZE;
201+ sb->s_blocksize_bits = PAGE_SHIFT;
202202 sb->s_magic = EFIVARFS_MAGIC;
203203 sb->s_op = &efivarfs_ops;
204204 sb->s_d_op = &efivarfs_d_ops;
fs/exofs/dir.c+15−15
@@ -41,16 +41,16 @@ static inline unsigned exofs_chunk_size(struct inode *inode) · 40 unmodified lines
4141 static inline void exofs_put_page(struct page *page)
4242 {
4343 kunmap(page);
44− page_cache_release(page);
44+ put_page(page);
4545 }
4646
4747 static unsigned exofs_last_byte(struct inode *inode, unsigned long page_nr)
4848 {
4949 loff_t last_byte = inode->i_size;
5050
51− last_byte -= page_nr << PAGE_CACHE_SHIFT;
52− if (last_byte > PAGE_CACHE_SIZE)
53− last_byte = PAGE_CACHE_SIZE;
51+ last_byte -= page_nr << PAGE_SHIFT;
52+ if (last_byte > PAGE_SIZE)
53+ last_byte = PAGE_SIZE;
5454 return last_byte;
5555 }
5656
@@ -85,13 +85,13 @@ static void exofs_check_page(struct page *page) · 28 unmodified lines
8585 unsigned chunk_size = exofs_chunk_size(dir);
8686 char *kaddr = page_address(page);
8787 unsigned offs, rec_len;
88− unsigned limit = PAGE_CACHE_SIZE;
88+ unsigned limit = PAGE_SIZE;
8989 struct exofs_dir_entry *p;
9090 char *error;
9191
9292 /* if the page is the last one in the directory */
93− if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) {
94− limit = dir->i_size & ~PAGE_CACHE_MASK;
93+ if ((dir->i_size >> PAGE_SHIFT) == page->index) {
94+ limit = dir->i_size & ~PAGE_MASK;
9595 if (limit & (chunk_size - 1))
9696 goto Ebadsize;
9797 if (!limit)
@@ -138,7 +138,7 @@ bad_entry: · 40 unmodified lines
138138 EXOFS_ERR(
139139 "ERROR [exofs_check_page]: bad entry in directory(0x%lx): %s - "
140140 "offset=%lu, inode=0x%llu, rec_len=%d, name_len=%d\n",
141− dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
141+ dir->i_ino, error, (page->index<<PAGE_SHIFT)+offs,
142142 _LLU(le64_to_cpu(p->inode_no)),
143143 rec_len, p->name_len);
144144 goto fail;
@@ -147,7 +147,7 @@ Eend: · 2 unmodified lines
147147 EXOFS_ERR("ERROR [exofs_check_page]: "
148148 "entry in directory(0x%lx) spans the page boundary"
149149 "offset=%lu, inode=0x%llx\n",
150− dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs,
150+ dir->i_ino, (page->index<<PAGE_SHIFT)+offs,
151151 _LLU(le64_to_cpu(p->inode_no)));
152152 fail:
153153 SetPageChecked(page);
@@ -237,8 +237,8 @@ exofs_readdir(struct file *file, struct dir_context *ctx) · 83 unmodified lines
237237 {
238238 loff_t pos = ctx->pos;
239239 struct inode *inode = file_inode(file);
240− unsigned int offset = pos & ~PAGE_CACHE_MASK;
241− unsigned long n = pos >> PAGE_CACHE_SHIFT;
240+ unsigned int offset = pos & ~PAGE_MASK;
241+ unsigned long n = pos >> PAGE_SHIFT;
242242 unsigned long npages = dir_pages(inode);
243243 unsigned chunk_mask = ~(exofs_chunk_size(inode)-1);
244244 int need_revalidate = (file->f_version != inode->i_version);
@@ -254,7 +254,7 @@ exofs_readdir(struct file *file, struct dir_context *ctx) · 9 unmodified lines
254254 if (IS_ERR(page)) {
255255 EXOFS_ERR("ERROR: bad page in directory(0x%lx)\n",
256256 inode->i_ino);
257− ctx->pos += PAGE_CACHE_SIZE - offset;
257+ ctx->pos += PAGE_SIZE - offset;
258258 return PTR_ERR(page);
259259 }
260260 kaddr = page_address(page);
@@ -262,7 +262,7 @@ exofs_readdir(struct file *file, struct dir_context *ctx) · 1 unmodified line
262262 if (offset) {
263263 offset = exofs_validate_entry(kaddr, offset,
264264 chunk_mask);
265− ctx->pos = (n<<PAGE_CACHE_SHIFT) + offset;
265+ ctx->pos = (n<<PAGE_SHIFT) + offset;
266266 }
267267 file->f_version = inode->i_version;
268268 need_revalidate = 0;
@@ -449,7 +449,7 @@ int exofs_add_link(struct dentry *dentry, struct inode *inode) · 180 unmodified lines
449449 kaddr = page_address(page);
450450 dir_end = kaddr + exofs_last_byte(dir, n);
451451 de = (struct exofs_dir_entry *)kaddr;
452− kaddr += PAGE_CACHE_SIZE - reclen;
452+ kaddr += PAGE_SIZE - reclen;
453453 while ((char *)de <= kaddr) {
454454 if ((char *)de == dir_end) {
455455 name_len = 0;
@@ -602,7 +602,7 @@ int exofs_make_empty(struct inode *inode, struct inode *parent) · 146 unmodified lines
602602 kunmap_atomic(kaddr);
603603 err = exofs_commit_chunk(page, 0, chunk_size);
604604 fail:
605− page_cache_release(page);
605+ put_page(page);
606606 return err;
607607 }
608608
fs/exofs/inode.c+17−17
@@ -317,7 +317,7 @@ static int read_exec(struct page_collect *pcol) · 316 unmodified lines
317317
318318 if (!pcol->ios) {
319319 int ret = ore_get_rw_state(&pcol->sbi->layout, &oi->oc, true,
320− pcol->pg_first << PAGE_CACHE_SHIFT,
320+ pcol->pg_first << PAGE_SHIFT,
321321 pcol->length, &pcol->ios);
322322
323323 if (ret)
@@ -383,7 +383,7 @@ static int readpage_strip(void *data, struct page *page) · 59 unmodified lines
383383 struct inode *inode = pcol->inode;
384384 struct exofs_i_info *oi = exofs_i(inode);
385385 loff_t i_size = i_size_read(inode);
386− pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
386+ pgoff_t end_index = i_size >> PAGE_SHIFT;
387387 size_t len;
388388 int ret;
389389
@@ -397,9 +397,9 @@ static int readpage_strip(void *data, struct page *page) · 7 unmodified lines
397397 pcol->that_locked_page = page;
398398
399399 if (page->index < end_index)
400− len = PAGE_CACHE_SIZE;
400+ len = PAGE_SIZE;
401401 else if (page->index == end_index)
402− len = i_size & ~PAGE_CACHE_MASK;
402+ len = i_size & ~PAGE_MASK;
403403 else
404404 len = 0;
405405
@@ -442,8 +442,8 @@ try_again: · 36 unmodified lines
442442 goto fail;
443443 }
444444
445− if (len != PAGE_CACHE_SIZE)
446− zero_user(page, len, PAGE_CACHE_SIZE - len);
445+ if (len != PAGE_SIZE)
446+ zero_user(page, len, PAGE_SIZE - len);
447447
448448 EXOFS_DBGMSG2(" readpage_strip(0x%lx, 0x%lx) len=0x%zx\n",
449449 inode->i_ino, page->index, len);
@@ -609,7 +609,7 @@ static void __r4w_put_page(void *priv, struct page *page) · 159 unmodified lines
609609
610610 if ((pcol->that_locked_page != page) && (ZERO_PAGE(0) != page)) {
611611 EXOFS_DBGMSG2("index=0x%lx\n", page->index);
612− page_cache_release(page);
612+ put_page(page);
613613 return;
614614 }
615615 EXOFS_DBGMSG2("that_locked_page index=0x%lx\n",
@@ -633,7 +633,7 @@ static int write_exec(struct page_collect *pcol) · 17 unmodified lines
633633
634634 BUG_ON(pcol->ios);
635635 ret = ore_get_rw_state(&pcol->sbi->layout, &oi->oc, false,
636− pcol->pg_first << PAGE_CACHE_SHIFT,
636+ pcol->pg_first << PAGE_SHIFT,
637637 pcol->length, &pcol->ios);
638638 if (unlikely(ret))
639639 goto err;
@@ -696,7 +696,7 @@ static int writepage_strip(struct page *page, · 56 unmodified lines
696696 struct inode *inode = pcol->inode;
697697 struct exofs_i_info *oi = exofs_i(inode);
698698 loff_t i_size = i_size_read(inode);
699− pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
699+ pgoff_t end_index = i_size >> PAGE_SHIFT;
700700 size_t len;
701701 int ret;
702702
@@ -708,9 +708,9 @@ static int writepage_strip(struct page *page, · 5 unmodified lines
708708
709709 if (page->index < end_index)
710710 /* in this case, the page is within the limits of the file */
711− len = PAGE_CACHE_SIZE;
711+ len = PAGE_SIZE;
712712 else {
713− len = i_size & ~PAGE_CACHE_MASK;
713+ len = i_size & ~PAGE_MASK;
714714
715715 if (page->index > end_index || !len) {
716716 /* in this case, the page is outside the limits
@@ -790,10 +790,10 @@ static int exofs_writepages(struct address_space *mapping, · 73 unmodified lines
790790 long start, end, expected_pages;
791791 int ret;
792792
793− start = wbc->range_start >> PAGE_CACHE_SHIFT;
793+ start = wbc->range_start >> PAGE_SHIFT;
794794 end = (wbc->range_end == LLONG_MAX) ?
795795 start + mapping->nrpages :
796− wbc->range_end >> PAGE_CACHE_SHIFT;
796+ wbc->range_end >> PAGE_SHIFT;
797797
798798 if (start || end)
799799 expected_pages = end - start + 1;
@@ -881,15 +881,15 @@ int exofs_write_begin(struct file *file, struct address_space *mapping, · 81 unmodified lines
881881 }
882882
883883 /* read modify write */
884− if (!PageUptodate(page) && (len != PAGE_CACHE_SIZE)) {
884+ if (!PageUptodate(page) && (len != PAGE_SIZE)) {
885885 loff_t i_size = i_size_read(mapping->host);
886− pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
886+ pgoff_t end_index = i_size >> PAGE_SHIFT;
887887 size_t rlen;
888888
889889 if (page->index < end_index)
890− rlen = PAGE_CACHE_SIZE;
890+ rlen = PAGE_SIZE;
891891 else if (page->index == end_index)
892− rlen = i_size & ~PAGE_CACHE_MASK;
892+ rlen = i_size & ~PAGE_MASK;
893893 else
894894 rlen = 0;
895895
fs/exofs/namei.c+2−2
@@ -292,11 +292,11 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, · 291 unmodified lines
292292 out_dir:
293293 if (dir_de) {
294294 kunmap(dir_page);
295− page_cache_release(dir_page);
295+ put_page(dir_page);
296296 }
297297 out_old:
298298 kunmap(old_page);
299− page_cache_release(old_page);
299+ put_page(old_page);
300300 out:
301301 return err;
302302 }
fs/ext2/dir.c+16−16
@@ -67,7 +67,7 @@ static inline unsigned ext2_chunk_size(struct inode *inode) · 66 unmodified lines
6767 static inline void ext2_put_page(struct page *page)
6868 {
6969 kunmap(page);
70− page_cache_release(page);
70+ put_page(page);
7171 }
7272
7373 /*
@@ -79,9 +79,9 @@ ext2_last_byte(struct inode *inode, unsigned long page_nr) · 5 unmodified lines
7979 {
8080 unsigned last_byte = inode->i_size;
8181
82− last_byte -= page_nr << PAGE_CACHE_SHIFT;
83− if (last_byte > PAGE_CACHE_SIZE)
84− last_byte = PAGE_CACHE_SIZE;
82+ last_byte -= page_nr << PAGE_SHIFT;
83+ if (last_byte > PAGE_SIZE)
84+ last_byte = PAGE_SIZE;
8585 return last_byte;
8686 }
8787
@@ -118,12 +118,12 @@ static void ext2_check_page(struct page *page, int quiet) · 30 unmodified lines
118118 char *kaddr = page_address(page);
119119 u32 max_inumber = le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count);
120120 unsigned offs, rec_len;
121− unsigned limit = PAGE_CACHE_SIZE;
121+ unsigned limit = PAGE_SIZE;
122122 ext2_dirent *p;
123123 char *error;
124124
125− if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) {
126− limit = dir->i_size & ~PAGE_CACHE_MASK;
125+ if ((dir->i_size >> PAGE_SHIFT) == page->index) {
126+ limit = dir->i_size & ~PAGE_MASK;
127127 if (limit & (chunk_size - 1))
128128 goto Ebadsize;
129129 if (!limit)
@@ -176,7 +176,7 @@ bad_entry: · 46 unmodified lines
176176 if (!quiet)
177177 ext2_error(sb, __func__, "bad entry in directory #%lu: : %s - "
178178 "offset=%lu, inode=%lu, rec_len=%d, name_len=%d",
179− dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
179+ dir->i_ino, error, (page->index<<PAGE_SHIFT)+offs,
180180 (unsigned long) le32_to_cpu(p->inode),
181181 rec_len, p->name_len);
182182 goto fail;
@@ -186,7 +186,7 @@ Eend: · 3 unmodified lines
186186 ext2_error(sb, "ext2_check_page",
187187 "entry in directory #%lu spans the page boundary"
188188 "offset=%lu, inode=%lu",
189− dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs,
189+ dir->i_ino, (page->index<<PAGE_SHIFT)+offs,
190190 (unsigned long) le32_to_cpu(p->inode));
191191 }
192192 fail:
@@ -287,8 +287,8 @@ ext2_readdir(struct file *file, struct dir_context *ctx) · 94 unmodified lines
287287 loff_t pos = ctx->pos;
288288 struct inode *inode = file_inode(file);
289289 struct super_block *sb = inode->i_sb;
290− unsigned int offset = pos & ~PAGE_CACHE_MASK;
291− unsigned long n = pos >> PAGE_CACHE_SHIFT;
290+ unsigned int offset = pos & ~PAGE_MASK;
291+ unsigned long n = pos >> PAGE_SHIFT;
292292 unsigned long npages = dir_pages(inode);
293293 unsigned chunk_mask = ~(ext2_chunk_size(inode)-1);
294294 unsigned char *types = NULL;
@@ -309,14 +309,14 @@ ext2_readdir(struct file *file, struct dir_context *ctx) · 14 unmodified lines
309309 ext2_error(sb, __func__,
310310 "bad page in #%lu",
311311 inode->i_ino);
312− ctx->pos += PAGE_CACHE_SIZE - offset;
312+ ctx->pos += PAGE_SIZE - offset;
313313 return PTR_ERR(page);
314314 }
315315 kaddr = page_address(page);
316316 if (unlikely(need_revalidate)) {
317317 if (offset) {
318318 offset = ext2_validate_entry(kaddr, offset, chunk_mask);
319− ctx->pos = (n<<PAGE_CACHE_SHIFT) + offset;
319+ ctx->pos = (n<<PAGE_SHIFT) + offset;
320320 }
321321 file->f_version = inode->i_version;
322322 need_revalidate = 0;
@@ -406,7 +406,7 @@ struct ext2_dir_entry_2 *ext2_find_entry (struct inode * dir, · 83 unmodified lines
406406 if (++n >= npages)
407407 n = 0;
408408 /* next page is past the blocks we've got */
409− if (unlikely(n > (dir->i_blocks >> (PAGE_CACHE_SHIFT - 9)))) {
409+ if (unlikely(n > (dir->i_blocks >> (PAGE_SHIFT - 9)))) {
410410 ext2_error(dir->i_sb, __func__,
411411 "dir %lu size %lld exceeds block count %llu",
412412 dir->i_ino, dir->i_size,
@@ -511,7 +511,7 @@ int ext2_add_link (struct dentry *dentry, struct inode *inode) · 98 unmodified lines
511511 kaddr = page_address(page);
512512 dir_end = kaddr + ext2_last_byte(dir, n);
513513 de = (ext2_dirent *)kaddr;
514− kaddr += PAGE_CACHE_SIZE - reclen;
514+ kaddr += PAGE_SIZE - reclen;
515515 while ((char *)de <= kaddr) {
516516 if ((char *)de == dir_end) {
517517 /* We hit i_size */
@@ -655,7 +655,7 @@ int ext2_make_empty(struct inode *inode, struct inode *parent) · 137 unmodified lines
655655 kunmap_atomic(kaddr);
656656 err = ext2_commit_chunk(page, 0, chunk_size);
657657 fail:
658− page_cache_release(page);
658+ put_page(page);
659659 return err;
660660 }
661661
fs/ext2/namei.c+3−3
@@ -398,7 +398,7 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, · 397 unmodified lines
398398 ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0);
399399 else {
400400 kunmap(dir_page);
401− page_cache_release(dir_page);
401+ put_page(dir_page);
402402 }
403403 inode_dec_link_count(old_dir);
404404 }
@@ -408,11 +408,11 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, · 3 unmodified lines
408408 out_dir:
409409 if (dir_de) {
410410 kunmap(dir_page);
411− page_cache_release(dir_page);
411+ put_page(dir_page);
412412 }
413413 out_old:
414414 kunmap(old_page);
415− page_cache_release(old_page);
415+ put_page(old_page);
416416 out:
417417 return err;
418418 }
fs/ext4/crypto.c+4−4
@@ -283,10 +283,10 @@ static int ext4_page_crypto(struct inode *inode, · 282 unmodified lines
283283 EXT4_XTS_TWEAK_SIZE - sizeof(index));
284284
285285 sg_init_table(&dst, 1);
286− sg_set_page(&dst, dest_page, PAGE_CACHE_SIZE, 0);
286+ sg_set_page(&dst, dest_page, PAGE_SIZE, 0);
287287 sg_init_table(&src, 1);
288− sg_set_page(&src, src_page, PAGE_CACHE_SIZE, 0);
289− skcipher_request_set_crypt(req, &src, &dst, PAGE_CACHE_SIZE,
288+ sg_set_page(&src, src_page, PAGE_SIZE, 0);
289+ skcipher_request_set_crypt(req, &src, &dst, PAGE_SIZE,
290290 xts_tweak);
291291 if (rw == EXT4_DECRYPT)
292292 res = crypto_skcipher_decrypt(req);
@@ -396,7 +396,7 @@ int ext4_encrypted_zeroout(struct inode *inode, ext4_lblk_t lblk, · 103 unmodified lines
396396 (unsigned long) inode->i_ino, lblk, len);
397397 #endif
398398
399− BUG_ON(inode->i_sb->s_blocksize != PAGE_CACHE_SIZE);
399+ BUG_ON(inode->i_sb->s_blocksize != PAGE_SIZE);
400400
401401 ctx = ext4_get_crypto_ctx(inode);
402402 if (IS_ERR(ctx))
fs/ext4/dir.c+2−2
@@ -155,13 +155,13 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) · 154 unmodified lines
155155 err = ext4_map_blocks(NULL, inode, &map, 0);
156156 if (err > 0) {
157157 pgoff_t index = map.m_pblk >>
158− (PAGE_CACHE_SHIFT - inode->i_blkbits);
158+ (PAGE_SHIFT - inode->i_blkbits);
159159 if (!ra_has_index(&file->f_ra, index))
160160 page_cache_sync_readahead(
161161 sb->s_bdev->bd_inode->i_mapping,
162162 &file->f_ra, file,
163163 index, 1);
164− file->f_ra.prev_pos = (loff_t)index << PAGE_CACHE_SHIFT;
164+ file->f_ra.prev_pos = (loff_t)index << PAGE_SHIFT;
165165 bh = ext4_bread(NULL, inode, map.m_lblk, 0);
166166 if (IS_ERR(bh)) {
167167 err = PTR_ERR(bh);
fs/ext4/file.c+2−2
@@ -428,8 +428,8 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, · 427 unmodified lines
428428 lastoff = startoff;
429429 endoff = (loff_t)end_blk << blkbits;
430430
431− index = startoff >> PAGE_CACHE_SHIFT;
432− end = endoff >> PAGE_CACHE_SHIFT;
431+ index = startoff >> PAGE_SHIFT;
432+ end = endoff >> PAGE_SHIFT;
433433
434434 pagevec_init(&pvec, 0);
435435 do {
fs/ext4/inline.c+9−9
@@ -482,7 +482,7 @@ static int ext4_read_inline_page(struct inode *inode, struct page *page) · 481 unmodified lines
482482 ret = ext4_read_inline_data(inode, kaddr, len, &iloc);
483483 flush_dcache_page(page);
484484 kunmap_atomic(kaddr);
485− zero_user_segment(page, len, PAGE_CACHE_SIZE);
485+ zero_user_segment(page, len, PAGE_SIZE);
486486 SetPageUptodate(page);
487487 brelse(iloc.bh);
488488
@@ -507,7 +507,7 @@ int ext4_readpage_inline(struct inode *inode, struct page *page) · 18 unmodified lines
507507 if (!page->index)
508508 ret = ext4_read_inline_page(inode, page);
509509 else if (!PageUptodate(page)) {
510− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
510+ zero_user_segment(page, 0, PAGE_SIZE);
511511 SetPageUptodate(page);
512512 }
513513
@@ -595,7 +595,7 @@ retry: · 81 unmodified lines
595595
596596 if (ret) {
597597 unlock_page(page);
598− page_cache_release(page);
598+ put_page(page);
599599 page = NULL;
600600 ext4_orphan_add(handle, inode);
601601 up_write(&EXT4_I(inode)->xattr_sem);
@@ -621,7 +621,7 @@ retry: · 19 unmodified lines
621621 out:
622622 if (page) {
623623 unlock_page(page);
624− page_cache_release(page);
624+ put_page(page);
625625 }
626626 if (sem_held)
627627 up_write(&EXT4_I(inode)->xattr_sem);
@@ -690,7 +690,7 @@ int ext4_try_to_write_inline_data(struct address_space *mapping, · 62 unmodified lines
690690 if (!ext4_has_inline_data(inode)) {
691691 ret = 0;
692692 unlock_page(page);
693− page_cache_release(page);
693+ put_page(page);
694694 goto out_up_read;
695695 }
696696
@@ -815,7 +815,7 @@ static int ext4_da_convert_inline_data_to_extent(struct address_space *mapping, · 118 unmodified lines
815815 if (ret) {
816816 up_read(&EXT4_I(inode)->xattr_sem);
817817 unlock_page(page);
818− page_cache_release(page);
818+ put_page(page);
819819 ext4_truncate_failed_write(inode);
820820 return ret;
821821 }
@@ -829,7 +829,7 @@ out: · 7 unmodified lines
829829 up_read(&EXT4_I(inode)->xattr_sem);
830830 if (page) {
831831 unlock_page(page);
832− page_cache_release(page);
832+ put_page(page);
833833 }
834834 return ret;
835835 }
@@ -919,7 +919,7 @@ retry_journal: · 83 unmodified lines
919919 out_release_page:
920920 up_read(&EXT4_I(inode)->xattr_sem);
921921 unlock_page(page);
922− page_cache_release(page);
922+ put_page(page);
923923 out_journal:
924924 ext4_journal_stop(handle);
925925 out:
@@ -947,7 +947,7 @@ int ext4_da_write_inline_data_end(struct inode *inode, loff_t pos, · 21 unmodified lines
947947 i_size_changed = 1;
948948 }
949949 unlock_page(page);
950− page_cache_release(page);
950+ put_page(page);
951951
952952 /*
953953 * Don't mark the inode dirty under page lock. First, it unnecessarily
fs/ext4/inode.c+58−58
@@ -1057,7 +1057,7 @@ int do_journal_get_write_access(handle_t *handle, · 1056 unmodified lines
10571057 static int ext4_block_write_begin(struct page *page, loff_t pos, unsigned len,
10581058 get_block_t *get_block)
10591059 {
1060− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
1060+ unsigned from = pos & (PAGE_SIZE - 1);
10611061 unsigned to = from + len;
10621062 struct inode *inode = page->mapping->host;
10631063 unsigned block_start, block_end;
@@ -1069,15 +1069,15 @@ static int ext4_block_write_begin(struct page *page, loff_t pos, unsigned len, · 5 unmodified lines
10691069 bool decrypt = false;
10701070
10711071 BUG_ON(!PageLocked(page));
1072− BUG_ON(from > PAGE_CACHE_SIZE);
1073− BUG_ON(to > PAGE_CACHE_SIZE);
1072+ BUG_ON(from > PAGE_SIZE);
1073+ BUG_ON(to > PAGE_SIZE);
10741074 BUG_ON(from > to);
10751075
10761076 if (!page_has_buffers(page))
10771077 create_empty_buffers(page, blocksize, 0);
10781078 head = page_buffers(page);
10791079 bbits = ilog2(blocksize);
1080− block = (sector_t)page->index << (PAGE_CACHE_SHIFT - bbits);
1080+ block = (sector_t)page->index << (PAGE_SHIFT - bbits);
10811081
10821082 for (bh = head, block_start = 0; bh != head || !block_start;
10831083 block++, block_start = block_end, bh = bh->b_this_page) {
@@ -1159,8 +1159,8 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping, · 75 unmodified lines
11591159 * we allocate blocks but write fails for some reason
11601160 */
11611161 needed_blocks = ext4_writepage_trans_blocks(inode) + 1;
1162− index = pos >> PAGE_CACHE_SHIFT;
1163− from = pos & (PAGE_CACHE_SIZE - 1);
1162+ index = pos >> PAGE_SHIFT;
1163+ from = pos & (PAGE_SIZE - 1);
11641164 to = from + len;
11651165
11661166 if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
@@ -1188,7 +1188,7 @@ retry_grab: · 21 unmodified lines
11881188 retry_journal:
11891189 handle = ext4_journal_start(inode, EXT4_HT_WRITE_PAGE, needed_blocks);
11901190 if (IS_ERR(handle)) {
1191− page_cache_release(page);
1191+ put_page(page);
11921192 return PTR_ERR(handle);
11931193 }
11941194
@@ -1196,7 +1196,7 @@ retry_journal: · 1 unmodified line
11961196 if (page->mapping != mapping) {
11971197 /* The page got truncated from under us */
11981198 unlock_page(page);
1199− page_cache_release(page);
1199+ put_page(page);
12001200 ext4_journal_stop(handle);
12011201 goto retry_grab;
12021202 }
@@ -1252,7 +1252,7 @@ retry_journal: · 49 unmodified lines
12521252 if (ret == -ENOSPC &&
12531253 ext4_should_retry_alloc(inode->i_sb, &retries))
12541254 goto retry_journal;
1255− page_cache_release(page);
1255+ put_page(page);
12561256 return ret;
12571257 }
12581258 *pagep = page;
@@ -1295,7 +1295,7 @@ static int ext4_write_end(struct file *file, · 36 unmodified lines
12951295 ret = ext4_jbd2_file_inode(handle, inode);
12961296 if (ret) {
12971297 unlock_page(page);
1298− page_cache_release(page);
1298+ put_page(page);
12991299 goto errout;
13001300 }
13011301 }
@@ -1315,7 +1315,7 @@ static int ext4_write_end(struct file *file, · 13 unmodified lines
13151315 */
13161316 i_size_changed = ext4_update_inode_size(inode, pos + copied);
13171317 unlock_page(page);
1318− page_cache_release(page);
1318+ put_page(page);
13191319
13201320 if (old_size < pos)
13211321 pagecache_isize_extended(inode, old_size, pos);
@@ -1399,7 +1399,7 @@ static int ext4_journalled_write_end(struct file *file, · 77 unmodified lines
13991399 int size_changed = 0;
14001400
14011401 trace_ext4_journalled_write_end(inode, pos, len, copied);
1402− from = pos & (PAGE_CACHE_SIZE - 1);
1402+ from = pos & (PAGE_SIZE - 1);
14031403 to = from + len;
14041404
14051405 BUG_ON(!ext4_handle_valid(handle));
@@ -1423,7 +1423,7 @@ static int ext4_journalled_write_end(struct file *file, · 17 unmodified lines
14231423 ext4_set_inode_state(inode, EXT4_STATE_JDATA);
14241424 EXT4_I(inode)->i_datasync_tid = handle->h_transaction->t_tid;
14251425 unlock_page(page);
1426− page_cache_release(page);
1426+ put_page(page);
14271427
14281428 if (old_size < pos)
14291429 pagecache_isize_extended(inode, old_size, pos);
@@ -1537,7 +1537,7 @@ static void ext4_da_page_release_reservation(struct page *page, · 107 unmodified lines
15371537 int num_clusters;
15381538 ext4_fsblk_t lblk;
15391539
1540− BUG_ON(stop > PAGE_CACHE_SIZE || stop < length);
1540+ BUG_ON(stop > PAGE_SIZE || stop < length);
15411541
15421542 head = page_buffers(page);
15431543 bh = head;
@@ -1553,7 +1553,7 @@ static void ext4_da_page_release_reservation(struct page *page, · 9 unmodified lines
15531553 clear_buffer_delay(bh);
15541554 } else if (contiguous_blks) {
15551555 lblk = page->index <<
1556− (PAGE_CACHE_SHIFT - inode->i_blkbits);
1556+ (PAGE_SHIFT - inode->i_blkbits);
15571557 lblk += (curr_off >> inode->i_blkbits) -
15581558 contiguous_blks;
15591559 ext4_es_remove_extent(inode, lblk, contiguous_blks);
@@ -1563,7 +1563,7 @@ static void ext4_da_page_release_reservation(struct page *page, · 3 unmodified lines
15631563 } while ((bh = bh->b_this_page) != head);
15641564
15651565 if (contiguous_blks) {
1566− lblk = page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
1566+ lblk = page->index << (PAGE_SHIFT - inode->i_blkbits);
15671567 lblk += (curr_off >> inode->i_blkbits) - contiguous_blks;
15681568 ext4_es_remove_extent(inode, lblk, contiguous_blks);
15691569 }
@@ -1572,7 +1572,7 @@ static void ext4_da_page_release_reservation(struct page *page, · 2 unmodified lines
15721572 * need to release the reserved space for that cluster. */
15731573 num_clusters = EXT4_NUM_B2C(sbi, to_release);
15741574 while (num_clusters > 0) {
1575− lblk = (page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits)) +
1575+ lblk = (page->index << (PAGE_SHIFT - inode->i_blkbits)) +
15761576 ((num_clusters - 1) << sbi->s_cluster_bits);
15771577 if (sbi->s_cluster_ratio == 1 ||
15781578 !ext4_find_delalloc_cluster(inode, lblk))
@@ -1619,8 +1619,8 @@ static void mpage_release_unused_pages(struct mpage_da_data *mpd, · 40 unmodified lines
16191619 end = mpd->next_page - 1;
16201620 if (invalidate) {
16211621 ext4_lblk_t start, last;
1622− start = index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
1623− last = end << (PAGE_CACHE_SHIFT - inode->i_blkbits);
1622+ start = index << (PAGE_SHIFT - inode->i_blkbits);
1623+ last = end << (PAGE_SHIFT - inode->i_blkbits);
16241624 ext4_es_remove_extent(inode, start, last - start + 1);
16251625 }
16261626
@@ -1636,7 +1636,7 @@ static void mpage_release_unused_pages(struct mpage_da_data *mpd, · 9 unmodified lines
16361636 BUG_ON(!PageLocked(page));
16371637 BUG_ON(PageWriteback(page));
16381638 if (invalidate) {
1639− block_invalidatepage(page, 0, PAGE_CACHE_SIZE);
1639+ block_invalidatepage(page, 0, PAGE_SIZE);
16401640 ClearPageUptodate(page);
16411641 }
16421642 unlock_page(page);
@@ -2007,10 +2007,10 @@ static int ext4_writepage(struct page *page, · 364 unmodified lines
20072007
20082008 trace_ext4_writepage(page);
20092009 size = i_size_read(inode);
2010− if (page->index == size >> PAGE_CACHE_SHIFT)
2011− len = size & ~PAGE_CACHE_MASK;
2010+ if (page->index == size >> PAGE_SHIFT)
2011+ len = size & ~PAGE_MASK;
20122012 else
2013− len = PAGE_CACHE_SIZE;
2013+ len = PAGE_SIZE;
20142014
20152015 page_bufs = page_buffers(page);
20162016 /*
@@ -2034,7 +2034,7 @@ static int ext4_writepage(struct page *page, · 17 unmodified lines
20342034 ext4_bh_delay_or_unwritten)) {
20352035 redirty_page_for_writepage(wbc, page);
20362036 if ((current->flags & PF_MEMALLOC) ||
2037− (inode->i_sb->s_blocksize == PAGE_CACHE_SIZE)) {
2037+ (inode->i_sb->s_blocksize == PAGE_SIZE)) {
20382038 /*
20392039 * For memory cleaning there's no point in writing only
20402040 * some buffers. So just bail out. Warn if we came here
@@ -2076,10 +2076,10 @@ static int mpage_submit_page(struct mpage_da_data *mpd, struct page *page) · 35 unmodified lines
20762076 int err;
20772077
20782078 BUG_ON(page->index != mpd->first_page);
2079− if (page->index == size >> PAGE_CACHE_SHIFT)
2080− len = size & ~PAGE_CACHE_MASK;
2079+ if (page->index == size >> PAGE_SHIFT)
2080+ len = size & ~PAGE_MASK;
20812081 else
2082− len = PAGE_CACHE_SIZE;
2082+ len = PAGE_SIZE;
20832083 clear_page_dirty_for_io(page);
20842084 err = ext4_bio_write_page(&mpd->io_submit, page, len, mpd->wbc, false);
20852085 if (!err)
@@ -2213,7 +2213,7 @@ static int mpage_map_and_submit_buffers(struct mpage_da_data *mpd) · 127 unmodified lines
22132213 int nr_pages, i;
22142214 struct inode *inode = mpd->inode;
22152215 struct buffer_head *head, *bh;
2216− int bpp_bits = PAGE_CACHE_SHIFT - inode->i_blkbits;
2216+ int bpp_bits = PAGE_SHIFT - inode->i_blkbits;
22172217 pgoff_t start, end;
22182218 ext4_lblk_t lblk;
22192219 sector_t pblock;
@@ -2274,7 +2274,7 @@ static int mpage_map_and_submit_buffers(struct mpage_da_data *mpd) · 54 unmodified lines
22742274 * supports blocksize < pagesize as we will try to
22752275 * convert potentially unmapped parts of inode.
22762276 */
2277− mpd->io_submit.io_end->size += PAGE_CACHE_SIZE;
2277+ mpd->io_submit.io_end->size += PAGE_SIZE;
22782278 /* Page fully mapped - let IO run! */
22792279 err = mpage_submit_page(mpd, page);
22802280 if (err < 0) {
@@ -2426,7 +2426,7 @@ update_disksize: · 145 unmodified lines
24262426 * Update on-disk size after IO is submitted. Races with
24272427 * truncate are avoided by checking i_size under i_data_sem.
24282428 */
2429− disksize = ((loff_t)mpd->first_page) << PAGE_CACHE_SHIFT;
2429+ disksize = ((loff_t)mpd->first_page) << PAGE_SHIFT;
24302430 if (disksize > EXT4_I(inode)->i_disksize) {
24312431 int err2;
24322432 loff_t i_size;
@@ -2562,7 +2562,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd) · 129 unmodified lines
25622562 mpd->next_page = page->index + 1;
25632563 /* Add all dirty buffers to mpd */
25642564 lblk = ((ext4_lblk_t)page->index) <<
2565− (PAGE_CACHE_SHIFT - blkbits);
2565+ (PAGE_SHIFT - blkbits);
25662566 head = page_buffers(page);
25672567 err = mpage_process_page_bufs(mpd, head, head, lblk);
25682568 if (err <= 0)
@@ -2647,7 +2647,7 @@ static int ext4_writepages(struct address_space *mapping, · 78 unmodified lines
26472647 * We may need to convert up to one extent per block in
26482648 * the page and we may dirty the inode.
26492649 */
2650− rsv_blocks = 1 + (PAGE_CACHE_SIZE >> inode->i_blkbits);
2650+ rsv_blocks = 1 + (PAGE_SIZE >> inode->i_blkbits);
26512651 }
26522652
26532653 /*
@@ -2678,8 +2678,8 @@ static int ext4_writepages(struct address_space *mapping, · 24 unmodified lines
26782678 mpd.first_page = writeback_index;
26792679 mpd.last_page = -1;
26802680 } else {
2681− mpd.first_page = wbc->range_start >> PAGE_CACHE_SHIFT;
2682− mpd.last_page = wbc->range_end >> PAGE_CACHE_SHIFT;
2681+ mpd.first_page = wbc->range_start >> PAGE_SHIFT;
2682+ mpd.last_page = wbc->range_end >> PAGE_SHIFT;
26832683 }
26842684
26852685 mpd.inode = inode;
@@ -2838,7 +2838,7 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping, · 152 unmodified lines
28382838 struct inode *inode = mapping->host;
28392839 handle_t *handle;
28402840
2841− index = pos >> PAGE_CACHE_SHIFT;
2841+ index = pos >> PAGE_SHIFT;
28422842
28432843 if (ext4_nonda_switch(inode->i_sb)) {
28442844 *fsdata = (void *)FALL_BACK_TO_NONDELALLOC;
@@ -2881,7 +2881,7 @@ retry_journal: · 36 unmodified lines
28812881 handle = ext4_journal_start(inode, EXT4_HT_WRITE_PAGE,
28822882 ext4_da_write_credits(inode, pos, len));
28832883 if (IS_ERR(handle)) {
2884− page_cache_release(page);
2884+ put_page(page);
28852885 return PTR_ERR(handle);
28862886 }
28872887
@@ -2889,7 +2889,7 @@ retry_journal: · 1 unmodified line
28892889 if (page->mapping != mapping) {
28902890 /* The page got truncated from under us */
28912891 unlock_page(page);
2892− page_cache_release(page);
2892+ put_page(page);
28932893 ext4_journal_stop(handle);
28942894 goto retry_grab;
28952895 }
@@ -2917,7 +2917,7 @@ retry_journal: · 21 unmodified lines
29172917 ext4_should_retry_alloc(inode->i_sb, &retries))
29182918 goto retry_journal;
29192919
2920− page_cache_release(page);
2920+ put_page(page);
29212921 return ret;
29222922 }
29232923
@@ -2965,7 +2965,7 @@ static int ext4_da_write_end(struct file *file, · 41 unmodified lines
29652965 len, copied, page, fsdata);
29662966
29672967 trace_ext4_da_write_end(inode, pos, len, copied);
2968− start = pos & (PAGE_CACHE_SIZE - 1);
2968+ start = pos & (PAGE_SIZE - 1);
29692969 end = start + copied - 1;
29702970
29712971 /*
@@ -3187,7 +3187,7 @@ static int __ext4_journalled_invalidatepage(struct page *page, · 215 unmodified lines
31873187 /*
31883188 * If it's a full truncate we just forget about the pending dirtying
31893189 */
3190− if (offset == 0 && length == PAGE_CACHE_SIZE)
3190+ if (offset == 0 && length == PAGE_SIZE)
31913191 ClearPageChecked(page);
31923192
31933193 return jbd2_journal_invalidatepage(journal, page, offset, length);
@@ -3556,8 +3556,8 @@ void ext4_set_aops(struct inode *inode) · 362 unmodified lines
35563556 static int __ext4_block_zero_page_range(handle_t *handle,
35573557 struct address_space *mapping, loff_t from, loff_t length)
35583558 {
3559− ext4_fsblk_t index = from >> PAGE_CACHE_SHIFT;
3560− unsigned offset = from & (PAGE_CACHE_SIZE-1);
3559+ ext4_fsblk_t index = from >> PAGE_SHIFT;
3560+ unsigned offset = from & (PAGE_SIZE-1);
35613561 unsigned blocksize, pos;
35623562 ext4_lblk_t iblock;
35633563 struct inode *inode = mapping->host;
@@ -3565,14 +3565,14 @@ static int __ext4_block_zero_page_range(handle_t *handle, · 1 unmodified line
35653565 struct page *page;
35663566 int err = 0;
35673567
3568− page = find_or_create_page(mapping, from >> PAGE_CACHE_SHIFT,
3568+ page = find_or_create_page(mapping, from >> PAGE_SHIFT,
35693569 mapping_gfp_constraint(mapping, ~__GFP_FS));
35703570 if (!page)
35713571 return -ENOMEM;
35723572
35733573 blocksize = inode->i_sb->s_blocksize;
35743574
3575− iblock = index << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);
3575+ iblock = index << (PAGE_SHIFT - inode->i_sb->s_blocksize_bits);
35763576
35773577 if (!page_has_buffers(page))
35783578 create_empty_buffers(page, blocksize, 0);
@@ -3614,7 +3614,7 @@ static int __ext4_block_zero_page_range(handle_t *handle, · 35 unmodified lines
36143614 ext4_encrypted_inode(inode)) {
36153615 /* We expect the key to be set. */
36163616 BUG_ON(!ext4_has_encryption_key(inode));
3617− BUG_ON(blocksize != PAGE_CACHE_SIZE);
3617+ BUG_ON(blocksize != PAGE_SIZE);
36183618 WARN_ON_ONCE(ext4_decrypt(page));
36193619 }
36203620 }
@@ -3638,7 +3638,7 @@ static int __ext4_block_zero_page_range(handle_t *handle, · 17 unmodified lines
36383638
36393639 unlock:
36403640 unlock_page(page);
3641− page_cache_release(page);
3641+ put_page(page);
36423642 return err;
36433643 }
36443644
@@ -3653,7 +3653,7 @@ static int ext4_block_zero_page_range(handle_t *handle, · 8 unmodified lines
36533653 struct address_space *mapping, loff_t from, loff_t length)
36543654 {
36553655 struct inode *inode = mapping->host;
3656− unsigned offset = from & (PAGE_CACHE_SIZE-1);
3656+ unsigned offset = from & (PAGE_SIZE-1);
36573657 unsigned blocksize = inode->i_sb->s_blocksize;
36583658 unsigned max = blocksize - (offset & (blocksize - 1));
36593659
@@ -3678,7 +3678,7 @@ static int ext4_block_zero_page_range(handle_t *handle, · 18 unmodified lines
36783678 static int ext4_block_truncate_page(handle_t *handle,
36793679 struct address_space *mapping, loff_t from)
36803680 {
3681− unsigned offset = from & (PAGE_CACHE_SIZE-1);
3681+ unsigned offset = from & (PAGE_SIZE-1);
36823682 unsigned length;
36833683 unsigned blocksize;
36843684 struct inode *inode = mapping->host;
@@ -3816,7 +3816,7 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length) · 131 unmodified lines
38163816 */
38173817 if (offset + length > inode->i_size) {
38183818 length = inode->i_size +
3819− PAGE_CACHE_SIZE - (inode->i_size & (PAGE_CACHE_SIZE - 1)) -
3819+ PAGE_SIZE - (inode->i_size & (PAGE_SIZE - 1)) -
38203820 offset;
38213821 }
38223822
@@ -4891,23 +4891,23 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode) · 1068 unmodified lines
48914891 tid_t commit_tid = 0;
48924892 int ret;
48934893
4894− offset = inode->i_size & (PAGE_CACHE_SIZE - 1);
4894+ offset = inode->i_size & (PAGE_SIZE - 1);
48954895 /*
48964896 * All buffers in the last page remain valid? Then there's nothing to
48974897 * do. We do the check mainly to optimize the common PAGE_CACHE_SIZE ==
48984898 * blocksize case
48994899 */
4900− if (offset > PAGE_CACHE_SIZE - (1 << inode->i_blkbits))
4900+ if (offset > PAGE_SIZE - (1 << inode->i_blkbits))
49014901 return;
49024902 while (1) {
49034903 page = find_lock_page(inode->i_mapping,
4904− inode->i_size >> PAGE_CACHE_SHIFT);
4904+ inode->i_size >> PAGE_SHIFT);
49054905 if (!page)
49064906 return;
49074907 ret = __ext4_journalled_invalidatepage(page, offset,
4908− PAGE_CACHE_SIZE - offset);
4908+ PAGE_SIZE - offset);
49094909 unlock_page(page);
4910− page_cache_release(page);
4910+ put_page(page);
49114911 if (ret != -EBUSY)
49124912 return;
49134913 commit_tid = 0;
@@ -5546,10 +5546,10 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 632 unmodified lines
55465546 goto out;
55475547 }
55485548
5549− if (page->index == size >> PAGE_CACHE_SHIFT)
5550− len = size & ~PAGE_CACHE_MASK;
5549+ if (page->index == size >> PAGE_SHIFT)
5550+ len = size & ~PAGE_MASK;
55515551 else
5552− len = PAGE_CACHE_SIZE;
5552+ len = PAGE_SIZE;
55535553 /*
55545554 * Return if we have all the buffers mapped. This avoids the need to do
55555555 * journal_start/journal_stop which can block and take a long time
@@ -5580,7 +5580,7 @@ retry_alloc: · 24 unmodified lines
55805580 ret = block_page_mkwrite(vma, vmf, get_block);
55815581 if (!ret && ext4_should_journal_data(inode)) {
55825582 if (ext4_walk_page_buffers(handle, page_buffers(page), 0,
5583− PAGE_CACHE_SIZE, NULL, do_journal_get_write_access)) {
5583+ PAGE_SIZE, NULL, do_journal_get_write_access)) {
55845584 unlock_page(page);
55855585 ret = VM_FAULT_SIGBUS;
55865586 ext4_journal_stop(handle);
fs/ext4/mballoc.c+18−18
@@ -839,7 +839,7 @@ static int ext4_mb_init_cache(struct page *page, char *incore, gfp_t gfp) · 838 unmodified lines
839839 sb = inode->i_sb;
840840 ngroups = ext4_get_groups_count(sb);
841841 blocksize = 1 << inode->i_blkbits;
842− blocks_per_page = PAGE_CACHE_SIZE / blocksize;
842+ blocks_per_page = PAGE_SIZE / blocksize;
843843
844844 groups_per_page = blocks_per_page >> 1;
845845 if (groups_per_page == 0)
@@ -993,7 +993,7 @@ static int ext4_mb_get_buddy_page_lock(struct super_block *sb, · 147 unmodified lines
993993 e4b->bd_buddy_page = NULL;
994994 e4b->bd_bitmap_page = NULL;
995995
996− blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
996+ blocks_per_page = PAGE_SIZE / sb->s_blocksize;
997997 /*
998998 * the buddy cache inode stores the block bitmap
999999 * and buddy information in consecutive blocks.
@@ -1028,11 +1028,11 @@ static void ext4_mb_put_buddy_page_lock(struct ext4_buddy *e4b) · 28 unmodified lines
10281028 {
10291029 if (e4b->bd_bitmap_page) {
10301030 unlock_page(e4b->bd_bitmap_page);
1031− page_cache_release(e4b->bd_bitmap_page);
1031+ put_page(e4b->bd_bitmap_page);
10321032 }
10331033 if (e4b->bd_buddy_page) {
10341034 unlock_page(e4b->bd_buddy_page);
1035− page_cache_release(e4b->bd_buddy_page);
1035+ put_page(e4b->bd_buddy_page);
10361036 }
10371037 }
10381038
@@ -1125,7 +1125,7 @@ ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group, · 86 unmodified lines
11251125 might_sleep();
11261126 mb_debug(1, "load group %u\n", group);
11271127
1128− blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
1128+ blocks_per_page = PAGE_SIZE / sb->s_blocksize;
11291129 grp = ext4_get_group_info(sb, group);
11301130
11311131 e4b->bd_blkbits = sb->s_blocksize_bits;
@@ -1167,7 +1167,7 @@ ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group, · 35 unmodified lines
11671167 * is yet to initialize the same. So
11681168 * wait for it to initialize.
11691169 */
1170− page_cache_release(page);
1170+ put_page(page);
11711171 page = find_or_create_page(inode->i_mapping, pnum, gfp);
11721172 if (page) {
11731173 BUG_ON(page->mapping != inode->i_mapping);
@@ -1203,7 +1203,7 @@ ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group, · 29 unmodified lines
12031203 page = find_get_page_flags(inode->i_mapping, pnum, FGP_ACCESSED);
12041204 if (page == NULL || !PageUptodate(page)) {
12051205 if (page)
1206− page_cache_release(page);
1206+ put_page(page);
12071207 page = find_or_create_page(inode->i_mapping, pnum, gfp);
12081208 if (page) {
12091209 BUG_ON(page->mapping != inode->i_mapping);
@@ -1238,11 +1238,11 @@ ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group, · 28 unmodified lines
12381238
12391239 err:
12401240 if (page)
1241− page_cache_release(page);
1241+ put_page(page);
12421242 if (e4b->bd_bitmap_page)
1243− page_cache_release(e4b->bd_bitmap_page);
1243+ put_page(e4b->bd_bitmap_page);
12441244 if (e4b->bd_buddy_page)
1245− page_cache_release(e4b->bd_buddy_page);
1245+ put_page(e4b->bd_buddy_page);
12461246 e4b->bd_buddy = NULL;
12471247 e4b->bd_bitmap = NULL;
12481248 return ret;
@@ -1257,9 +1257,9 @@ static int ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group, · 8 unmodified lines
12571257 static void ext4_mb_unload_buddy(struct ext4_buddy *e4b)
12581258 {
12591259 if (e4b->bd_bitmap_page)
1260− page_cache_release(e4b->bd_bitmap_page);
1260+ put_page(e4b->bd_bitmap_page);
12611261 if (e4b->bd_buddy_page)
1262− page_cache_release(e4b->bd_buddy_page);
1262+ put_page(e4b->bd_buddy_page);
12631263 }
12641264
12651265
@@ -2833,8 +2833,8 @@ static void ext4_free_data_callback(struct super_block *sb, · 1567 unmodified lines
28332833 /* No more items in the per group rb tree
28342834 * balance refcounts from ext4_mb_free_metadata()
28352835 */
2836− page_cache_release(e4b.bd_buddy_page);
2837− page_cache_release(e4b.bd_bitmap_page);
2836+ put_page(e4b.bd_buddy_page);
2837+ put_page(e4b.bd_bitmap_page);
28382838 }
28392839 ext4_unlock_group(sb, entry->efd_group);
28402840 kmem_cache_free(ext4_free_data_cachep, entry);
@@ -4385,9 +4385,9 @@ static int ext4_mb_release_context(struct ext4_allocation_context *ac) · 1544 unmodified lines
43854385 ext4_mb_put_pa(ac, ac->ac_sb, pa);
43864386 }
43874387 if (ac->ac_bitmap_page)
4388− page_cache_release(ac->ac_bitmap_page);
4388+ put_page(ac->ac_bitmap_page);
43894389 if (ac->ac_buddy_page)
4390− page_cache_release(ac->ac_buddy_page);
4390+ put_page(ac->ac_buddy_page);
43914391 if (ac->ac_flags & EXT4_MB_HINT_GROUP_ALLOC)
43924392 mutex_unlock(&ac->ac_lg->lg_mutex);
43934393 ext4_mb_collect_stats(ac);
@@ -4599,8 +4599,8 @@ ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b, · 205 unmodified lines
45994599 * otherwise we'll refresh it from
46004600 * on-disk bitmap and lose not-yet-available
46014601 * blocks */
4602− page_cache_get(e4b->bd_buddy_page);
4603− page_cache_get(e4b->bd_bitmap_page);
4602+ get_page(e4b->bd_buddy_page);
4603+ get_page(e4b->bd_bitmap_page);
46044604 }
46054605 while (*n) {
46064606 parent = *n;
fs/ext4/move_extent.c+8−8
@@ -156,7 +156,7 @@ mext_page_double_lock(struct inode *inode1, struct inode *inode2, · 155 unmodified lines
156156 page[1] = grab_cache_page_write_begin(mapping[1], index2, fl);
157157 if (!page[1]) {
158158 unlock_page(page[0]);
159− page_cache_release(page[0]);
159+ put_page(page[0]);
160160 return -ENOMEM;
161161 }
162162 /*
@@ -192,7 +192,7 @@ mext_page_mkuptodate(struct page *page, unsigned from, unsigned to) · 29 unmodified lines
192192 create_empty_buffers(page, blocksize, 0);
193193
194194 head = page_buffers(page);
195− block = (sector_t)page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
195+ block = (sector_t)page->index << (PAGE_SHIFT - inode->i_blkbits);
196196 for (bh = head, block_start = 0; bh != head || !block_start;
197197 block++, block_start = block_end, bh = bh->b_this_page) {
198198 block_end = block_start + blocksize;
@@ -268,7 +268,7 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode, · 69 unmodified lines
268268 int i, err2, jblocks, retries = 0;
269269 int replaced_count = 0;
270270 int from = data_offset_in_page << orig_inode->i_blkbits;
271− int blocks_per_page = PAGE_CACHE_SIZE >> orig_inode->i_blkbits;
271+ int blocks_per_page = PAGE_SIZE >> orig_inode->i_blkbits;
272272 struct super_block *sb = orig_inode->i_sb;
273273 struct buffer_head *bh = NULL;
274274
@@ -404,9 +404,9 @@ data_copy: · 129 unmodified lines
404404
405405 unlock_pages:
406406 unlock_page(pagep[0]);
407− page_cache_release(pagep[0]);
407+ put_page(pagep[0]);
408408 unlock_page(pagep[1]);
409− page_cache_release(pagep[1]);
409+ put_page(pagep[1]);
410410 stop_journal:
411411 ext4_journal_stop(handle);
412412 if (*err == -ENOSPC &&
@@ -554,7 +554,7 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk, · 141 unmodified lines
554554 struct inode *orig_inode = file_inode(o_filp);
555555 struct inode *donor_inode = file_inode(d_filp);
556556 struct ext4_ext_path *path = NULL;
557− int blocks_per_page = PAGE_CACHE_SIZE >> orig_inode->i_blkbits;
557+ int blocks_per_page = PAGE_SIZE >> orig_inode->i_blkbits;
558558 ext4_lblk_t o_end, o_start = orig_blk;
559559 ext4_lblk_t d_start = donor_blk;
560560 int ret;
@@ -648,9 +648,9 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk, · 87 unmodified lines
648648 if (o_end - o_start < cur_len)
649649 cur_len = o_end - o_start;
650650
651− orig_page_index = o_start >> (PAGE_CACHE_SHIFT -
651+ orig_page_index = o_start >> (PAGE_SHIFT -
652652 orig_inode->i_blkbits);
653− donor_page_index = d_start >> (PAGE_CACHE_SHIFT -
653+ donor_page_index = d_start >> (PAGE_SHIFT -
654654 donor_inode->i_blkbits);
655655 offset_in_page = o_start % blocks_per_page;
656656 if (cur_len > blocks_per_page- offset_in_page)
fs/ext4/page-io.c+2−2
@@ -432,8 +432,8 @@ int ext4_bio_write_page(struct ext4_io_submit *io, · 431 unmodified lines
432432 * the page size, the remaining memory is zeroed when mapped, and
433433 * writes to that region are not written out to the file."
434434 */
435− if (len < PAGE_CACHE_SIZE)
436− zero_user_segment(page, len, PAGE_CACHE_SIZE);
435+ if (len < PAGE_SIZE)
436+ zero_user_segment(page, len, PAGE_SIZE);
437437 /*
438438 * In the first loop we prepare and mark buffers to submit. We have to
439439 * mark all buffers in the page before submitting so that
fs/ext4/readpage.c+5−5
@@ -140,7 +140,7 @@ int ext4_mpage_readpages(struct address_space *mapping, · 139 unmodified lines
140140
141141 struct inode *inode = mapping->host;
142142 const unsigned blkbits = inode->i_blkbits;
143− const unsigned blocks_per_page = PAGE_CACHE_SIZE >> blkbits;
143+ const unsigned blocks_per_page = PAGE_SIZE >> blkbits;
144144 const unsigned blocksize = 1 << blkbits;
145145 sector_t block_in_file;
146146 sector_t last_block;
@@ -173,7 +173,7 @@ int ext4_mpage_readpages(struct address_space *mapping, · 26 unmodified lines
173173 if (page_has_buffers(page))
174174 goto confused;
175175
176− block_in_file = (sector_t)page->index << (PAGE_CACHE_SHIFT - blkbits);
176+ block_in_file = (sector_t)page->index << (PAGE_SHIFT - blkbits);
177177 last_block = block_in_file + nr_pages * blocks_per_page;
178178 last_block_in_file = (i_size_read(inode) + blocksize - 1) >> blkbits;
179179 if (last_block > last_block_in_file)
@@ -217,7 +217,7 @@ int ext4_mpage_readpages(struct address_space *mapping, · 37 unmodified lines
217217 set_error_page:
218218 SetPageError(page);
219219 zero_user_segment(page, 0,
220− PAGE_CACHE_SIZE);
220+ PAGE_SIZE);
221221 unlock_page(page);
222222 goto next_page;
223223 }
@@ -250,7 +250,7 @@ int ext4_mpage_readpages(struct address_space *mapping, · 26 unmodified lines
250250 }
251251 if (first_hole != blocks_per_page) {
252252 zero_user_segment(page, first_hole << blkbits,
253− PAGE_CACHE_SIZE);
253+ PAGE_SIZE);
254254 if (first_hole == 0) {
255255 SetPageUptodate(page);
256256 unlock_page(page);
@@ -319,7 +319,7 @@ int ext4_mpage_readpages(struct address_space *mapping, · 62 unmodified lines
319319 unlock_page(page);
320320 next_page:
321321 if (pages)
322− page_cache_release(page);
322+ put_page(page);
323323 }
324324 BUG_ON(pages && !list_empty(pages));
325325 if (bio)
fs/ext4/super.c+2−2
@@ -1784,7 +1784,7 @@ static int parse_options(char *options, struct super_block *sb, · 1783 unmodified lines
17841784 int blocksize =
17851785 BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
17861786
1787− if (blocksize < PAGE_CACHE_SIZE) {
1787+ if (blocksize < PAGE_SIZE) {
17881788 ext4_msg(sb, KERN_ERR, "can't mount with "
17891789 "dioread_nolock if block size != PAGE_SIZE");
17901790 return 0;
@@ -3808,7 +3808,7 @@ no_journal: · 2017 unmodified lines
38083808 }
38093809
38103810 if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) &&
3811− (blocksize != PAGE_CACHE_SIZE)) {
3811+ (blocksize != PAGE_SIZE)) {
38123812 ext4_msg(sb, KERN_ERR,
38133813 "Unsupported blocksize for fs encryption");
38143814 goto failed_mount_wq;
fs/ext4/symlink.c+2−2
@@ -80,12 +80,12 @@ static const char *ext4_encrypted_get_link(struct dentry *dentry, · 79 unmodified lines
8080 if (res <= plen)
8181 paddr[res] = '\0';
8282 if (cpage)
83− page_cache_release(cpage);
83+ put_page(cpage);
8484 set_delayed_call(done, kfree_link, paddr);
8585 return paddr;
8686 errout:
8787 if (cpage)
88− page_cache_release(cpage);
88+ put_page(cpage);
8989 kfree(paddr);
9090 return ERR_PTR(res);
9191 }
fs/f2fs/data.c+26−26
@@ -223,7 +223,7 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio) · 222 unmodified lines
223223 /* Allocate a new bio */
224224 bio = __bio_alloc(fio->sbi, fio->new_blkaddr, 1, is_read_io(fio->rw));
225225
226− if (bio_add_page(bio, page, PAGE_CACHE_SIZE, 0) < PAGE_CACHE_SIZE) {
226+ if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
227227 bio_put(bio);
228228 return -EFAULT;
229229 }
@@ -265,8 +265,8 @@ alloc_new: · 35 unmodified lines
265265
266266 bio_page = fio->encrypted_page ? fio->encrypted_page : fio->page;
267267
268− if (bio_add_page(io->bio, bio_page, PAGE_CACHE_SIZE, 0) <
269− PAGE_CACHE_SIZE) {
268+ if (bio_add_page(io->bio, bio_page, PAGE_SIZE, 0) <
269+ PAGE_SIZE) {
270270 __submit_merged_bio(io);
271271 goto alloc_new;
272272 }
@@ -406,7 +406,7 @@ got_it: · 133 unmodified lines
406406 * see, f2fs_add_link -> get_new_data_page -> init_inode_metadata.
407407 */
408408 if (dn.data_blkaddr == NEW_ADDR) {
409− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
409+ zero_user_segment(page, 0, PAGE_SIZE);
410410 SetPageUptodate(page);
411411 unlock_page(page);
412412 return page;
@@ -517,7 +517,7 @@ struct page *get_new_data_page(struct inode *inode, · 104 unmodified lines
517517 goto got_it;
518518
519519 if (dn.data_blkaddr == NEW_ADDR) {
520− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
520+ zero_user_segment(page, 0, PAGE_SIZE);
521521 SetPageUptodate(page);
522522 } else {
523523 f2fs_put_page(page, 1);
@@ -530,8 +530,8 @@ struct page *get_new_data_page(struct inode *inode, · 6 unmodified lines
530530 }
531531 got_it:
532532 if (new_i_size && i_size_read(inode) <
533− ((loff_t)(index + 1) << PAGE_CACHE_SHIFT)) {
534− i_size_write(inode, ((loff_t)(index + 1) << PAGE_CACHE_SHIFT));
533+ ((loff_t)(index + 1) << PAGE_SHIFT)) {
534+ i_size_write(inode, ((loff_t)(index + 1) << PAGE_SHIFT));
535535 /* Only the directory inode sets new_i_size */
536536 set_inode_flag(F2FS_I(inode), FI_UPDATE_DIR);
537537 }
@@ -570,9 +570,9 @@ alloc: · 32 unmodified lines
570570 /* update i_size */
571571 fofs = start_bidx_of_node(ofs_of_node(dn->node_page), dn->inode) +
572572 dn->ofs_in_node;
573− if (i_size_read(dn->inode) < ((loff_t)(fofs + 1) << PAGE_CACHE_SHIFT))
573+ if (i_size_read(dn->inode) < ((loff_t)(fofs + 1) << PAGE_SHIFT))
574574 i_size_write(dn->inode,
575− ((loff_t)(fofs + 1) << PAGE_CACHE_SHIFT));
575+ ((loff_t)(fofs + 1) << PAGE_SHIFT));
576576 return 0;
577577 }
578578
@@ -971,7 +971,7 @@ got_it: · 392 unmodified lines
971971 goto confused;
972972 }
973973 } else {
974− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
974+ zero_user_segment(page, 0, PAGE_SIZE);
975975 SetPageUptodate(page);
976976 unlock_page(page);
977977 goto next_page;
@@ -1021,7 +1021,7 @@ submit_and_realloc: · 43 unmodified lines
10211021 goto next_page;
10221022 set_error_page:
10231023 SetPageError(page);
1024− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
1024+ zero_user_segment(page, 0, PAGE_SIZE);
10251025 unlock_page(page);
10261026 goto next_page;
10271027 confused:
@@ -1032,7 +1032,7 @@ confused: · 4 unmodified lines
10321032 unlock_page(page);
10331033 next_page:
10341034 if (pages)
1035− page_cache_release(page);
1035+ put_page(page);
10361036 }
10371037 BUG_ON(pages && !list_empty(pages));
10381038 if (bio)
@@ -1136,7 +1136,7 @@ static int f2fs_write_data_page(struct page *page, · 97 unmodified lines
11361136 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
11371137 loff_t i_size = i_size_read(inode);
11381138 const pgoff_t end_index = ((unsigned long long) i_size)
1139− >> PAGE_CACHE_SHIFT;
1139+ >> PAGE_SHIFT;
11401140 unsigned offset = 0;
11411141 bool need_balance_fs = false;
11421142 int err = 0;
@@ -1157,11 +1157,11 @@ static int f2fs_write_data_page(struct page *page, · 14 unmodified lines
11571157 * If the offset is out-of-range of file size,
11581158 * this page does not have to be written to disk.
11591159 */
1160− offset = i_size & (PAGE_CACHE_SIZE - 1);
1160+ offset = i_size & (PAGE_SIZE - 1);
11611161 if ((page->index >= end_index + 1) || !offset)
11621162 goto out;
11631163
1164− zero_user_segment(page, offset, PAGE_CACHE_SIZE);
1164+ zero_user_segment(page, offset, PAGE_SIZE);
11651165 write:
11661166 if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
11671167 goto redirty_out;
@@ -1267,8 +1267,8 @@ next: · 99 unmodified lines
12671267 cycled = 0;
12681268 end = -1;
12691269 } else {
1270− index = wbc->range_start >> PAGE_CACHE_SHIFT;
1271− end = wbc->range_end >> PAGE_CACHE_SHIFT;
1270+ index = wbc->range_start >> PAGE_SHIFT;
1271+ end = wbc->range_end >> PAGE_SHIFT;
12721272 if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
12731273 range_whole = 1;
12741274 cycled = 1; /* ignore range_cyclic tests */
@@ -1448,11 +1448,11 @@ static int prepare_write_begin(struct f2fs_sb_info *sbi, · 173 unmodified lines
14481448 * the block addresses when there is no need to fill the page.
14491449 */
14501450 if (!f2fs_has_inline_data(inode) && !f2fs_encrypted_inode(inode) &&
1451− len == PAGE_CACHE_SIZE)
1451+ len == PAGE_SIZE)
14521452 return 0;
14531453
14541454 if (f2fs_has_inline_data(inode) ||
1455− (pos & PAGE_CACHE_MASK) >= i_size_read(inode)) {
1455+ (pos & PAGE_MASK) >= i_size_read(inode)) {
14561456 f2fs_lock_op(sbi);
14571457 locked = true;
14581458 }
@@ -1513,7 +1513,7 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping, · 54 unmodified lines
15131513 struct inode *inode = mapping->host;
15141514 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
15151515 struct page *page = NULL;
1516− pgoff_t index = ((unsigned long long) pos) >> PAGE_CACHE_SHIFT;
1516+ pgoff_t index = ((unsigned long long) pos) >> PAGE_SHIFT;
15171517 bool need_balance = false;
15181518 block_t blkaddr = NULL_ADDR;
15191519 int err = 0;
@@ -1561,22 +1561,22 @@ repeat: · 41 unmodified lines
15611561 if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode))
15621562 f2fs_wait_on_encrypted_page_writeback(sbi, blkaddr);
15631563
1564− if (len == PAGE_CACHE_SIZE)
1564+ if (len == PAGE_SIZE)
15651565 goto out_update;
15661566 if (PageUptodate(page))
15671567 goto out_clear;
15681568
1569− if ((pos & PAGE_CACHE_MASK) >= i_size_read(inode)) {
1570− unsigned start = pos & (PAGE_CACHE_SIZE - 1);
1569+ if ((pos & PAGE_MASK) >= i_size_read(inode)) {
1570+ unsigned start = pos & (PAGE_SIZE - 1);
15711571 unsigned end = start + len;
15721572
15731573 /* Reading beyond i_size is simple: memset to zero */
1574− zero_user_segments(page, 0, start, end, PAGE_CACHE_SIZE);
1574+ zero_user_segments(page, 0, start, end, PAGE_SIZE);
15751575 goto out_update;
15761576 }
15771577
15781578 if (blkaddr == NEW_ADDR) {
1579− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
1579+ zero_user_segment(page, 0, PAGE_SIZE);
15801580 } else {
15811581 struct f2fs_io_info fio = {
15821582 .sbi = sbi,
@@ -1688,7 +1688,7 @@ void f2fs_invalidate_page(struct page *page, unsigned int offset, · 105 unmodified lines
16881688 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
16891689
16901690 if (inode->i_ino >= F2FS_ROOT_INO(sbi) &&
1691− (offset % PAGE_CACHE_SIZE || length != PAGE_CACHE_SIZE))
1691+ (offset % PAGE_SIZE || length != PAGE_SIZE))
16921692 return;
16931693
16941694 if (PageDirty(page)) {
fs/f2fs/debug.c+3−3
@@ -164,7 +164,7 @@ static void update_mem_info(struct f2fs_sb_info *sbi) · 163 unmodified lines
164164
165165 /* build curseg */
166166 si->base_mem += sizeof(struct curseg_info) * NR_CURSEG_TYPE;
167− si->base_mem += PAGE_CACHE_SIZE * NR_CURSEG_TYPE;
167+ si->base_mem += PAGE_SIZE * NR_CURSEG_TYPE;
168168
169169 /* build dirty segmap */
170170 si->base_mem += sizeof(struct dirty_seglist_info);
@@ -201,9 +201,9 @@ get_cache: · 30 unmodified lines
201201
202202 si->page_mem = 0;
203203 npages = NODE_MAPPING(sbi)->nrpages;
204− si->page_mem += (unsigned long long)npages << PAGE_CACHE_SHIFT;
204+ si->page_mem += (unsigned long long)npages << PAGE_SHIFT;
205205 npages = META_MAPPING(sbi)->nrpages;
206− si->page_mem += (unsigned long long)npages << PAGE_CACHE_SHIFT;
206+ si->page_mem += (unsigned long long)npages << PAGE_SHIFT;
207207 }
208208
209209 static int stat_show(struct seq_file *s, void *v)
fs/f2fs/dir.c+2−2
@@ -17,8 +17,8 @@ · 16 unmodified lines
1717
1818 static unsigned long dir_blocks(struct inode *inode)
1919 {
20− return ((unsigned long long) (i_size_read(inode) + PAGE_CACHE_SIZE - 1))
21− >> PAGE_CACHE_SHIFT;
20+ return ((unsigned long long) (i_size_read(inode) + PAGE_SIZE - 1))
21+ >> PAGE_SHIFT;
2222 }
2323
2424 static unsigned int dir_buckets(unsigned int level, int dir_level)
fs/f2fs/f2fs.h+1−1
@@ -1294,7 +1294,7 @@ static inline void f2fs_put_page(struct page *page, int unlock) · 1293 unmodified lines
12941294 f2fs_bug_on(F2FS_P_SB(page), !PageLocked(page));
12951295 unlock_page(page);
12961296 }
1297− page_cache_release(page);
1297+ put_page(page);
12981298 }
12991299
13001300 static inline void f2fs_put_dnode(struct dnode_of_data *dn)
fs/f2fs/file.c+37−37
@@ -74,11 +74,11 @@ static int f2fs_vm_page_mkwrite(struct vm_area_struct *vma, · 73 unmodified lines
7474 goto mapped;
7575
7676 /* page is wholly or partially inside EOF */
77− if (((loff_t)(page->index + 1) << PAGE_CACHE_SHIFT) >
77+ if (((loff_t)(page->index + 1) << PAGE_SHIFT) >
7878 i_size_read(inode)) {
7979 unsigned offset;
80− offset = i_size_read(inode) & ~PAGE_CACHE_MASK;
81− zero_user_segment(page, offset, PAGE_CACHE_SIZE);
80+ offset = i_size_read(inode) & ~PAGE_MASK;
81+ zero_user_segment(page, offset, PAGE_SIZE);
8282 }
8383 set_page_dirty(page);
8484 SetPageUptodate(page);
@@ -346,11 +346,11 @@ static loff_t f2fs_seek_block(struct file *file, loff_t offset, int whence) · 261 unmodified lines
346346 goto found;
347347 }
348348
349− pgofs = (pgoff_t)(offset >> PAGE_CACHE_SHIFT);
349+ pgofs = (pgoff_t)(offset >> PAGE_SHIFT);
350350
351351 dirty = __get_first_dirty_index(inode->i_mapping, pgofs, whence);
352352
353− for (; data_ofs < isize; data_ofs = (loff_t)pgofs << PAGE_CACHE_SHIFT) {
353+ for (; data_ofs < isize; data_ofs = (loff_t)pgofs << PAGE_SHIFT) {
354354 set_new_dnode(&dn, inode, NULL, NULL, 0);
355355 err = get_dnode_of_data(&dn, pgofs, LOOKUP_NODE_RA);
356356 if (err && err != -ENOENT) {
@@ -370,7 +370,7 @@ static loff_t f2fs_seek_block(struct file *file, loff_t offset, int whence) · 13 unmodified lines
370370 /* find data/hole in dnode block */
371371 for (; dn.ofs_in_node < end_offset;
372372 dn.ofs_in_node++, pgofs++,
373− data_ofs = (loff_t)pgofs << PAGE_CACHE_SHIFT) {
373+ data_ofs = (loff_t)pgofs << PAGE_SHIFT) {
374374 block_t blkaddr;
375375 blkaddr = datablock_addr(dn.node_page, dn.ofs_in_node);
376376
@@ -508,8 +508,8 @@ void truncate_data_blocks(struct dnode_of_data *dn) · 131 unmodified lines
508508 static int truncate_partial_data_page(struct inode *inode, u64 from,
509509 bool cache_only)
510510 {
511− unsigned offset = from & (PAGE_CACHE_SIZE - 1);
512− pgoff_t index = from >> PAGE_CACHE_SHIFT;
511+ unsigned offset = from & (PAGE_SIZE - 1);
512+ pgoff_t index = from >> PAGE_SHIFT;
513513 struct address_space *mapping = inode->i_mapping;
514514 struct page *page;
515515
@@ -529,7 +529,7 @@ static int truncate_partial_data_page(struct inode *inode, u64 from, · 13 unmodified lines
529529 return 0;
530530 truncate_out:
531531 f2fs_wait_on_page_writeback(page, DATA, true);
532− zero_user(page, offset, PAGE_CACHE_SIZE - offset);
532+ zero_user(page, offset, PAGE_SIZE - offset);
533533 if (!cache_only || !f2fs_encrypted_inode(inode) ||
534534 !S_ISREG(inode->i_mode))
535535 set_page_dirty(page);
@@ -799,11 +799,11 @@ static int punch_hole(struct inode *inode, loff_t offset, loff_t len) · 263 unmodified lines
799799 if (ret)
800800 return ret;
801801
802− pg_start = ((unsigned long long) offset) >> PAGE_CACHE_SHIFT;
803− pg_end = ((unsigned long long) offset + len) >> PAGE_CACHE_SHIFT;
802+ pg_start = ((unsigned long long) offset) >> PAGE_SHIFT;
803+ pg_end = ((unsigned long long) offset + len) >> PAGE_SHIFT;
804804
805− off_start = offset & (PAGE_CACHE_SIZE - 1);
806− off_end = (offset + len) & (PAGE_CACHE_SIZE - 1);
805+ off_start = offset & (PAGE_SIZE - 1);
806+ off_end = (offset + len) & (PAGE_SIZE - 1);
807807
808808 if (pg_start == pg_end) {
809809 ret = fill_zero(inode, pg_start, off_start,
@@ -813,7 +813,7 @@ static int punch_hole(struct inode *inode, loff_t offset, loff_t len) · 3 unmodified lines
813813 } else {
814814 if (off_start) {
815815 ret = fill_zero(inode, pg_start++, off_start,
816− PAGE_CACHE_SIZE - off_start);
816+ PAGE_SIZE - off_start);
817817 if (ret)
818818 return ret;
819819 }
@@ -830,8 +830,8 @@ static int punch_hole(struct inode *inode, loff_t offset, loff_t len) · 10 unmodified lines
830830
831831 f2fs_balance_fs(sbi, true);
832832
833− blk_start = (loff_t)pg_start << PAGE_CACHE_SHIFT;
834− blk_end = (loff_t)pg_end << PAGE_CACHE_SHIFT;
833+ blk_start = (loff_t)pg_start << PAGE_SHIFT;
834+ blk_end = (loff_t)pg_end << PAGE_SHIFT;
835835 truncate_inode_pages_range(mapping, blk_start,
836836 blk_end - 1);
837837
@@ -954,8 +954,8 @@ static int f2fs_collapse_range(struct inode *inode, loff_t offset, loff_t len) · 116 unmodified lines
954954 if (ret)
955955 return ret;
956956
957− pg_start = offset >> PAGE_CACHE_SHIFT;
958− pg_end = (offset + len) >> PAGE_CACHE_SHIFT;
957+ pg_start = offset >> PAGE_SHIFT;
958+ pg_end = (offset + len) >> PAGE_SHIFT;
959959
960960 /* write out all dirty pages from offset */
961961 ret = filemap_write_and_wait_range(inode->i_mapping, offset, LLONG_MAX);
@@ -1006,11 +1006,11 @@ static int f2fs_zero_range(struct inode *inode, loff_t offset, loff_t len, · 44 unmodified lines
10061006
10071007 truncate_pagecache_range(inode, offset, offset + len - 1);
10081008
1009− pg_start = ((unsigned long long) offset) >> PAGE_CACHE_SHIFT;
1010− pg_end = ((unsigned long long) offset + len) >> PAGE_CACHE_SHIFT;
1009+ pg_start = ((unsigned long long) offset) >> PAGE_SHIFT;
1010+ pg_end = ((unsigned long long) offset + len) >> PAGE_SHIFT;
10111011
1012− off_start = offset & (PAGE_CACHE_SIZE - 1);
1013− off_end = (offset + len) & (PAGE_CACHE_SIZE - 1);
1012+ off_start = offset & (PAGE_SIZE - 1);
1013+ off_end = (offset + len) & (PAGE_SIZE - 1);
10141014
10151015 if (pg_start == pg_end) {
10161016 ret = fill_zero(inode, pg_start, off_start,
@@ -1024,12 +1024,12 @@ static int f2fs_zero_range(struct inode *inode, loff_t offset, loff_t len, · 7 unmodified lines
10241024 } else {
10251025 if (off_start) {
10261026 ret = fill_zero(inode, pg_start++, off_start,
1027− PAGE_CACHE_SIZE - off_start);
1027+ PAGE_SIZE - off_start);
10281028 if (ret)
10291029 return ret;
10301030
10311031 new_size = max_t(loff_t, new_size,
1032− (loff_t)pg_start << PAGE_CACHE_SHIFT);
1032+ (loff_t)pg_start << PAGE_SHIFT);
10331033 }
10341034
10351035 for (index = pg_start; index < pg_end; index++) {
@@ -1060,7 +1060,7 @@ static int f2fs_zero_range(struct inode *inode, loff_t offset, loff_t len, · 24 unmodified lines
10601060 f2fs_unlock_op(sbi);
10611061
10621062 new_size = max_t(loff_t, new_size,
1063− (loff_t)(index + 1) << PAGE_CACHE_SHIFT);
1063+ (loff_t)(index + 1) << PAGE_SHIFT);
10641064 }
10651065
10661066 if (off_end) {
@@ -1117,8 +1117,8 @@ static int f2fs_insert_range(struct inode *inode, loff_t offset, loff_t len) · 50 unmodified lines
11171117
11181118 truncate_pagecache(inode, offset);
11191119
1120− pg_start = offset >> PAGE_CACHE_SHIFT;
1121− pg_end = (offset + len) >> PAGE_CACHE_SHIFT;
1120+ pg_start = offset >> PAGE_SHIFT;
1121+ pg_end = (offset + len) >> PAGE_SHIFT;
11221122 delta = pg_end - pg_start;
11231123 nrpages = (i_size_read(inode) + PAGE_SIZE - 1) / PAGE_SIZE;
11241124
@@ -1158,11 +1158,11 @@ static int expand_inode_data(struct inode *inode, loff_t offset, · 33 unmodified lines
11581158
11591159 f2fs_balance_fs(sbi, true);
11601160
1161− pg_start = ((unsigned long long) offset) >> PAGE_CACHE_SHIFT;
1162− pg_end = ((unsigned long long) offset + len) >> PAGE_CACHE_SHIFT;
1161+ pg_start = ((unsigned long long) offset) >> PAGE_SHIFT;
1162+ pg_end = ((unsigned long long) offset + len) >> PAGE_SHIFT;
11631163
1164− off_start = offset & (PAGE_CACHE_SIZE - 1);
1165− off_end = (offset + len) & (PAGE_CACHE_SIZE - 1);
1164+ off_start = offset & (PAGE_SIZE - 1);
1165+ off_end = (offset + len) & (PAGE_SIZE - 1);
11661166
11671167 f2fs_lock_op(sbi);
11681168
@@ -1180,12 +1180,12 @@ noalloc: · 11 unmodified lines
11801180 if (pg_start == pg_end)
11811181 new_size = offset + len;
11821182 else if (index == pg_start && off_start)
1183− new_size = (loff_t)(index + 1) << PAGE_CACHE_SHIFT;
1183+ new_size = (loff_t)(index + 1) << PAGE_SHIFT;
11841184 else if (index == pg_end)
1185− new_size = ((loff_t)index << PAGE_CACHE_SHIFT) +
1185+ new_size = ((loff_t)index << PAGE_SHIFT) +
11861186 off_end;
11871187 else
1188− new_size += PAGE_CACHE_SIZE;
1188+ new_size += PAGE_SIZE;
11891189 }
11901190
11911191 if (!(mode & FALLOC_FL_KEEP_SIZE) &&
@@ -1652,8 +1652,8 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi, · 460 unmodified lines
16521652 if (need_inplace_update(inode))
16531653 return -EINVAL;
16541654
1655− pg_start = range->start >> PAGE_CACHE_SHIFT;
1656− pg_end = (range->start + range->len) >> PAGE_CACHE_SHIFT;
1655+ pg_start = range->start >> PAGE_SHIFT;
1656+ pg_end = (range->start + range->len) >> PAGE_SHIFT;
16571657
16581658 f2fs_balance_fs(sbi, true);
16591659
@@ -1770,7 +1770,7 @@ clear_out: · 110 unmodified lines
17701770 out:
17711771 inode_unlock(inode);
17721772 if (!err)
1773− range->len = (u64)total << PAGE_CACHE_SHIFT;
1773+ range->len = (u64)total << PAGE_SHIFT;
17741774 return err;
17751775 }
17761776
fs/f2fs/inline.c+5−5
@@ -51,7 +51,7 @@ void read_inline_data(struct page *page, struct page *ipage) · 50 unmodified lines
5151
5252 f2fs_bug_on(F2FS_P_SB(page), page->index);
5353
54− zero_user_segment(page, MAX_INLINE_DATA, PAGE_CACHE_SIZE);
54+ zero_user_segment(page, MAX_INLINE_DATA, PAGE_SIZE);
5555
5656 /* Copy the whole inline data block */
5757 src_addr = inline_data_addr(ipage);
@@ -93,7 +93,7 @@ int f2fs_read_inline_data(struct inode *inode, struct page *page) · 35 unmodified lines
9393 }
9494
9595 if (page->index)
96− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
96+ zero_user_segment(page, 0, PAGE_SIZE);
9797 else
9898 read_inline_data(page, ipage);
9999
@@ -375,7 +375,7 @@ static int f2fs_convert_inline_dir(struct inode *dir, struct page *ipage, · 275 unmodified lines
375375 goto out;
376376
377377 f2fs_wait_on_page_writeback(page, DATA, true);
378− zero_user_segment(page, MAX_INLINE_DATA, PAGE_CACHE_SIZE);
378+ zero_user_segment(page, MAX_INLINE_DATA, PAGE_SIZE);
379379
380380 dentry_blk = kmap_atomic(page);
381381
@@ -405,8 +405,8 @@ static int f2fs_convert_inline_dir(struct inode *dir, struct page *ipage, · 23 unmodified lines
405405 stat_dec_inline_dir(dir);
406406 clear_inode_flag(F2FS_I(dir), FI_INLINE_DENTRY);
407407
408− if (i_size_read(dir) < PAGE_CACHE_SIZE) {
409− i_size_write(dir, PAGE_CACHE_SIZE);
408+ if (i_size_read(dir) < PAGE_SIZE) {
409+ i_size_write(dir, PAGE_SIZE);
410410 set_inode_flag(F2FS_I(dir), FI_UPDATE_DIR);
411411 }
412412
fs/f2fs/namei.c+2−2
@@ -1051,12 +1051,12 @@ static const char *f2fs_encrypted_get_link(struct dentry *dentry, · 1050 unmodified lines
10511051 /* Null-terminate the name */
10521052 paddr[res] = '\0';
10531053
1054− page_cache_release(cpage);
1054+ put_page(cpage);
10551055 set_delayed_call(done, kfree_link, paddr);
10561056 return paddr;
10571057 errout:
10581058 fscrypt_fname_free_buffer(&pstr);
1059− page_cache_release(cpage);
1059+ put_page(cpage);
10601060 return ERR_PTR(res);
10611061 }
10621062
fs/f2fs/node.c+5−5
@@ -46,11 +46,11 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type) · 45 unmodified lines
4646 */
4747 if (type == FREE_NIDS) {
4848 mem_size = (nm_i->fcnt * sizeof(struct free_nid)) >>
49− PAGE_CACHE_SHIFT;
49+ PAGE_SHIFT;
5050 res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 2);
5151 } else if (type == NAT_ENTRIES) {
5252 mem_size = (nm_i->nat_cnt * sizeof(struct nat_entry)) >>
53− PAGE_CACHE_SHIFT;
53+ PAGE_SHIFT;
5454 res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 2);
5555 } else if (type == DIRTY_DENTS) {
5656 if (sbi->sb->s_bdi->wb.dirty_exceeded)
@@ -62,13 +62,13 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type) · 5 unmodified lines
6262
6363 for (i = 0; i <= UPDATE_INO; i++)
6464 mem_size += (sbi->im[i].ino_num *
65− sizeof(struct ino_entry)) >> PAGE_CACHE_SHIFT;
65+ sizeof(struct ino_entry)) >> PAGE_SHIFT;
6666 res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1);
6767 } else if (type == EXTENT_CACHE) {
6868 mem_size = (atomic_read(&sbi->total_ext_tree) *
6969 sizeof(struct extent_tree) +
7070 atomic_read(&sbi->total_ext_node) *
71− sizeof(struct extent_node)) >> PAGE_CACHE_SHIFT;
71+ sizeof(struct extent_node)) >> PAGE_SHIFT;
7272 res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1);
7373 } else {
7474 if (!sbi->sb->s_bdi->wb.dirty_exceeded)
@@ -121,7 +121,7 @@ static struct page *get_next_nat_page(struct f2fs_sb_info *sbi, nid_t nid) · 46 unmodified lines
121121
122122 src_addr = page_address(src_page);
123123 dst_addr = page_address(dst_page);
124− memcpy(dst_addr, src_addr, PAGE_CACHE_SIZE);
124+ memcpy(dst_addr, src_addr, PAGE_SIZE);
125125 set_page_dirty(dst_page);
126126 f2fs_put_page(src_page, 1);
127127
fs/f2fs/recovery.c+1−1
@@ -591,7 +591,7 @@ out: · 590 unmodified lines
591591
592592 /* truncate meta pages to be used by the recovery */
593593 truncate_inode_pages_range(META_MAPPING(sbi),
594− (loff_t)MAIN_BLKADDR(sbi) << PAGE_CACHE_SHIFT, -1);
594+ (loff_t)MAIN_BLKADDR(sbi) << PAGE_SHIFT, -1);
595595
596596 if (err) {
597597 truncate_inode_pages_final(NODE_MAPPING(sbi));
fs/f2fs/segment.c+8−8
@@ -885,12 +885,12 @@ int npages_for_summary_flush(struct f2fs_sb_info *sbi, bool for_ra) · 884 unmodified lines
885885 }
886886 }
887887
888− sum_in_page = (PAGE_CACHE_SIZE - 2 * SUM_JOURNAL_SIZE -
888+ sum_in_page = (PAGE_SIZE - 2 * SUM_JOURNAL_SIZE -
889889 SUM_FOOTER_SIZE) / SUMMARY_SIZE;
890890 if (valid_sum_count <= sum_in_page)
891891 return 1;
892892 else if ((valid_sum_count - sum_in_page) <=
893− (PAGE_CACHE_SIZE - SUM_FOOTER_SIZE) / SUMMARY_SIZE)
893+ (PAGE_SIZE - SUM_FOOTER_SIZE) / SUMMARY_SIZE)
894894 return 2;
895895 return 3;
896896 }
@@ -909,9 +909,9 @@ void update_meta_page(struct f2fs_sb_info *sbi, void *src, block_t blk_addr) · 12 unmodified lines
909909 void *dst = page_address(page);
910910
911911 if (src)
912− memcpy(dst, src, PAGE_CACHE_SIZE);
912+ memcpy(dst, src, PAGE_SIZE);
913913 else
914− memset(dst, 0, PAGE_CACHE_SIZE);
914+ memset(dst, 0, PAGE_SIZE);
915915 set_page_dirty(page);
916916 f2fs_put_page(page, 1);
917917 }
@@ -1596,7 +1596,7 @@ static int read_compacted_summaries(struct f2fs_sb_info *sbi) · 678 unmodified lines
15961596 s = (struct f2fs_summary *)(kaddr + offset);
15971597 seg_i->sum_blk->entries[j] = *s;
15981598 offset += SUMMARY_SIZE;
1599− if (offset + SUMMARY_SIZE <= PAGE_CACHE_SIZE -
1599+ if (offset + SUMMARY_SIZE <= PAGE_SIZE -
16001600 SUM_FOOTER_SIZE)
16011601 continue;
16021602
@@ -1757,7 +1757,7 @@ static void write_compacted_summaries(struct f2fs_sb_info *sbi, block_t blkaddr) · 154 unmodified lines
17571757 *summary = seg_i->sum_blk->entries[j];
17581758 written_size += SUMMARY_SIZE;
17591759
1760− if (written_size + SUMMARY_SIZE <= PAGE_CACHE_SIZE -
1760+ if (written_size + SUMMARY_SIZE <= PAGE_SIZE -
17611761 SUM_FOOTER_SIZE)
17621762 continue;
17631763
@@ -1844,7 +1844,7 @@ static struct page *get_next_sit_page(struct f2fs_sb_info *sbi, · 80 unmodified lines
18441844
18451845 src_addr = page_address(src_page);
18461846 dst_addr = page_address(dst_page);
1847− memcpy(dst_addr, src_addr, PAGE_CACHE_SIZE);
1847+ memcpy(dst_addr, src_addr, PAGE_SIZE);
18481848
18491849 set_page_dirty(dst_page);
18501850 f2fs_put_page(src_page, 1);
@@ -2171,7 +2171,7 @@ static int build_curseg(struct f2fs_sb_info *sbi) · 320 unmodified lines
21712171
21722172 for (i = 0; i < NR_CURSEG_TYPE; i++) {
21732173 mutex_init(&array[i].curseg_mutex);
2174− array[i].sum_blk = kzalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
2174+ array[i].sum_blk = kzalloc(PAGE_SIZE, GFP_KERNEL);
21752175 if (!array[i].sum_blk)
21762176 return -ENOMEM;
21772177 init_rwsem(&array[i].journal_rwsem);
fs/f2fs/super.c+2−2
@@ -1070,10 +1070,10 @@ static int sanity_check_raw_super(struct super_block *sb, · 1069 unmodified lines
10701070 }
10711071
10721072 /* Currently, support only 4KB page cache size */
1073− if (F2FS_BLKSIZE != PAGE_CACHE_SIZE) {
1073+ if (F2FS_BLKSIZE != PAGE_SIZE) {
10741074 f2fs_msg(sb, KERN_INFO,
10751075 "Invalid page_cache_size (%lu), supports only 4KB\n",
1076− PAGE_CACHE_SIZE);
1076+ PAGE_SIZE);
10771077 return 1;
10781078 }
10791079
fs/freevxfs/vxfs_immed.c+2−2
@@ -66,11 +66,11 @@ static int · 65 unmodified lines
6666 vxfs_immed_readpage(struct file *fp, struct page *pp)
6767 {
6868 struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host);
69− u_int64_t offset = (u_int64_t)pp->index << PAGE_CACHE_SHIFT;
69+ u_int64_t offset = (u_int64_t)pp->index << PAGE_SHIFT;
7070 caddr_t kaddr;
7171
7272 kaddr = kmap(pp);
73− memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_CACHE_SIZE);
73+ memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE);
7474 kunmap(pp);
7575
7676 flush_dcache_page(pp);
fs/freevxfs/vxfs_lookup.c+6−6
@@ -45,7 +45,7 @@ · 44 unmodified lines
4545 /*
4646 * Number of VxFS blocks per page.
4747 */
48−#define VXFS_BLOCK_PER_PAGE(sbp) ((PAGE_CACHE_SIZE / (sbp)->s_blocksize))
48+#define VXFS_BLOCK_PER_PAGE(sbp) ((PAGE_SIZE / (sbp)->s_blocksize))
4949
5050
5151 static struct dentry * vxfs_lookup(struct inode *, struct dentry *, unsigned int);
@@ -175,7 +175,7 @@ vxfs_inode_by_name(struct inode *dip, struct dentry *dp) · 123 unmodified lines
175175 if (de) {
176176 ino = de->d_ino;
177177 kunmap(pp);
178− page_cache_release(pp);
178+ put_page(pp);
179179 }
180180
181181 return (ino);
@@ -255,8 +255,8 @@ vxfs_readdir(struct file *fp, struct dir_context *ctx) · 73 unmodified lines
255255 nblocks = dir_blocks(ip);
256256 pblocks = VXFS_BLOCK_PER_PAGE(sbp);
257257
258− page = pos >> PAGE_CACHE_SHIFT;
259− offset = pos & ~PAGE_CACHE_MASK;
258+ page = pos >> PAGE_SHIFT;
259+ offset = pos & ~PAGE_MASK;
260260 block = (u_long)(pos >> sbp->s_blocksize_bits) % pblocks;
261261
262262 for (; page < npages; page++, block = 0) {
@@ -289,7 +289,7 @@ vxfs_readdir(struct file *fp, struct dir_context *ctx) · 26 unmodified lines
289289 continue;
290290
291291 offset = (char *)de - kaddr;
292− ctx->pos = ((page << PAGE_CACHE_SHIFT) | offset) + 2;
292+ ctx->pos = ((page << PAGE_SHIFT) | offset) + 2;
293293 if (!dir_emit(ctx, de->d_name, de->d_namelen,
294294 de->d_ino, DT_UNKNOWN)) {
295295 vxfs_put_page(pp);
@@ -301,6 +301,6 @@ vxfs_readdir(struct file *fp, struct dir_context *ctx) · 5 unmodified lines
301301 vxfs_put_page(pp);
302302 offset = 0;
303303 }
304− ctx->pos = ((page << PAGE_CACHE_SHIFT) | offset) + 2;
304+ ctx->pos = ((page << PAGE_SHIFT) | offset) + 2;
305305 return 0;
306306 }
fs/freevxfs/vxfs_subr.c+1−1
@@ -50,7 +50,7 @@ inline void · 49 unmodified lines
5050 vxfs_put_page(struct page *pp)
5151 {
5252 kunmap(pp);
53− page_cache_release(pp);
53+ put_page(pp);
5454 }
5555
5656 /**
fs/fs-writeback.c+1−1
@@ -33,7 +33,7 @@ · 32 unmodified lines
3333 /*
3434 * 4MB minimal write chunk size
3535 */
36−#define MIN_WRITEBACK_PAGES (4096UL >> (PAGE_CACHE_SHIFT - 10))
36+#define MIN_WRITEBACK_PAGES (4096UL >> (PAGE_SHIFT - 10))
3737
3838 struct wb_completion {
3939 atomic_t cnt;
fs/fscache/page.c+5−5
@@ -113,7 +113,7 @@ try_again: · 112 unmodified lines
113113
114114 wake_up_bit(&cookie->flags, 0);
115115 if (xpage)
116− page_cache_release(xpage);
116+ put_page(xpage);
117117 __fscache_uncache_page(cookie, page);
118118 return true;
119119
@@ -164,7 +164,7 @@ static void fscache_end_page_write(struct fscache_object *object, · 44 unmodified lines
164164 }
165165 spin_unlock(&object->lock);
166166 if (xpage)
167− page_cache_release(xpage);
167+ put_page(xpage);
168168 }
169169
170170 /*
@@ -884,7 +884,7 @@ void fscache_invalidate_writes(struct fscache_cookie *cookie) · 713 unmodified lines
884884 spin_unlock(&cookie->stores_lock);
885885
886886 for (i = n - 1; i >= 0; i--)
887− page_cache_release(results[i]);
887+ put_page(results[i]);
888888 }
889889
890890 _leave("");
@@ -982,7 +982,7 @@ int __fscache_write_page(struct fscache_cookie *cookie, · 91 unmodified lines
982982
983983 radix_tree_tag_set(&cookie->stores, page->index,
984984 FSCACHE_COOKIE_PENDING_TAG);
985− page_cache_get(page);
985+ get_page(page);
986986
987987 /* we only want one writer at a time, but we do need to queue new
988988 * writers after exclusive ops */
@@ -1026,7 +1026,7 @@ submit_failed: · 37 unmodified lines
10261026 radix_tree_delete(&cookie->stores, page->index);
10271027 spin_unlock(&cookie->stores_lock);
10281028 wake_cookie = __fscache_unuse_cookie(cookie);
1029− page_cache_release(page);
1029+ put_page(page);
10301030 ret = -ENOBUFS;
10311031 goto nobufs;
10321032
fs/fuse/dev.c+13−13
@@ -897,7 +897,7 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep) · 896 unmodified lines
897897 return err;
898898 }
899899
900− page_cache_get(newpage);
900+ get_page(newpage);
901901
902902 if (!(buf->flags & PIPE_BUF_FLAG_LRU))
903903 lru_cache_add_file(newpage);
@@ -912,12 +912,12 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep) · 8 unmodified lines
912912
913913 if (err) {
914914 unlock_page(newpage);
915− page_cache_release(newpage);
915+ put_page(newpage);
916916 return err;
917917 }
918918
919919 unlock_page(oldpage);
920− page_cache_release(oldpage);
920+ put_page(oldpage);
921921 cs->len = 0;
922922
923923 return 0;
@@ -951,7 +951,7 @@ static int fuse_ref_page(struct fuse_copy_state *cs, struct page *page, · 27 unmodified lines
951951 fuse_copy_finish(cs);
952952
953953 buf = cs->pipebufs;
954− page_cache_get(page);
954+ get_page(page);
955955 buf->page = page;
956956 buf->offset = offset;
957957 buf->len = count;
@@ -1435,7 +1435,7 @@ out_unlock: · 477 unmodified lines
14351435
14361436 out:
14371437 for (; page_nr < cs.nr_segs; page_nr++)
1438− page_cache_release(bufs[page_nr].page);
1438+ put_page(bufs[page_nr].page);
14391439
14401440 kfree(bufs);
14411441 return ret;
@@ -1632,8 +1632,8 @@ static int fuse_notify_store(struct fuse_conn *fc, unsigned int size, · 190 unmodified lines
16321632 goto out_up_killsb;
16331633
16341634 mapping = inode->i_mapping;
1635− index = outarg.offset >> PAGE_CACHE_SHIFT;
1636− offset = outarg.offset & ~PAGE_CACHE_MASK;
1635+ index = outarg.offset >> PAGE_SHIFT;
1636+ offset = outarg.offset & ~PAGE_MASK;
16371637 file_size = i_size_read(inode);
16381638 end = outarg.offset + outarg.size;
16391639 if (end > file_size) {
@@ -1652,13 +1652,13 @@ static int fuse_notify_store(struct fuse_conn *fc, unsigned int size, · 12 unmodified lines
16521652 if (!page)
16531653 goto out_iput;
16541654
1655− this_num = min_t(unsigned, num, PAGE_CACHE_SIZE - offset);
1655+ this_num = min_t(unsigned, num, PAGE_SIZE - offset);
16561656 err = fuse_copy_page(cs, &page, offset, this_num, 0);
16571657 if (!err && offset == 0 &&
1658− (this_num == PAGE_CACHE_SIZE || file_size == end))
1658+ (this_num == PAGE_SIZE || file_size == end))
16591659 SetPageUptodate(page);
16601660 unlock_page(page);
1661− page_cache_release(page);
1661+ put_page(page);
16621662
16631663 if (err)
16641664 goto out_iput;
@@ -1697,7 +1697,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode, · 32 unmodified lines
16971697 size_t total_len = 0;
16981698 int num_pages;
16991699
1700− offset = outarg->offset & ~PAGE_CACHE_MASK;
1700+ offset = outarg->offset & ~PAGE_MASK;
17011701 file_size = i_size_read(inode);
17021702
17031703 num = outarg->size;
@@ -1720,7 +1720,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode, · 16 unmodified lines
17201720 req->page_descs[0].offset = offset;
17211721 req->end = fuse_retrieve_end;
17221722
1723− index = outarg->offset >> PAGE_CACHE_SHIFT;
1723+ index = outarg->offset >> PAGE_SHIFT;
17241724
17251725 while (num && req->num_pages < num_pages) {
17261726 struct page *page;
@@ -1730,7 +1730,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode, · 3 unmodified lines
17301730 if (!page)
17311731 break;
17321732
1733− this_num = min_t(unsigned, num, PAGE_CACHE_SIZE - offset);
1733+ this_num = min_t(unsigned, num, PAGE_SIZE - offset);
17341734 req->pages[req->num_pages] = page;
17351735 req->page_descs[req->num_pages].length = this_num;
17361736 req->num_pages++;
fs/fuse/file.c+36−36
@@ -348,7 +348,7 @@ static bool fuse_range_is_writeback(struct inode *inode, pgoff_t idx_from, · 347 unmodified lines
348348 pgoff_t curr_index;
349349
350350 BUG_ON(req->inode != inode);
351− curr_index = req->misc.write.in.offset >> PAGE_CACHE_SHIFT;
351+ curr_index = req->misc.write.in.offset >> PAGE_SHIFT;
352352 if (idx_from < curr_index + req->num_pages &&
353353 curr_index <= idx_to) {
354354 found = true;
@@ -683,11 +683,11 @@ static void fuse_short_read(struct fuse_req *req, struct inode *inode, · 328 unmodified lines
683683 * present there.
684684 */
685685 int i;
686− int start_idx = num_read >> PAGE_CACHE_SHIFT;
687− size_t off = num_read & (PAGE_CACHE_SIZE - 1);
686+ int start_idx = num_read >> PAGE_SHIFT;
687+ size_t off = num_read & (PAGE_SIZE - 1);
688688
689689 for (i = start_idx; i < req->num_pages; i++) {
690− zero_user_segment(req->pages[i], off, PAGE_CACHE_SIZE);
690+ zero_user_segment(req->pages[i], off, PAGE_SIZE);
691691 off = 0;
692692 }
693693 } else {
@@ -704,7 +704,7 @@ static int fuse_do_readpage(struct file *file, struct page *page) · 10 unmodified lines
704704 struct fuse_req *req;
705705 size_t num_read;
706706 loff_t pos = page_offset(page);
707− size_t count = PAGE_CACHE_SIZE;
707+ size_t count = PAGE_SIZE;
708708 u64 attr_ver;
709709 int err;
710710
@@ -789,7 +789,7 @@ static void fuse_readpages_end(struct fuse_conn *fc, struct fuse_req *req) · 78 unmodified lines
789789 else
790790 SetPageError(page);
791791 unlock_page(page);
792− page_cache_release(page);
792+ put_page(page);
793793 }
794794 if (req->ff)
795795 fuse_file_put(req->ff, false);
@@ -800,7 +800,7 @@ static void fuse_send_readpages(struct fuse_req *req, struct file *file) · 4 unmodified lines
800800 struct fuse_file *ff = file->private_data;
801801 struct fuse_conn *fc = ff->fc;
802802 loff_t pos = page_offset(req->pages[0]);
803− size_t count = req->num_pages << PAGE_CACHE_SHIFT;
803+ size_t count = req->num_pages << PAGE_SHIFT;
804804
805805 req->out.argpages = 1;
806806 req->out.page_zeroing = 1;
@@ -836,7 +836,7 @@ static int fuse_readpages_fill(void *_data, struct page *page) · 29 unmodified lines
836836
837837 if (req->num_pages &&
838838 (req->num_pages == FUSE_MAX_PAGES_PER_REQ ||
839− (req->num_pages + 1) * PAGE_CACHE_SIZE > fc->max_read ||
839+ (req->num_pages + 1) * PAGE_SIZE > fc->max_read ||
840840 req->pages[req->num_pages - 1]->index + 1 != page->index)) {
841841 int nr_alloc = min_t(unsigned, data->nr_pages,
842842 FUSE_MAX_PAGES_PER_REQ);
@@ -858,7 +858,7 @@ static int fuse_readpages_fill(void *_data, struct page *page) · 15 unmodified lines
858858 return -EIO;
859859 }
860860
861− page_cache_get(page);
861+ get_page(page);
862862 req->pages[req->num_pages] = page;
863863 req->page_descs[req->num_pages].length = PAGE_SIZE;
864864 req->num_pages++;
@@ -1003,17 +1003,17 @@ static size_t fuse_send_write_pages(struct fuse_req *req, struct file *file, · 138 unmodified lines
10031003 for (i = 0; i < req->num_pages; i++) {
10041004 struct page *page = req->pages[i];
10051005
1006− if (!req->out.h.error && !offset && count >= PAGE_CACHE_SIZE)
1006+ if (!req->out.h.error && !offset && count >= PAGE_SIZE)
10071007 SetPageUptodate(page);
10081008
1009− if (count > PAGE_CACHE_SIZE - offset)
1010− count -= PAGE_CACHE_SIZE - offset;
1009+ if (count > PAGE_SIZE - offset)
1010+ count -= PAGE_SIZE - offset;
10111011 else
10121012 count = 0;
10131013 offset = 0;
10141014
10151015 unlock_page(page);
1016− page_cache_release(page);
1016+ put_page(page);
10171017 }
10181018
10191019 return res;
@@ -1024,7 +1024,7 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req, · 4 unmodified lines
10241024 struct iov_iter *ii, loff_t pos)
10251025 {
10261026 struct fuse_conn *fc = get_fuse_conn(mapping->host);
1027− unsigned offset = pos & (PAGE_CACHE_SIZE - 1);
1027+ unsigned offset = pos & (PAGE_SIZE - 1);
10281028 size_t count = 0;
10291029 int err;
10301030
@@ -1034,8 +1034,8 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req, · 3 unmodified lines
10341034 do {
10351035 size_t tmp;
10361036 struct page *page;
1037− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
1038− size_t bytes = min_t(size_t, PAGE_CACHE_SIZE - offset,
1037+ pgoff_t index = pos >> PAGE_SHIFT;
1038+ size_t bytes = min_t(size_t, PAGE_SIZE - offset,
10391039 iov_iter_count(ii));
10401040
10411041 bytes = min_t(size_t, bytes, fc->max_write - count);
@@ -1059,7 +1059,7 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req, · 17 unmodified lines
10591059 iov_iter_advance(ii, tmp);
10601060 if (!tmp) {
10611061 unlock_page(page);
1062− page_cache_release(page);
1062+ put_page(page);
10631063 bytes = min(bytes, iov_iter_single_seg_count(ii));
10641064 goto again;
10651065 }
@@ -1072,7 +1072,7 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req, · 6 unmodified lines
10721072 count += tmp;
10731073 pos += tmp;
10741074 offset += tmp;
1075− if (offset == PAGE_CACHE_SIZE)
1075+ if (offset == PAGE_SIZE)
10761076 offset = 0;
10771077
10781078 if (!fc->big_writes)
@@ -1086,8 +1086,8 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req, · 7 unmodified lines
10861086 static inline unsigned fuse_wr_pages(loff_t pos, size_t len)
10871087 {
10881088 return min_t(unsigned,
1089− ((pos + len - 1) >> PAGE_CACHE_SHIFT) -
1090− (pos >> PAGE_CACHE_SHIFT) + 1,
1089+ ((pos + len - 1) >> PAGE_SHIFT) -
1090+ (pos >> PAGE_SHIFT) + 1,
10911091 FUSE_MAX_PAGES_PER_REQ);
10921092 }
10931093
@@ -1205,8 +1205,8 @@ static ssize_t fuse_file_write_iter(struct kiocb *iocb, struct iov_iter *from) · 111 unmodified lines
12051205 goto out;
12061206
12071207 invalidate_mapping_pages(file->f_mapping,
1208− pos >> PAGE_CACHE_SHIFT,
1209− endbyte >> PAGE_CACHE_SHIFT);
1208+ pos >> PAGE_SHIFT,
1209+ endbyte >> PAGE_SHIFT);
12101210
12111211 written += written_buffered;
12121212 iocb->ki_pos = pos + written_buffered;
@@ -1315,8 +1315,8 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, · 102 unmodified lines
13151315 size_t nmax = write ? fc->max_write : fc->max_read;
13161316 loff_t pos = *ppos;
13171317 size_t count = iov_iter_count(iter);
1318− pgoff_t idx_from = pos >> PAGE_CACHE_SHIFT;
1319− pgoff_t idx_to = (pos + count - 1) >> PAGE_CACHE_SHIFT;
1318+ pgoff_t idx_from = pos >> PAGE_SHIFT;
1319+ pgoff_t idx_to = (pos + count - 1) >> PAGE_SHIFT;
13201320 ssize_t res = 0;
13211321 struct fuse_req *req;
13221322 int err = 0;
@@ -1466,7 +1466,7 @@ __acquires(fc->lock) · 143 unmodified lines
14661466 {
14671467 struct fuse_inode *fi = get_fuse_inode(req->inode);
14681468 struct fuse_write_in *inarg = &req->misc.write.in;
1469− __u64 data_size = req->num_pages * PAGE_CACHE_SIZE;
1469+ __u64 data_size = req->num_pages * PAGE_SIZE;
14701470
14711471 if (!fc->connected)
14721472 goto out_free;
@@ -1727,7 +1727,7 @@ static bool fuse_writepage_in_flight(struct fuse_req *new_req, · 254 unmodified lines
17271727 list_del(&new_req->writepages_entry);
17281728 list_for_each_entry(old_req, &fi->writepages, writepages_entry) {
17291729 BUG_ON(old_req->inode != new_req->inode);
1730− curr_index = old_req->misc.write.in.offset >> PAGE_CACHE_SHIFT;
1730+ curr_index = old_req->misc.write.in.offset >> PAGE_SHIFT;
17311731 if (curr_index <= page->index &&
17321732 page->index < curr_index + old_req->num_pages) {
17331733 found = true;
@@ -1742,7 +1742,7 @@ static bool fuse_writepage_in_flight(struct fuse_req *new_req, · 8 unmodified lines
17421742 new_req->num_pages = 1;
17431743 for (tmp = old_req; tmp != NULL; tmp = tmp->misc.write.next) {
17441744 BUG_ON(tmp->inode != new_req->inode);
1745− curr_index = tmp->misc.write.in.offset >> PAGE_CACHE_SHIFT;
1745+ curr_index = tmp->misc.write.in.offset >> PAGE_SHIFT;
17461746 if (tmp->num_pages == 1 &&
17471747 curr_index == page->index) {
17481748 old_req = tmp;
@@ -1799,7 +1799,7 @@ static int fuse_writepages_fill(struct page *page, · 50 unmodified lines
17991799
18001800 if (req && req->num_pages &&
18011801 (is_writeback || req->num_pages == FUSE_MAX_PAGES_PER_REQ ||
1802− (req->num_pages + 1) * PAGE_CACHE_SIZE > fc->max_write ||
1802+ (req->num_pages + 1) * PAGE_SIZE > fc->max_write ||
18031803 data->orig_pages[req->num_pages - 1]->index + 1 != page->index)) {
18041804 fuse_writepages_send(data);
18051805 data->req = NULL;
@@ -1924,7 +1924,7 @@ static int fuse_write_begin(struct file *file, struct address_space *mapping, · 118 unmodified lines
19241924 loff_t pos, unsigned len, unsigned flags,
19251925 struct page **pagep, void **fsdata)
19261926 {
1927− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
1927+ pgoff_t index = pos >> PAGE_SHIFT;
19281928 struct fuse_conn *fc = get_fuse_conn(file_inode(file));
19291929 struct page *page;
19301930 loff_t fsize;
@@ -1938,15 +1938,15 @@ static int fuse_write_begin(struct file *file, struct address_space *mapping, · 7 unmodified lines
19381938
19391939 fuse_wait_on_page_writeback(mapping->host, page->index);
19401940
1941− if (PageUptodate(page) || len == PAGE_CACHE_SIZE)
1941+ if (PageUptodate(page) || len == PAGE_SIZE)
19421942 goto success;
19431943 /*
19441944 * Check if the start this page comes after the end of file, in which
19451945 * case the readpage can be optimized away.
19461946 */
19471947 fsize = i_size_read(mapping->host);
1948− if (fsize <= (pos & PAGE_CACHE_MASK)) {
1949− size_t off = pos & ~PAGE_CACHE_MASK;
1948+ if (fsize <= (pos & PAGE_MASK)) {
1949+ size_t off = pos & ~PAGE_MASK;
19501950 if (off)
19511951 zero_user_segment(page, 0, off);
19521952 goto success;
@@ -1960,7 +1960,7 @@ success: · 7 unmodified lines
19601960
19611961 cleanup:
19621962 unlock_page(page);
1963− page_cache_release(page);
1963+ put_page(page);
19641964 error:
19651965 return err;
19661966 }
@@ -1973,16 +1973,16 @@ static int fuse_write_end(struct file *file, struct address_space *mapping, · 6 unmodified lines
19731973
19741974 if (!PageUptodate(page)) {
19751975 /* Zero any unwritten bytes at the end of the page */
1976− size_t endoff = (pos + copied) & ~PAGE_CACHE_MASK;
1976+ size_t endoff = (pos + copied) & ~PAGE_MASK;
19771977 if (endoff)
1978− zero_user_segment(page, endoff, PAGE_CACHE_SIZE);
1978+ zero_user_segment(page, endoff, PAGE_SIZE);
19791979 SetPageUptodate(page);
19801980 }
19811981
19821982 fuse_write_update_size(inode, pos + copied);
19831983 set_page_dirty(page);
19841984 unlock_page(page);
1985− page_cache_release(page);
1985+ put_page(page);
19861986
19871987 return copied;
19881988 }
fs/fuse/inode.c+8−8
@@ -339,11 +339,11 @@ int fuse_reverse_inval_inode(struct super_block *sb, u64 nodeid, · 338 unmodified lines
339339
340340 fuse_invalidate_attr(inode);
341341 if (offset >= 0) {
342− pg_start = offset >> PAGE_CACHE_SHIFT;
342+ pg_start = offset >> PAGE_SHIFT;
343343 if (len <= 0)
344344 pg_end = -1;
345345 else
346− pg_end = (offset + len - 1) >> PAGE_CACHE_SHIFT;
346+ pg_end = (offset + len - 1) >> PAGE_SHIFT;
347347 invalidate_inode_pages2_range(inode->i_mapping,
348348 pg_start, pg_end);
349349 }
@@ -864,7 +864,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) · 514 unmodified lines
864864 process_init_limits(fc, arg);
865865
866866 if (arg->minor >= 6) {
867− ra_pages = arg->max_readahead / PAGE_CACHE_SIZE;
867+ ra_pages = arg->max_readahead / PAGE_SIZE;
868868 if (arg->flags & FUSE_ASYNC_READ)
869869 fc->async_read = 1;
870870 if (!(arg->flags & FUSE_POSIX_LOCKS))
@@ -901,7 +901,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) · 30 unmodified lines
901901 if (arg->time_gran && arg->time_gran <= 1000000000)
902902 fc->sb->s_time_gran = arg->time_gran;
903903 } else {
904− ra_pages = fc->max_read / PAGE_CACHE_SIZE;
904+ ra_pages = fc->max_read / PAGE_SIZE;
905905 fc->no_lock = 1;
906906 fc->no_flock = 1;
907907 }
@@ -922,7 +922,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req) · 14 unmodified lines
922922
923923 arg->major = FUSE_KERNEL_VERSION;
924924 arg->minor = FUSE_KERNEL_MINOR_VERSION;
925− arg->max_readahead = fc->bdi.ra_pages * PAGE_CACHE_SIZE;
925+ arg->max_readahead = fc->bdi.ra_pages * PAGE_SIZE;
926926 arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC |
927927 FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_DONT_MASK |
928928 FUSE_SPLICE_WRITE | FUSE_SPLICE_MOVE | FUSE_SPLICE_READ |
@@ -955,7 +955,7 @@ static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb) · 26 unmodified lines
955955 int err;
956956
957957 fc->bdi.name = "fuse";
958− fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
958+ fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_SIZE;
959959 /* fuse does it's own writeback accounting */
960960 fc->bdi.capabilities = BDI_CAP_NO_ACCT_WB | BDI_CAP_STRICTLIMIT;
961961
@@ -1053,8 +1053,8 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) · 91 unmodified lines
10531053 goto err;
10541054 #endif
10551055 } else {
1056− sb->s_blocksize = PAGE_CACHE_SIZE;
1057− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
1056+ sb->s_blocksize = PAGE_SIZE;
1057+ sb->s_blocksize_bits = PAGE_SHIFT;
10581058 }
10591059 sb->s_magic = FUSE_SUPER_MAGIC;
10601060 sb->s_op = &fuse_super_operations;
fs/gfs2/aops.c+22−22
@@ -101,7 +101,7 @@ static int gfs2_writepage_common(struct page *page, · 100 unmodified lines
101101 struct gfs2_inode *ip = GFS2_I(inode);
102102 struct gfs2_sbd *sdp = GFS2_SB(inode);
103103 loff_t i_size = i_size_read(inode);
104− pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
104+ pgoff_t end_index = i_size >> PAGE_SHIFT;
105105 unsigned offset;
106106
107107 if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
@@ -109,9 +109,9 @@ static int gfs2_writepage_common(struct page *page, · 1 unmodified line
109109 if (current->journal_info)
110110 goto redirty;
111111 /* Is the page fully outside i_size? (truncate in progress) */
112− offset = i_size & (PAGE_CACHE_SIZE-1);
112+ offset = i_size & (PAGE_SIZE-1);
113113 if (page->index > end_index || (page->index == end_index && !offset)) {
114− page->mapping->a_ops->invalidatepage(page, 0, PAGE_CACHE_SIZE);
114+ page->mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
115115 goto out;
116116 }
117117 return 1;
@@ -238,7 +238,7 @@ static int gfs2_write_jdata_pagevec(struct address_space *mapping, · 120 unmodified lines
238238 {
239239 struct inode *inode = mapping->host;
240240 struct gfs2_sbd *sdp = GFS2_SB(inode);
241− unsigned nrblocks = nr_pages * (PAGE_CACHE_SIZE/inode->i_sb->s_blocksize);
241+ unsigned nrblocks = nr_pages * (PAGE_SIZE/inode->i_sb->s_blocksize);
242242 int i;
243243 int ret;
244244
@@ -366,8 +366,8 @@ static int gfs2_write_cache_jdata(struct address_space *mapping, · 121 unmodified lines
366366 cycled = 0;
367367 end = -1;
368368 } else {
369− index = wbc->range_start >> PAGE_CACHE_SHIFT;
370− end = wbc->range_end >> PAGE_CACHE_SHIFT;
369+ index = wbc->range_start >> PAGE_SHIFT;
370+ end = wbc->range_end >> PAGE_SHIFT;
371371 if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
372372 range_whole = 1;
373373 cycled = 1; /* ignore range_cyclic tests */
@@ -458,7 +458,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) · 84 unmodified lines
458458 * so we need to supply one here. It doesn't happen often.
459459 */
460460 if (unlikely(page->index)) {
461− zero_user(page, 0, PAGE_CACHE_SIZE);
461+ zero_user(page, 0, PAGE_SIZE);
462462 SetPageUptodate(page);
463463 return 0;
464464 }
@@ -471,7 +471,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) · 6 unmodified lines
471471 if (dsize > (dibh->b_size - sizeof(struct gfs2_dinode)))
472472 dsize = (dibh->b_size - sizeof(struct gfs2_dinode));
473473 memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize);
474− memset(kaddr + dsize, 0, PAGE_CACHE_SIZE - dsize);
474+ memset(kaddr + dsize, 0, PAGE_SIZE - dsize);
475475 kunmap_atomic(kaddr);
476476 flush_dcache_page(page);
477477 brelse(dibh);
@@ -560,8 +560,8 @@ int gfs2_internal_read(struct gfs2_inode *ip, char *buf, loff_t *pos, · 82 unmodified lines
560560 unsigned size)
561561 {
562562 struct address_space *mapping = ip->i_inode.i_mapping;
563− unsigned long index = *pos / PAGE_CACHE_SIZE;
564− unsigned offset = *pos & (PAGE_CACHE_SIZE - 1);
563+ unsigned long index = *pos / PAGE_SIZE;
564+ unsigned offset = *pos & (PAGE_SIZE - 1);
565565 unsigned copied = 0;
566566 unsigned amt;
567567 struct page *page;
@@ -569,15 +569,15 @@ int gfs2_internal_read(struct gfs2_inode *ip, char *buf, loff_t *pos, · 1 unmodified line
569569
570570 do {
571571 amt = size - copied;
572− if (offset + size > PAGE_CACHE_SIZE)
573− amt = PAGE_CACHE_SIZE - offset;
572+ if (offset + size > PAGE_SIZE)
573+ amt = PAGE_SIZE - offset;
574574 page = read_cache_page(mapping, index, __gfs2_readpage, NULL);
575575 if (IS_ERR(page))
576576 return PTR_ERR(page);
577577 p = kmap_atomic(page);
578578 memcpy(buf + copied, p + offset, amt);
579579 kunmap_atomic(p);
580− page_cache_release(page);
580+ put_page(page);
581581 copied += amt;
582582 index++;
583583 offset = 0;
@@ -651,8 +651,8 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping, · 67 unmodified lines
651651 unsigned requested = 0;
652652 int alloc_required;
653653 int error = 0;
654− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
655− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
654+ pgoff_t index = pos >> PAGE_SHIFT;
655+ unsigned from = pos & (PAGE_SIZE - 1);
656656 struct page *page;
657657
658658 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &ip->i_gh);
@@ -697,7 +697,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping, · 38 unmodified lines
697697 rblocks += gfs2_rg_blocks(ip, requested);
698698
699699 error = gfs2_trans_begin(sdp, rblocks,
700− PAGE_CACHE_SIZE/sdp->sd_sb.sb_bsize);
700+ PAGE_SIZE/sdp->sd_sb.sb_bsize);
701701 if (error)
702702 goto out_trans_fail;
703703
@@ -727,7 +727,7 @@ out: · 23 unmodified lines
727727 return 0;
728728
729729 unlock_page(page);
730− page_cache_release(page);
730+ put_page(page);
731731
732732 gfs2_trans_end(sdp);
733733 if (pos + len > ip->i_inode.i_size)
@@ -827,7 +827,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh, · 93 unmodified lines
827827 if (!PageUptodate(page))
828828 SetPageUptodate(page);
829829 unlock_page(page);
830− page_cache_release(page);
830+ put_page(page);
831831
832832 if (copied) {
833833 if (inode->i_size < to)
@@ -877,7 +877,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping, · 43 unmodified lines
877877 struct gfs2_sbd *sdp = GFS2_SB(inode);
878878 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
879879 struct buffer_head *dibh;
880− unsigned int from = pos & (PAGE_CACHE_SIZE - 1);
880+ unsigned int from = pos & (PAGE_SIZE - 1);
881881 unsigned int to = from + len;
882882 int ret;
883883 struct gfs2_trans *tr = current->journal_info;
@@ -888,7 +888,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping, · 4 unmodified lines
888888 ret = gfs2_meta_inode_buffer(ip, &dibh);
889889 if (unlikely(ret)) {
890890 unlock_page(page);
891− page_cache_release(page);
891+ put_page(page);
892892 goto failed;
893893 }
894894
@@ -992,7 +992,7 @@ static void gfs2_invalidatepage(struct page *page, unsigned int offset, · 97 unmodified lines
992992 {
993993 struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);
994994 unsigned int stop = offset + length;
995− int partial_page = (offset || length < PAGE_CACHE_SIZE);
995+ int partial_page = (offset || length < PAGE_SIZE);
996996 struct buffer_head *bh, *head;
997997 unsigned long pos = 0;
998998
@@ -1082,7 +1082,7 @@ static ssize_t gfs2_direct_IO(struct kiocb *iocb, struct iov_iter *iter, · 83 unmodified lines
10821082 * the first place, mapping->nr_pages will always be zero.
10831083 */
10841084 if (mapping->nrpages) {
1085− loff_t lstart = offset & ~(PAGE_CACHE_SIZE - 1);
1085+ loff_t lstart = offset & ~(PAGE_SIZE - 1);
10861086 loff_t len = iov_iter_count(iter);
10871087 loff_t end = PAGE_ALIGN(offset + len) - 1;
10881088
fs/gfs2/bmap.c+6−6
@@ -75,7 +75,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, · 74 unmodified lines
7575 dsize = dibh->b_size - sizeof(struct gfs2_dinode);
7676
7777 memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize);
78− memset(kaddr + dsize, 0, PAGE_CACHE_SIZE - dsize);
78+ memset(kaddr + dsize, 0, PAGE_SIZE - dsize);
7979 kunmap(page);
8080
8181 SetPageUptodate(page);
@@ -98,7 +98,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, · 16 unmodified lines
9898
9999 if (release) {
100100 unlock_page(page);
101− page_cache_release(page);
101+ put_page(page);
102102 }
103103
104104 return 0;
@@ -932,8 +932,8 @@ static int gfs2_block_truncate_page(struct address_space *mapping, loff_t from) · 827 unmodified lines
932932 {
933933 struct inode *inode = mapping->host;
934934 struct gfs2_inode *ip = GFS2_I(inode);
935− unsigned long index = from >> PAGE_CACHE_SHIFT;
936− unsigned offset = from & (PAGE_CACHE_SIZE-1);
935+ unsigned long index = from >> PAGE_SHIFT;
936+ unsigned offset = from & (PAGE_SIZE-1);
937937 unsigned blocksize, iblock, length, pos;
938938 struct buffer_head *bh;
939939 struct page *page;
@@ -945,7 +945,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping, loff_t from) · 5 unmodified lines
945945
946946 blocksize = inode->i_sb->s_blocksize;
947947 length = blocksize - (offset & (blocksize - 1));
948− iblock = index << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);
948+ iblock = index << (PAGE_SHIFT - inode->i_sb->s_blocksize_bits);
949949
950950 if (!page_has_buffers(page))
951951 create_empty_buffers(page, blocksize, 0);
@@ -989,7 +989,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping, loff_t from) · 37 unmodified lines
989989 mark_buffer_dirty(bh);
990990 unlock:
991991 unlock_page(page);
992− page_cache_release(page);
992+ put_page(page);
993993 return err;
994994 }
995995
fs/gfs2/file.c+8−8
@@ -354,8 +354,8 @@ static int gfs2_allocate_page_backing(struct page *page) · 353 unmodified lines
354354 {
355355 struct inode *inode = page->mapping->host;
356356 struct buffer_head bh;
357− unsigned long size = PAGE_CACHE_SIZE;
358− u64 lblock = page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
357+ unsigned long size = PAGE_SIZE;
358+ u64 lblock = page->index << (PAGE_SHIFT - inode->i_blkbits);
359359
360360 do {
361361 bh.b_state = 0;
@@ -386,7 +386,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 24 unmodified lines
386386 struct gfs2_sbd *sdp = GFS2_SB(inode);
387387 struct gfs2_alloc_parms ap = { .aflags = 0, };
388388 unsigned long last_index;
389− u64 pos = page->index << PAGE_CACHE_SHIFT;
389+ u64 pos = page->index << PAGE_SHIFT;
390390 unsigned int data_blocks, ind_blocks, rblocks;
391391 struct gfs2_holder gh;
392392 loff_t size;
@@ -401,7 +401,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 8 unmodified lines
401401 if (ret)
402402 goto out;
403403
404− gfs2_size_hint(vma->vm_file, pos, PAGE_CACHE_SIZE);
404+ gfs2_size_hint(vma->vm_file, pos, PAGE_SIZE);
405405
406406 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
407407 ret = gfs2_glock_nq(&gh);
@@ -411,7 +411,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 3 unmodified lines
411411 set_bit(GLF_DIRTY, &ip->i_gl->gl_flags);
412412 set_bit(GIF_SW_PAGED, &ip->i_flags);
413413
414− if (!gfs2_write_alloc_required(ip, pos, PAGE_CACHE_SIZE)) {
414+ if (!gfs2_write_alloc_required(ip, pos, PAGE_SIZE)) {
415415 lock_page(page);
416416 if (!PageUptodate(page) || page->mapping != inode->i_mapping) {
417417 ret = -EAGAIN;
@@ -424,7 +424,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 6 unmodified lines
424424 if (ret)
425425 goto out_unlock;
426426
427− gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks);
427+ gfs2_write_calc_reserv(ip, PAGE_SIZE, &data_blocks, &ind_blocks);
428428 ap.target = data_blocks + ind_blocks;
429429 ret = gfs2_quota_lock_check(ip, &ap);
430430 if (ret)
@@ -447,7 +447,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) · 16 unmodified lines
447447 lock_page(page);
448448 ret = -EINVAL;
449449 size = i_size_read(inode);
450− last_index = (size - 1) >> PAGE_CACHE_SHIFT;
450+ last_index = (size - 1) >> PAGE_SHIFT;
451451 /* Check page index against inode size */
452452 if (size == 0 || (page->index > last_index))
453453 goto out_trans_end;
@@ -873,7 +873,7 @@ static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t · 419 unmodified lines
873873 rblocks += data_blocks ? data_blocks : 1;
874874
875875 error = gfs2_trans_begin(sdp, rblocks,
876− PAGE_CACHE_SIZE/sdp->sd_sb.sb_bsize);
876+ PAGE_SIZE/sdp->sd_sb.sb_bsize);
877877 if (error)
878878 goto out_trans_fail;
879879
fs/gfs2/meta_io.c+2−2
@@ -124,7 +124,7 @@ struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, int create) · 123 unmodified lines
124124 if (mapping == NULL)
125125 mapping = &sdp->sd_aspace;
126126
127− shift = PAGE_CACHE_SHIFT - sdp->sd_sb.sb_bsize_shift;
127+ shift = PAGE_SHIFT - sdp->sd_sb.sb_bsize_shift;
128128 index = blkno >> shift; /* convert block to page */
129129 bufnum = blkno - (index << shift); /* block buf index within page */
130130
@@ -154,7 +154,7 @@ struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, int create) · 23 unmodified lines
154154 map_bh(bh, sdp->sd_vfs, blkno);
155155
156156 unlock_page(page);
157− page_cache_release(page);
157+ put_page(page);
158158
159159 return bh;
160160 }
fs/gfs2/quota.c+7−7
@@ -701,7 +701,7 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, · 700 unmodified lines
701701 unsigned to_write = bytes, pg_off = off;
702702 int done = 0;
703703
704− blk = index << (PAGE_CACHE_SHIFT - sdp->sd_sb.sb_bsize_shift);
704+ blk = index << (PAGE_SHIFT - sdp->sd_sb.sb_bsize_shift);
705705 boff = off % bsize;
706706
707707 page = find_or_create_page(mapping, index, GFP_NOFS);
@@ -753,13 +753,13 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, · 45 unmodified lines
753753 flush_dcache_page(page);
754754 kunmap_atomic(kaddr);
755755 unlock_page(page);
756− page_cache_release(page);
756+ put_page(page);
757757
758758 return 0;
759759
760760 unlock_out:
761761 unlock_page(page);
762− page_cache_release(page);
762+ put_page(page);
763763 return -EIO;
764764 }
765765
@@ -773,13 +773,13 @@ static int gfs2_write_disk_quota(struct gfs2_inode *ip, struct gfs2_quota *qp, · 7 unmodified lines
773773
774774 nbytes = sizeof(struct gfs2_quota);
775775
776− pg_beg = loc >> PAGE_CACHE_SHIFT;
777− pg_off = loc % PAGE_CACHE_SIZE;
776+ pg_beg = loc >> PAGE_SHIFT;
777+ pg_off = loc % PAGE_SIZE;
778778
779779 /* If the quota straddles a page boundary, split the write in two */
780− if ((pg_off + nbytes) > PAGE_CACHE_SIZE) {
780+ if ((pg_off + nbytes) > PAGE_SIZE) {
781781 pg_oflow = 1;
782− overflow = (pg_off + nbytes) - PAGE_CACHE_SIZE;
782+ overflow = (pg_off + nbytes) - PAGE_SIZE;
783783 }
784784
785785 ptr = qp;
fs/gfs2/rgrp.c+2−3
@@ -918,9 +918,8 @@ static int read_rindex_entry(struct gfs2_inode *ip) · 917 unmodified lines
918918 goto fail;
919919
920920 rgd->rd_gl->gl_object = rgd;
921− rgd->rd_gl->gl_vm.start = (rgd->rd_addr * bsize) & PAGE_CACHE_MASK;
922− rgd->rd_gl->gl_vm.end = PAGE_CACHE_ALIGN((rgd->rd_addr +
923− rgd->rd_length) * bsize) - 1;
921+ rgd->rd_gl->gl_vm.start = (rgd->rd_addr * bsize) & PAGE_MASK;
922+ rgd->rd_gl->gl_vm.end = PAGE_ALIGN((rgd->rd_addr + rgd->rd_length) * bsize) - 1;
924923 rgd->rd_rgl = (struct gfs2_rgrp_lvb *)rgd->rd_gl->gl_lksb.sb_lvbptr;
925924 rgd->rd_flags &= ~(GFS2_RDF_UPTODATE | GFS2_RDF_PREFERRED);
926925 if (rgd->rd_data > sdp->sd_max_rg_data)
fs/hfs/bnode.c+6−6
@@ -278,14 +278,14 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) · 277 unmodified lines
278278
279279 mapping = tree->inode->i_mapping;
280280 off = (loff_t)cnid * tree->node_size;
281− block = off >> PAGE_CACHE_SHIFT;
282− node->page_offset = off & ~PAGE_CACHE_MASK;
281+ block = off >> PAGE_SHIFT;
282+ node->page_offset = off & ~PAGE_MASK;
283283 for (i = 0; i < tree->pages_per_bnode; i++) {
284284 page = read_mapping_page(mapping, block++, NULL);
285285 if (IS_ERR(page))
286286 goto fail;
287287 if (PageError(page)) {
288− page_cache_release(page);
288+ put_page(page);
289289 goto fail;
290290 }
291291 node->page[i] = page;
@@ -401,7 +401,7 @@ void hfs_bnode_free(struct hfs_bnode *node) · 109 unmodified lines
401401
402402 for (i = 0; i < node->tree->pages_per_bnode; i++)
403403 if (node->page[i])
404− page_cache_release(node->page[i]);
404+ put_page(node->page[i]);
405405 kfree(node);
406406 }
407407
@@ -429,11 +429,11 @@ struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num) · 21 unmodified lines
429429
430430 pagep = node->page;
431431 memset(kmap(*pagep) + node->page_offset, 0,
432− min((int)PAGE_CACHE_SIZE, (int)tree->node_size));
432+ min((int)PAGE_SIZE, (int)tree->node_size));
433433 set_page_dirty(*pagep);
434434 kunmap(*pagep);
435435 for (i = 1; i < tree->pages_per_bnode; i++) {
436− memset(kmap(*++pagep), 0, PAGE_CACHE_SIZE);
436+ memset(kmap(*++pagep), 0, PAGE_SIZE);
437437 set_page_dirty(*pagep);
438438 kunmap(*pagep);
439439 }
fs/hfs/btree.c+10−10
@@ -116,14 +116,14 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke · 115 unmodified lines
116116 }
117117
118118 tree->node_size_shift = ffs(size) - 1;
119− tree->pages_per_bnode = (tree->node_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
119+ tree->pages_per_bnode = (tree->node_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
120120
121121 kunmap(page);
122− page_cache_release(page);
122+ put_page(page);
123123 return tree;
124124
125125 fail_page:
126− page_cache_release(page);
126+ put_page(page);
127127 free_inode:
128128 tree->inode->i_mapping->a_ops = &hfs_aops;
129129 iput(tree->inode);
@@ -257,9 +257,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) · 127 unmodified lines
257257 off = off16;
258258
259259 off += node->page_offset;
260− pagep = node->page + (off >> PAGE_CACHE_SHIFT);
260+ pagep = node->page + (off >> PAGE_SHIFT);
261261 data = kmap(*pagep);
262− off &= ~PAGE_CACHE_MASK;
262+ off &= ~PAGE_MASK;
263263 idx = 0;
264264
265265 for (;;) {
@@ -279,7 +279,7 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) · 13 unmodified lines
279279 }
280280 }
281281 }
282− if (++off >= PAGE_CACHE_SIZE) {
282+ if (++off >= PAGE_SIZE) {
283283 kunmap(*pagep);
284284 data = kmap(*++pagep);
285285 off = 0;
@@ -302,9 +302,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) · 16 unmodified lines
302302 len = hfs_brec_lenoff(node, 0, &off16);
303303 off = off16;
304304 off += node->page_offset;
305− pagep = node->page + (off >> PAGE_CACHE_SHIFT);
305+ pagep = node->page + (off >> PAGE_SHIFT);
306306 data = kmap(*pagep);
307− off &= ~PAGE_CACHE_MASK;
307+ off &= ~PAGE_MASK;
308308 }
309309 }
310310
@@ -348,9 +348,9 @@ void hfs_bmap_free(struct hfs_bnode *node) · 37 unmodified lines
348348 len = hfs_brec_lenoff(node, 0, &off);
349349 }
350350 off += node->page_offset + nidx / 8;
351− page = node->page[off >> PAGE_CACHE_SHIFT];
351+ page = node->page[off >> PAGE_SHIFT];
352352 data = kmap(page);
353− off &= ~PAGE_CACHE_MASK;
353+ off &= ~PAGE_MASK;
354354 m = 1 << (~nidx & 7);
355355 byte = data[off];
356356 if (!(byte & m)) {
fs/hfs/inode.c+4−4
@@ -91,8 +91,8 @@ static int hfs_releasepage(struct page *page, gfp_t mask) · 90 unmodified lines
9191 if (!tree)
9292 return 0;
9393
94− if (tree->node_size >= PAGE_CACHE_SIZE) {
95− nidx = page->index >> (tree->node_size_shift - PAGE_CACHE_SHIFT);
94+ if (tree->node_size >= PAGE_SIZE) {
95+ nidx = page->index >> (tree->node_size_shift - PAGE_SHIFT);
9696 spin_lock(&tree->hash_lock);
9797 node = hfs_bnode_findhash(tree, nidx);
9898 if (!node)
@@ -105,8 +105,8 @@ static int hfs_releasepage(struct page *page, gfp_t mask) · 6 unmodified lines
105105 }
106106 spin_unlock(&tree->hash_lock);
107107 } else {
108− nidx = page->index << (PAGE_CACHE_SHIFT - tree->node_size_shift);
109− i = 1 << (PAGE_CACHE_SHIFT - tree->node_size_shift);
108+ nidx = page->index << (PAGE_SHIFT - tree->node_size_shift);
109+ i = 1 << (PAGE_SHIFT - tree->node_size_shift);
110110 spin_lock(&tree->hash_lock);
111111 do {
112112 node = hfs_bnode_findhash(tree, nidx++);
fs/hfsplus/bitmap.c+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 #include "hfsplus_fs.h"
1414 #include "hfsplus_raw.h"
1515
16−#define PAGE_CACHE_BITS (PAGE_CACHE_SIZE * 8)
16+#define PAGE_CACHE_BITS (PAGE_SIZE * 8)
1717
1818 int hfsplus_block_allocate(struct super_block *sb, u32 size,
1919 u32 offset, u32 *max)
fs/hfsplus/bnode.c+45−45
@@ -24,16 +24,16 @@ void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len) · 23 unmodified lines
2424 int l;
2525
2626 off += node->page_offset;
27− pagep = node->page + (off >> PAGE_CACHE_SHIFT);
28− off &= ~PAGE_CACHE_MASK;
27+ pagep = node->page + (off >> PAGE_SHIFT);
28+ off &= ~PAGE_MASK;
2929
30− l = min_t(int, len, PAGE_CACHE_SIZE - off);
30+ l = min_t(int, len, PAGE_SIZE - off);
3131 memcpy(buf, kmap(*pagep) + off, l);
3232 kunmap(*pagep);
3333
3434 while ((len -= l) != 0) {
3535 buf += l;
36− l = min_t(int, len, PAGE_CACHE_SIZE);
36+ l = min_t(int, len, PAGE_SIZE);
3737 memcpy(buf, kmap(*++pagep), l);
3838 kunmap(*pagep);
3939 }
@@ -77,17 +77,17 @@ void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len) · 37 unmodified lines
7777 int l;
7878
7979 off += node->page_offset;
80− pagep = node->page + (off >> PAGE_CACHE_SHIFT);
81− off &= ~PAGE_CACHE_MASK;
80+ pagep = node->page + (off >> PAGE_SHIFT);
81+ off &= ~PAGE_MASK;
8282
83− l = min_t(int, len, PAGE_CACHE_SIZE - off);
83+ l = min_t(int, len, PAGE_SIZE - off);
8484 memcpy(kmap(*pagep) + off, buf, l);
8585 set_page_dirty(*pagep);
8686 kunmap(*pagep);
8787
8888 while ((len -= l) != 0) {
8989 buf += l;
90− l = min_t(int, len, PAGE_CACHE_SIZE);
90+ l = min_t(int, len, PAGE_SIZE);
9191 memcpy(kmap(*++pagep), buf, l);
9292 set_page_dirty(*pagep);
9393 kunmap(*pagep);
@@ -107,16 +107,16 @@ void hfs_bnode_clear(struct hfs_bnode *node, int off, int len) · 13 unmodified lines
107107 int l;
108108
109109 off += node->page_offset;
110− pagep = node->page + (off >> PAGE_CACHE_SHIFT);
111− off &= ~PAGE_CACHE_MASK;
110+ pagep = node->page + (off >> PAGE_SHIFT);
111+ off &= ~PAGE_MASK;
112112
113− l = min_t(int, len, PAGE_CACHE_SIZE - off);
113+ l = min_t(int, len, PAGE_SIZE - off);
114114 memset(kmap(*pagep) + off, 0, l);
115115 set_page_dirty(*pagep);
116116 kunmap(*pagep);
117117
118118 while ((len -= l) != 0) {
119− l = min_t(int, len, PAGE_CACHE_SIZE);
119+ l = min_t(int, len, PAGE_SIZE);
120120 memset(kmap(*++pagep), 0, l);
121121 set_page_dirty(*pagep);
122122 kunmap(*pagep);
@@ -136,20 +136,20 @@ void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst, · 13 unmodified lines
136136 tree = src_node->tree;
137137 src += src_node->page_offset;
138138 dst += dst_node->page_offset;
139− src_page = src_node->page + (src >> PAGE_CACHE_SHIFT);
140− src &= ~PAGE_CACHE_MASK;
141− dst_page = dst_node->page + (dst >> PAGE_CACHE_SHIFT);
142− dst &= ~PAGE_CACHE_MASK;
139+ src_page = src_node->page + (src >> PAGE_SHIFT);
140+ src &= ~PAGE_MASK;
141+ dst_page = dst_node->page + (dst >> PAGE_SHIFT);
142+ dst &= ~PAGE_MASK;
143143
144144 if (src == dst) {
145− l = min_t(int, len, PAGE_CACHE_SIZE - src);
145+ l = min_t(int, len, PAGE_SIZE - src);
146146 memcpy(kmap(*dst_page) + src, kmap(*src_page) + src, l);
147147 kunmap(*src_page);
148148 set_page_dirty(*dst_page);
149149 kunmap(*dst_page);
150150
151151 while ((len -= l) != 0) {
152− l = min_t(int, len, PAGE_CACHE_SIZE);
152+ l = min_t(int, len, PAGE_SIZE);
153153 memcpy(kmap(*++dst_page), kmap(*++src_page), l);
154154 kunmap(*src_page);
155155 set_page_dirty(*dst_page);
@@ -161,12 +161,12 @@ void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst, · 5 unmodified lines
161161 do {
162162 src_ptr = kmap(*src_page) + src;
163163 dst_ptr = kmap(*dst_page) + dst;
164− if (PAGE_CACHE_SIZE - src < PAGE_CACHE_SIZE - dst) {
165− l = PAGE_CACHE_SIZE - src;
164+ if (PAGE_SIZE - src < PAGE_SIZE - dst) {
165+ l = PAGE_SIZE - src;
166166 src = 0;
167167 dst += l;
168168 } else {
169− l = PAGE_CACHE_SIZE - dst;
169+ l = PAGE_SIZE - dst;
170170 src += l;
171171 dst = 0;
172172 }
@@ -195,11 +195,11 @@ void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len) · 22 unmodified lines
195195 dst += node->page_offset;
196196 if (dst > src) {
197197 src += len - 1;
198− src_page = node->page + (src >> PAGE_CACHE_SHIFT);
199− src = (src & ~PAGE_CACHE_MASK) + 1;
198+ src_page = node->page + (src >> PAGE_SHIFT);
199+ src = (src & ~PAGE_MASK) + 1;
200200 dst += len - 1;
201− dst_page = node->page + (dst >> PAGE_CACHE_SHIFT);
202− dst = (dst & ~PAGE_CACHE_MASK) + 1;
201+ dst_page = node->page + (dst >> PAGE_SHIFT);
202+ dst = (dst & ~PAGE_MASK) + 1;
203203
204204 if (src == dst) {
205205 while (src < len) {
@@ -208,7 +208,7 @@ void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len) · 2 unmodified lines
208208 set_page_dirty(*dst_page);
209209 kunmap(*dst_page);
210210 len -= src;
211− src = PAGE_CACHE_SIZE;
211+ src = PAGE_SIZE;
212212 src_page--;
213213 dst_page--;
214214 }
@@ -226,32 +226,32 @@ void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len) · 11 unmodified lines
226226 dst_ptr = kmap(*dst_page) + dst;
227227 if (src < dst) {
228228 l = src;
229− src = PAGE_CACHE_SIZE;
229+ src = PAGE_SIZE;
230230 dst -= l;
231231 } else {
232232 l = dst;
233233 src -= l;
234− dst = PAGE_CACHE_SIZE;
234+ dst = PAGE_SIZE;
235235 }
236236 l = min(len, l);
237237 memmove(dst_ptr - l, src_ptr - l, l);
238238 kunmap(*src_page);
239239 set_page_dirty(*dst_page);
240240 kunmap(*dst_page);
241− if (dst == PAGE_CACHE_SIZE)
241+ if (dst == PAGE_SIZE)
242242 dst_page--;
243243 else
244244 src_page--;
245245 } while ((len -= l));
246246 }
247247 } else {
248− src_page = node->page + (src >> PAGE_CACHE_SHIFT);
249− src &= ~PAGE_CACHE_MASK;
250− dst_page = node->page + (dst >> PAGE_CACHE_SHIFT);
251− dst &= ~PAGE_CACHE_MASK;
248+ src_page = node->page + (src >> PAGE_SHIFT);
249+ src &= ~PAGE_MASK;
250+ dst_page = node->page + (dst >> PAGE_SHIFT);
251+ dst &= ~PAGE_MASK;
252252
253253 if (src == dst) {
254− l = min_t(int, len, PAGE_CACHE_SIZE - src);
254+ l = min_t(int, len, PAGE_SIZE - src);
255255 memmove(kmap(*dst_page) + src,
256256 kmap(*src_page) + src, l);
257257 kunmap(*src_page);
@@ -259,7 +259,7 @@ void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len) · 1 unmodified line
259259 kunmap(*dst_page);
260260
261261 while ((len -= l) != 0) {
262− l = min_t(int, len, PAGE_CACHE_SIZE);
262+ l = min_t(int, len, PAGE_SIZE);
263263 memmove(kmap(*++dst_page),
264264 kmap(*++src_page), l);
265265 kunmap(*src_page);
@@ -272,13 +272,13 @@ void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len) · 6 unmodified lines
272272 do {
273273 src_ptr = kmap(*src_page) + src;
274274 dst_ptr = kmap(*dst_page) + dst;
275− if (PAGE_CACHE_SIZE - src <
276− PAGE_CACHE_SIZE - dst) {
277− l = PAGE_CACHE_SIZE - src;
275+ if (PAGE_SIZE - src <
276+ PAGE_SIZE - dst) {
277+ l = PAGE_SIZE - src;
278278 src = 0;
279279 dst += l;
280280 } else {
281− l = PAGE_CACHE_SIZE - dst;
281+ l = PAGE_SIZE - dst;
282282 src += l;
283283 dst = 0;
284284 }
@@ -444,14 +444,14 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) · 159 unmodified lines
444444
445445 mapping = tree->inode->i_mapping;
446446 off = (loff_t)cnid << tree->node_size_shift;
447− block = off >> PAGE_CACHE_SHIFT;
448− node->page_offset = off & ~PAGE_CACHE_MASK;
447+ block = off >> PAGE_SHIFT;
448+ node->page_offset = off & ~PAGE_MASK;
449449 for (i = 0; i < tree->pages_per_bnode; block++, i++) {
450450 page = read_mapping_page(mapping, block, NULL);
451451 if (IS_ERR(page))
452452 goto fail;
453453 if (PageError(page)) {
454− page_cache_release(page);
454+ put_page(page);
455455 goto fail;
456456 }
457457 node->page[i] = page;
@@ -569,7 +569,7 @@ void hfs_bnode_free(struct hfs_bnode *node) · 111 unmodified lines
569569
570570 for (i = 0; i < node->tree->pages_per_bnode; i++)
571571 if (node->page[i])
572− page_cache_release(node->page[i]);
572+ put_page(node->page[i]);
573573 kfree(node);
574574 }
575575
@@ -597,11 +597,11 @@ struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num) · 21 unmodified lines
597597
598598 pagep = node->page;
599599 memset(kmap(*pagep) + node->page_offset, 0,
600− min_t(int, PAGE_CACHE_SIZE, tree->node_size));
600+ min_t(int, PAGE_SIZE, tree->node_size));
601601 set_page_dirty(*pagep);
602602 kunmap(*pagep);
603603 for (i = 1; i < tree->pages_per_bnode; i++) {
604− memset(kmap(*++pagep), 0, PAGE_CACHE_SIZE);
604+ memset(kmap(*++pagep), 0, PAGE_SIZE);
605605 set_page_dirty(*pagep);
606606 kunmap(*pagep);
607607 }
fs/hfsplus/btree.c+11−11
@@ -236,15 +236,15 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) · 235 unmodified lines
236236 tree->node_size_shift = ffs(size) - 1;
237237
238238 tree->pages_per_bnode =
239− (tree->node_size + PAGE_CACHE_SIZE - 1) >>
240− PAGE_CACHE_SHIFT;
239+ (tree->node_size + PAGE_SIZE - 1) >>
240+ PAGE_SHIFT;
241241
242242 kunmap(page);
243− page_cache_release(page);
243+ put_page(page);
244244 return tree;
245245
246246 fail_page:
247− page_cache_release(page);
247+ put_page(page);
248248 free_inode:
249249 tree->inode->i_mapping->a_ops = &hfsplus_aops;
250250 iput(tree->inode);
@@ -380,9 +380,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) · 129 unmodified lines
380380 off = off16;
381381
382382 off += node->page_offset;
383− pagep = node->page + (off >> PAGE_CACHE_SHIFT);
383+ pagep = node->page + (off >> PAGE_SHIFT);
384384 data = kmap(*pagep);
385− off &= ~PAGE_CACHE_MASK;
385+ off &= ~PAGE_MASK;
386386 idx = 0;
387387
388388 for (;;) {
@@ -403,7 +403,7 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) · 14 unmodified lines
403403 }
404404 }
405405 }
406− if (++off >= PAGE_CACHE_SIZE) {
406+ if (++off >= PAGE_SIZE) {
407407 kunmap(*pagep);
408408 data = kmap(*++pagep);
409409 off = 0;
@@ -426,9 +426,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) · 16 unmodified lines
426426 len = hfs_brec_lenoff(node, 0, &off16);
427427 off = off16;
428428 off += node->page_offset;
429− pagep = node->page + (off >> PAGE_CACHE_SHIFT);
429+ pagep = node->page + (off >> PAGE_SHIFT);
430430 data = kmap(*pagep);
431− off &= ~PAGE_CACHE_MASK;
431+ off &= ~PAGE_MASK;
432432 }
433433 }
434434
@@ -475,9 +475,9 @@ void hfs_bmap_free(struct hfs_bnode *node) · 40 unmodified lines
475475 len = hfs_brec_lenoff(node, 0, &off);
476476 }
477477 off += node->page_offset + nidx / 8;
478− page = node->page[off >> PAGE_CACHE_SHIFT];
478+ page = node->page[off >> PAGE_SHIFT];
479479 data = kmap(page);
480− off &= ~PAGE_CACHE_MASK;
480+ off &= ~PAGE_MASK;
481481 m = 1 << (~nidx & 7);
482482 byte = data[off];
483483 if (!(byte & m)) {
fs/hfsplus/inode.c+4−4
@@ -87,9 +87,9 @@ static int hfsplus_releasepage(struct page *page, gfp_t mask) · 86 unmodified lines
8787 }
8888 if (!tree)
8989 return 0;
90− if (tree->node_size >= PAGE_CACHE_SIZE) {
90+ if (tree->node_size >= PAGE_SIZE) {
9191 nidx = page->index >>
92− (tree->node_size_shift - PAGE_CACHE_SHIFT);
92+ (tree->node_size_shift - PAGE_SHIFT);
9393 spin_lock(&tree->hash_lock);
9494 node = hfs_bnode_findhash(tree, nidx);
9595 if (!node)
@@ -103,8 +103,8 @@ static int hfsplus_releasepage(struct page *page, gfp_t mask) · 7 unmodified lines
103103 spin_unlock(&tree->hash_lock);
104104 } else {
105105 nidx = page->index <<
106− (PAGE_CACHE_SHIFT - tree->node_size_shift);
107− i = 1 << (PAGE_CACHE_SHIFT - tree->node_size_shift);
106+ (PAGE_SHIFT - tree->node_size_shift);
107+ i = 1 << (PAGE_SHIFT - tree->node_size_shift);
108108 spin_lock(&tree->hash_lock);
109109 do {
110110 node = hfs_bnode_findhash(tree, nidx++);
fs/hfsplus/super.c+1−1
@@ -438,7 +438,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) · 437 unmodified lines
438438 err = -EFBIG;
439439 last_fs_block = sbi->total_blocks - 1;
440440 last_fs_page = (last_fs_block << sbi->alloc_blksz_shift) >>
441− PAGE_CACHE_SHIFT;
441+ PAGE_SHIFT;
442442
443443 if ((last_fs_block > (sector_t)(~0ULL) >> (sbi->alloc_blksz_shift - 9)) ||
444444 (last_fs_page > (pgoff_t)(~0ULL))) {
fs/hfsplus/xattr.c+3−3
@@ -220,7 +220,7 @@ check_attr_tree_state_again: · 219 unmodified lines
220220
221221 index = 0;
222222 written = 0;
223− for (; written < node_size; index++, written += PAGE_CACHE_SIZE) {
223+ for (; written < node_size; index++, written += PAGE_SIZE) {
224224 void *kaddr;
225225
226226 page = read_mapping_page(mapping, index, NULL);
@@ -231,11 +231,11 @@ check_attr_tree_state_again: · 4 unmodified lines
231231
232232 kaddr = kmap_atomic(page);
233233 memcpy(kaddr, buf + written,
234− min_t(size_t, PAGE_CACHE_SIZE, node_size - written));
234+ min_t(size_t, PAGE_SIZE, node_size - written));
235235 kunmap_atomic(kaddr);
236236
237237 set_page_dirty(page);
238− page_cache_release(page);
238+ put_page(page);
239239 }
240240
241241 hfsplus_mark_inode_dirty(attr_file, HFSPLUS_I_ATTR_DIRTY);
fs/hostfs/hostfs_kern.c+9−9
@@ -410,12 +410,12 @@ static int hostfs_writepage(struct page *page, struct writeback_control *wbc) · 409 unmodified lines
410410 struct inode *inode = mapping->host;
411411 char *buffer;
412412 loff_t base = page_offset(page);
413− int count = PAGE_CACHE_SIZE;
414− int end_index = inode->i_size >> PAGE_CACHE_SHIFT;
413+ int count = PAGE_SIZE;
414+ int end_index = inode->i_size >> PAGE_SHIFT;
415415 int err;
416416
417417 if (page->index >= end_index)
418− count = inode->i_size & (PAGE_CACHE_SIZE-1);
418+ count = inode->i_size & (PAGE_SIZE-1);
419419
420420 buffer = kmap(page);
421421
@@ -447,7 +447,7 @@ static int hostfs_readpage(struct file *file, struct page *page) · 25 unmodified lines
447447
448448 buffer = kmap(page);
449449 bytes_read = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer,
450− PAGE_CACHE_SIZE);
450+ PAGE_SIZE);
451451 if (bytes_read < 0) {
452452 ClearPageUptodate(page);
453453 SetPageError(page);
@@ -455,7 +455,7 @@ static int hostfs_readpage(struct file *file, struct page *page) · 1 unmodified line
455455 goto out;
456456 }
457457
458− memset(buffer + bytes_read, 0, PAGE_CACHE_SIZE - bytes_read);
458+ memset(buffer + bytes_read, 0, PAGE_SIZE - bytes_read);
459459
460460 ClearPageError(page);
461461 SetPageUptodate(page);
@@ -471,7 +471,7 @@ static int hostfs_write_begin(struct file *file, struct address_space *mapping, · 9 unmodified lines
471471 loff_t pos, unsigned len, unsigned flags,
472472 struct page **pagep, void **fsdata)
473473 {
474− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
474+ pgoff_t index = pos >> PAGE_SHIFT;
475475
476476 *pagep = grab_cache_page_write_begin(mapping, index, flags);
477477 if (!*pagep)
@@ -485,14 +485,14 @@ static int hostfs_write_end(struct file *file, struct address_space *mapping, · 7 unmodified lines
485485 {
486486 struct inode *inode = mapping->host;
487487 void *buffer;
488− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
488+ unsigned from = pos & (PAGE_SIZE - 1);
489489 int err;
490490
491491 buffer = kmap(page);
492492 err = write_file(FILE_HOSTFS_I(file)->fd, &pos, buffer + from, copied);
493493 kunmap(page);
494494
495− if (!PageUptodate(page) && err == PAGE_CACHE_SIZE)
495+ if (!PageUptodate(page) && err == PAGE_SIZE)
496496 SetPageUptodate(page);
497497
498498 /*
@@ -502,7 +502,7 @@ static int hostfs_write_end(struct file *file, struct address_space *mapping, · 3 unmodified lines
502502 if (err > 0 && (pos > inode->i_size))
503503 inode->i_size = pos;
504504 unlock_page(page);
505− page_cache_release(page);
505+ put_page(page);
506506
507507 return err;
508508 }
fs/hugetlbfs/inode.c+4−4
@@ -213,12 +213,12 @@ hugetlbfs_read_actor(struct page *page, unsigned long offset, · 212 unmodified lines
213213 int i, chunksize;
214214
215215 /* Find which 4k chunk and offset with in that chunk */
216− i = offset >> PAGE_CACHE_SHIFT;
217− offset = offset & ~PAGE_CACHE_MASK;
216+ i = offset >> PAGE_SHIFT;
217+ offset = offset & ~PAGE_MASK;
218218
219219 while (size) {
220220 size_t n;
221− chunksize = PAGE_CACHE_SIZE;
221+ chunksize = PAGE_SIZE;
222222 if (offset)
223223 chunksize -= offset;
224224 if (chunksize > size)
@@ -285,7 +285,7 @@ static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to) · 60 unmodified lines
285285 * We have the page, copy it to user space buffer.
286286 */
287287 copied = hugetlbfs_read_actor(page, offset, to, nr);
288− page_cache_release(page);
288+ put_page(page);
289289 }
290290 offset += copied;
291291 retval += copied;
fs/isofs/compress.c+18−18
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 #include "zisofs.h"
2727
2828 /* This should probably be global. */
29−static char zisofs_sink_page[PAGE_CACHE_SIZE];
29+static char zisofs_sink_page[PAGE_SIZE];
3030
3131 /*
3232 * This contains the zlib memory allocation and the mutex for the
@@ -70,11 +70,11 @@ static loff_t zisofs_uncompress_block(struct inode *inode, loff_t block_start, · 37 unmodified lines
7070 for ( i = 0 ; i < pcount ; i++ ) {
7171 if (!pages[i])
7272 continue;
73− memset(page_address(pages[i]), 0, PAGE_CACHE_SIZE);
73+ memset(page_address(pages[i]), 0, PAGE_SIZE);
7474 flush_dcache_page(pages[i]);
7575 SetPageUptodate(pages[i]);
7676 }
77− return ((loff_t)pcount) << PAGE_CACHE_SHIFT;
77+ return ((loff_t)pcount) << PAGE_SHIFT;
7878 }
7979
8080 /* Because zlib is not thread-safe, do all the I/O at the top. */
@@ -121,11 +121,11 @@ static loff_t zisofs_uncompress_block(struct inode *inode, loff_t block_start, · 40 unmodified lines
121121 if (pages[curpage]) {
122122 stream.next_out = page_address(pages[curpage])
123123 + poffset;
124− stream.avail_out = PAGE_CACHE_SIZE - poffset;
124+ stream.avail_out = PAGE_SIZE - poffset;
125125 poffset = 0;
126126 } else {
127127 stream.next_out = (void *)&zisofs_sink_page;
128− stream.avail_out = PAGE_CACHE_SIZE;
128+ stream.avail_out = PAGE_SIZE;
129129 }
130130 }
131131 if (!stream.avail_in) {
@@ -220,14 +220,14 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount, · 88 unmodified lines
220220 * pages with the data we have anyway...
221221 */
222222 start_off = page_offset(pages[full_page]);
223− end_off = min_t(loff_t, start_off + PAGE_CACHE_SIZE, inode->i_size);
223+ end_off = min_t(loff_t, start_off + PAGE_SIZE, inode->i_size);
224224
225225 cstart_block = start_off >> zisofs_block_shift;
226226 cend_block = (end_off + (1 << zisofs_block_shift) - 1)
227227 >> zisofs_block_shift;
228228
229− WARN_ON(start_off - (full_page << PAGE_CACHE_SHIFT) !=
230− ((cstart_block << zisofs_block_shift) & PAGE_CACHE_MASK));
229+ WARN_ON(start_off - (full_page << PAGE_SHIFT) !=
230+ ((cstart_block << zisofs_block_shift) & PAGE_MASK));
231231
232232 /* Find the pointer to this specific chunk */
233233 /* Note: we're not using isonum_731() here because the data is known aligned */
@@ -260,10 +260,10 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount, · 26 unmodified lines
260260 ret = zisofs_uncompress_block(inode, block_start, block_end,
261261 pcount, pages, poffset, &err);
262262 poffset += ret;
263− pages += poffset >> PAGE_CACHE_SHIFT;
264− pcount -= poffset >> PAGE_CACHE_SHIFT;
265− full_page -= poffset >> PAGE_CACHE_SHIFT;
266− poffset &= ~PAGE_CACHE_MASK;
263+ pages += poffset >> PAGE_SHIFT;
264+ pcount -= poffset >> PAGE_SHIFT;
265+ full_page -= poffset >> PAGE_SHIFT;
266+ poffset &= ~PAGE_MASK;
267267
268268 if (err) {
269269 brelse(bh);
@@ -282,7 +282,7 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount, · 12 unmodified lines
282282
283283 if (poffset && *pages) {
284284 memset(page_address(*pages) + poffset, 0,
285− PAGE_CACHE_SIZE - poffset);
285+ PAGE_SIZE - poffset);
286286 flush_dcache_page(*pages);
287287 SetPageUptodate(*pages);
288288 }
@@ -302,12 +302,12 @@ static int zisofs_readpage(struct file *file, struct page *page) · 13 unmodified lines
302302 int i, pcount, full_page;
303303 unsigned int zisofs_block_shift = ISOFS_I(inode)->i_format_parm[1];
304304 unsigned int zisofs_pages_per_cblock =
305− PAGE_CACHE_SHIFT <= zisofs_block_shift ?
306− (1 << (zisofs_block_shift - PAGE_CACHE_SHIFT)) : 0;
305+ PAGE_SHIFT <= zisofs_block_shift ?
306+ (1 << (zisofs_block_shift - PAGE_SHIFT)) : 0;
307307 struct page *pages[max_t(unsigned, zisofs_pages_per_cblock, 1)];
308308 pgoff_t index = page->index, end_index;
309309
310− end_index = (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
310+ end_index = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
311311 /*
312312 * If this page is wholly outside i_size we just return zero;
313313 * do_generic_file_read() will handle this for us
@@ -318,7 +318,7 @@ static int zisofs_readpage(struct file *file, struct page *page) · 4 unmodified lines
318318 return 0;
319319 }
320320
321− if (PAGE_CACHE_SHIFT <= zisofs_block_shift) {
321+ if (PAGE_SHIFT <= zisofs_block_shift) {
322322 /* We have already been given one page, this is the one
323323 we must do. */
324324 full_page = index & (zisofs_pages_per_cblock - 1);
@@ -351,7 +351,7 @@ static int zisofs_readpage(struct file *file, struct page *page) · 26 unmodified lines
351351 kunmap(pages[i]);
352352 unlock_page(pages[i]);
353353 if (i != full_page)
354− page_cache_release(pages[i]);
354+ put_page(pages[i]);
355355 }
356356 }
357357
fs/isofs/inode.c+1−1
@@ -1021,7 +1021,7 @@ int isofs_get_blocks(struct inode *inode, sector_t iblock, · 1020 unmodified lines
10211021 * the page with useless information without generating any
10221022 * I/O errors.
10231023 */
1024− if (b_off > ((inode->i_size + PAGE_CACHE_SIZE - 1) >> ISOFS_BUFFER_BITS(inode))) {
1024+ if (b_off > ((inode->i_size + PAGE_SIZE - 1) >> ISOFS_BUFFER_BITS(inode))) {
10251025 printk(KERN_DEBUG "%s: block >= EOF (%lu, %llu)\n",
10261026 __func__, b_off,
10271027 (unsigned long long)inode->i_size);
fs/jbd2/commit.c+2−2
@@ -81,11 +81,11 @@ static void release_buffer_page(struct buffer_head *bh) · 80 unmodified lines
8181 if (!trylock_page(page))
8282 goto nope;
8383
84− page_cache_get(page);
84+ get_page(page);
8585 __brelse(bh);
8686 try_to_free_buffers(page);
8787 unlock_page(page);
88− page_cache_release(page);
88+ put_page(page);
8989 return;
9090
9191 nope:
fs/jbd2/journal.c+1−1
@@ -2221,7 +2221,7 @@ void jbd2_journal_ack_err(journal_t *journal) · 2220 unmodified lines
22212221
22222222 int jbd2_journal_blocks_per_page(struct inode *inode)
22232223 {
2224− return 1 << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);
2224+ return 1 << (PAGE_SHIFT - inode->i_sb->s_blocksize_bits);
22252225 }
22262226
22272227 /*
fs/jbd2/transaction.c+2−2
@@ -2263,7 +2263,7 @@ int jbd2_journal_invalidatepage(journal_t *journal, · 2262 unmodified lines
22632263 struct buffer_head *head, *bh, *next;
22642264 unsigned int stop = offset + length;
22652265 unsigned int curr_off = 0;
2266− int partial_page = (offset || length < PAGE_CACHE_SIZE);
2266+ int partial_page = (offset || length < PAGE_SIZE);
22672267 int may_free = 1;
22682268 int ret = 0;
22692269
@@ -2272,7 +2272,7 @@ int jbd2_journal_invalidatepage(journal_t *journal, · 2 unmodified lines
22722272 if (!page_has_buffers(page))
22732273 return 0;
22742274
2275− BUG_ON(stop > PAGE_CACHE_SIZE || stop < length);
2275+ BUG_ON(stop > PAGE_SIZE || stop < length);
22762276
22772277 /* We will potentially be playing with lists other than just the
22782278 * data lists (especially for journaled data mode), so be
fs/jffs2/debug.c+4−4
@@ -95,15 +95,15 @@ __jffs2_dbg_fragtree_paranoia_check_nolock(struct jffs2_inode_info *f) · 94 unmodified lines
9595 rather than mucking around with actually reading the node
9696 and checking the compression type, which is the real way
9797 to tell a hole node. */
98− if (frag->ofs & (PAGE_CACHE_SIZE-1) && frag_prev(frag)
99− && frag_prev(frag)->size < PAGE_CACHE_SIZE && frag_prev(frag)->node) {
98+ if (frag->ofs & (PAGE_SIZE-1) && frag_prev(frag)
99+ && frag_prev(frag)->size < PAGE_SIZE && frag_prev(frag)->node) {
100100 JFFS2_ERROR("REF_PRISTINE node at 0x%08x had a previous non-hole frag in the same page. Tell dwmw2.\n",
101101 ref_offset(fn->raw));
102102 bitched = 1;
103103 }
104104
105− if ((frag->ofs+frag->size) & (PAGE_CACHE_SIZE-1) && frag_next(frag)
106− && frag_next(frag)->size < PAGE_CACHE_SIZE && frag_next(frag)->node) {
105+ if ((frag->ofs+frag->size) & (PAGE_SIZE-1) && frag_next(frag)
106+ && frag_next(frag)->size < PAGE_SIZE && frag_next(frag)->node) {
107107 JFFS2_ERROR("REF_PRISTINE node at 0x%08x (%08x-%08x) had a following non-hole frag in the same page. Tell dwmw2.\n",
108108 ref_offset(fn->raw), frag->ofs, frag->ofs+frag->size);
109109 bitched = 1;
fs/jffs2/file.c+12−11
@@ -87,14 +87,15 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg) · 86 unmodified lines
8787 int ret;
8888
8989 jffs2_dbg(2, "%s(): ino #%lu, page at offset 0x%lx\n",
90− __func__, inode->i_ino, pg->index << PAGE_CACHE_SHIFT);
90+ __func__, inode->i_ino, pg->index << PAGE_SHIFT);
9191
9292 BUG_ON(!PageLocked(pg));
9393
9494 pg_buf = kmap(pg);
9595 /* FIXME: Can kmap fail? */
9696
97− ret = jffs2_read_inode_range(c, f, pg_buf, pg->index << PAGE_CACHE_SHIFT, PAGE_CACHE_SIZE);
97+ ret = jffs2_read_inode_range(c, f, pg_buf, pg->index << PAGE_SHIFT,
98+ PAGE_SIZE);
9899
99100 if (ret) {
100101 ClearPageUptodate(pg);
@@ -137,8 +138,8 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, · 36 unmodified lines
137138 struct page *pg;
138139 struct inode *inode = mapping->host;
139140 struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
140− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
141− uint32_t pageofs = index << PAGE_CACHE_SHIFT;
141+ pgoff_t index = pos >> PAGE_SHIFT;
142+ uint32_t pageofs = index << PAGE_SHIFT;
142143 int ret = 0;
143144
144145 pg = grab_cache_page_write_begin(mapping, index, flags);
@@ -230,7 +231,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, · 85 unmodified lines
230231
231232 out_page:
232233 unlock_page(pg);
233− page_cache_release(pg);
234+ put_page(pg);
234235 return ret;
235236 }
236237
@@ -245,14 +246,14 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping, · 8 unmodified lines
245246 struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
246247 struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
247248 struct jffs2_raw_inode *ri;
248− unsigned start = pos & (PAGE_CACHE_SIZE - 1);
249+ unsigned start = pos & (PAGE_SIZE - 1);
249250 unsigned end = start + copied;
250251 unsigned aligned_start = start & ~3;
251252 int ret = 0;
252253 uint32_t writtenlen = 0;
253254
254255 jffs2_dbg(1, "%s(): ino #%lu, page at 0x%lx, range %d-%d, flags %lx\n",
255− __func__, inode->i_ino, pg->index << PAGE_CACHE_SHIFT,
256+ __func__, inode->i_ino, pg->index << PAGE_SHIFT,
256257 start, end, pg->flags);
257258
258259 /* We need to avoid deadlock with page_cache_read() in
@@ -261,7 +262,7 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping, · 2 unmodified lines
261262 to re-lock it. */
262263 BUG_ON(!PageUptodate(pg));
263264
264− if (end == PAGE_CACHE_SIZE) {
265+ if (end == PAGE_SIZE) {
265266 /* When writing out the end of a page, write out the
266267 _whole_ page. This helps to reduce the number of
267268 nodes in files which have many short writes, like
@@ -275,7 +276,7 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping, · 7 unmodified lines
275276 jffs2_dbg(1, "%s(): Allocation of raw inode failed\n",
276277 __func__);
277278 unlock_page(pg);
278− page_cache_release(pg);
279+ put_page(pg);
279280 return -ENOMEM;
280281 }
281282
@@ -292,7 +293,7 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping, · 10 unmodified lines
292293 kmap(pg);
293294
294295 ret = jffs2_write_inode_range(c, f, ri, page_address(pg) + aligned_start,
295− (pg->index << PAGE_CACHE_SHIFT) + aligned_start,
296+ (pg->index << PAGE_SHIFT) + aligned_start,
296297 end - aligned_start, &writtenlen);
297298
298299 kunmap(pg);
@@ -329,6 +330,6 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping, · 30 unmodified lines
329330 jffs2_dbg(1, "%s() returning %d\n",
330331 __func__, writtenlen > 0 ? writtenlen : ret);
331332 unlock_page(pg);
332− page_cache_release(pg);
333+ put_page(pg);
333334 return writtenlen > 0 ? writtenlen : ret;
334335 }
fs/jffs2/fs.c+4−4
@@ -586,8 +586,8 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) · 585 unmodified lines
586586 goto out_root;
587587
588588 sb->s_maxbytes = 0xFFFFFFFF;
589− sb->s_blocksize = PAGE_CACHE_SIZE;
590− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
589+ sb->s_blocksize = PAGE_SIZE;
590+ sb->s_blocksize_bits = PAGE_SHIFT;
591591 sb->s_magic = JFFS2_SUPER_MAGIC;
592592 if (!(sb->s_flags & MS_RDONLY))
593593 jffs2_start_garbage_collect_thread(c);
@@ -685,7 +685,7 @@ unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c, · 91 unmodified lines
685685 struct inode *inode = OFNI_EDONI_2SFFJ(f);
686686 struct page *pg;
687687
688− pg = read_cache_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
688+ pg = read_cache_page(inode->i_mapping, offset >> PAGE_SHIFT,
689689 (void *)jffs2_do_readpage_unlock, inode);
690690 if (IS_ERR(pg))
691691 return (void *)pg;
@@ -701,7 +701,7 @@ void jffs2_gc_release_page(struct jffs2_sb_info *c, · 9 unmodified lines
701701 struct page *pg = (void *)*priv;
702702
703703 kunmap(pg);
704− page_cache_release(pg);
704+ put_page(pg);
705705 }
706706
707707 static int jffs2_flash_setup(struct jffs2_sb_info *c) {
fs/jffs2/gc.c+4−4
@@ -552,7 +552,7 @@ static int jffs2_garbage_collect_live(struct jffs2_sb_info *c, struct jffs2_era · 551 unmodified lines
552552 goto upnout;
553553 }
554554 /* We found a datanode. Do the GC */
555− if((start >> PAGE_CACHE_SHIFT) < ((end-1) >> PAGE_CACHE_SHIFT)) {
555+ if((start >> PAGE_SHIFT) < ((end-1) >> PAGE_SHIFT)) {
556556 /* It crosses a page boundary. Therefore, it must be a hole. */
557557 ret = jffs2_garbage_collect_hole(c, jeb, f, fn, start, end);
558558 } else {
@@ -1192,8 +1192,8 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era · 633 unmodified lines
11921192 struct jffs2_node_frag *frag;
11931193 uint32_t min, max;
11941194
1195− min = start & ~(PAGE_CACHE_SIZE-1);
1196− max = min + PAGE_CACHE_SIZE;
1195+ min = start & ~(PAGE_SIZE-1);
1196+ max = min + PAGE_SIZE;
11971197
11981198 frag = jffs2_lookup_node_frag(&f->fragtree, start);
11991199
@@ -1351,7 +1351,7 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era · 151 unmodified lines
13511351 cdatalen = min_t(uint32_t, alloclen - sizeof(ri), end - offset);
13521352 datalen = end - offset;
13531353
1354− writebuf = pg_ptr + (offset & (PAGE_CACHE_SIZE -1));
1354+ writebuf = pg_ptr + (offset & (PAGE_SIZE -1));
13551355
13561356 comprtype = jffs2_compress(c, f, writebuf, &comprbuf, &datalen, &cdatalen);
13571357
fs/jffs2/nodelist.c+4−4
@@ -90,7 +90,7 @@ uint32_t jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, · 89 unmodified lines
9090
9191 /* If the last fragment starts at the RAM page boundary, it is
9292 * REF_PRISTINE irrespective of its size. */
93− if (frag->node && (frag->ofs & (PAGE_CACHE_SIZE - 1)) == 0) {
93+ if (frag->node && (frag->ofs & (PAGE_SIZE - 1)) == 0) {
9494 dbg_fragtree2("marking the last fragment 0x%08x-0x%08x REF_PRISTINE.\n",
9595 frag->ofs, frag->ofs + frag->size);
9696 frag->node->raw->flash_offset = ref_offset(frag->node->raw) | REF_PRISTINE;
@@ -237,7 +237,7 @@ static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *r · 140 unmodified lines
237237 If so, both 'this' and the new node get marked REF_NORMAL so
238238 the GC can take a look.
239239 */
240− if (lastend && (lastend-1) >> PAGE_CACHE_SHIFT == newfrag->ofs >> PAGE_CACHE_SHIFT) {
240+ if (lastend && (lastend-1) >> PAGE_SHIFT == newfrag->ofs >> PAGE_SHIFT) {
241241 if (this->node)
242242 mark_ref_normal(this->node->raw);
243243 mark_ref_normal(newfrag->node->raw);
@@ -382,7 +382,7 @@ int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_in · 138 unmodified lines
382382
383383 /* If we now share a page with other nodes, mark either previous
384384 or next node REF_NORMAL, as appropriate. */
385− if (newfrag->ofs & (PAGE_CACHE_SIZE-1)) {
385+ if (newfrag->ofs & (PAGE_SIZE-1)) {
386386 struct jffs2_node_frag *prev = frag_prev(newfrag);
387387
388388 mark_ref_normal(fn->raw);
@@ -391,7 +391,7 @@ int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_in · 2 unmodified lines
391391 mark_ref_normal(prev->node->raw);
392392 }
393393
394− if ((newfrag->ofs+newfrag->size) & (PAGE_CACHE_SIZE-1)) {
394+ if ((newfrag->ofs+newfrag->size) & (PAGE_SIZE-1)) {
395395 struct jffs2_node_frag *next = frag_next(newfrag);
396396
397397 if (next) {
fs/jffs2/write.c+4−3
@@ -172,8 +172,8 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 · 171 unmodified lines
172172 beginning of a page and runs to the end of the file, or if
173173 it's a hole node, mark it REF_PRISTINE, else REF_NORMAL.
174174 */
175− if ((je32_to_cpu(ri->dsize) >= PAGE_CACHE_SIZE) ||
176− ( ((je32_to_cpu(ri->offset)&(PAGE_CACHE_SIZE-1))==0) &&
175+ if ((je32_to_cpu(ri->dsize) >= PAGE_SIZE) ||
176+ ( ((je32_to_cpu(ri->offset)&(PAGE_SIZE-1))==0) &&
177177 (je32_to_cpu(ri->dsize)+je32_to_cpu(ri->offset) == je32_to_cpu(ri->isize)))) {
178178 flash_ofs |= REF_PRISTINE;
179179 } else {
@@ -366,7 +366,8 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, · 186 unmodified lines
366366 break;
367367 }
368368 mutex_lock(&f->sem);
369− datalen = min_t(uint32_t, writelen, PAGE_CACHE_SIZE - (offset & (PAGE_CACHE_SIZE-1)));
369+ datalen = min_t(uint32_t, writelen,
370+ PAGE_SIZE - (offset & (PAGE_SIZE-1)));
370371 cdatalen = min_t(uint32_t, alloclen - sizeof(*ri), datalen);
371372
372373 comprtype = jffs2_compress(c, f, buf, &comprbuf, &datalen, &cdatalen);
fs/jfs/jfs_metapage.c+21−21
@@ -80,7 +80,7 @@ static inline void lock_metapage(struct metapage *mp) · 79 unmodified lines
8080 static struct kmem_cache *metapage_cache;
8181 static mempool_t *metapage_mempool;
8282
83−#define MPS_PER_PAGE (PAGE_CACHE_SIZE >> L2PSIZE)
83+#define MPS_PER_PAGE (PAGE_SIZE >> L2PSIZE)
8484
8585 #if MPS_PER_PAGE > 1
8686
@@ -316,7 +316,7 @@ static void last_write_complete(struct page *page) · 229 unmodified lines
316316 struct metapage *mp;
317317 unsigned int offset;
318318
319− for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) {
319+ for (offset = 0; offset < PAGE_SIZE; offset += PSIZE) {
320320 mp = page_to_mp(page, offset);
321321 if (mp && test_bit(META_io, &mp->flag)) {
322322 if (mp->lsn)
@@ -366,12 +366,12 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc) · 43 unmodified lines
366366 int bad_blocks = 0;
367367
368368 page_start = (sector_t)page->index <<
369− (PAGE_CACHE_SHIFT - inode->i_blkbits);
369+ (PAGE_SHIFT - inode->i_blkbits);
370370 BUG_ON(!PageLocked(page));
371371 BUG_ON(PageWriteback(page));
372372 set_page_writeback(page);
373373
374− for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) {
374+ for (offset = 0; offset < PAGE_SIZE; offset += PSIZE) {
375375 mp = page_to_mp(page, offset);
376376
377377 if (!mp || !test_bit(META_dirty, &mp->flag))
@@ -416,7 +416,7 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc) · 38 unmodified lines
416416 bio = NULL;
417417 } else
418418 inc_io(page);
419− xlen = (PAGE_CACHE_SIZE - offset) >> inode->i_blkbits;
419+ xlen = (PAGE_SIZE - offset) >> inode->i_blkbits;
420420 pblock = metapage_get_blocks(inode, lblock, &xlen);
421421 if (!pblock) {
422422 printk(KERN_ERR "JFS: metapage_get_blocks failed\n");
@@ -485,7 +485,7 @@ static int metapage_readpage(struct file *fp, struct page *page) · 62 unmodified lines
485485 struct inode *inode = page->mapping->host;
486486 struct bio *bio = NULL;
487487 int block_offset;
488− int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
488+ int blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
489489 sector_t page_start; /* address of page in fs blocks */
490490 sector_t pblock;
491491 int xlen;
@@ -494,7 +494,7 @@ static int metapage_readpage(struct file *fp, struct page *page) · 2 unmodified lines
494494
495495 BUG_ON(!PageLocked(page));
496496 page_start = (sector_t)page->index <<
497− (PAGE_CACHE_SHIFT - inode->i_blkbits);
497+ (PAGE_SHIFT - inode->i_blkbits);
498498
499499 block_offset = 0;
500500 while (block_offset < blocks_per_page) {
@@ -542,7 +542,7 @@ static int metapage_releasepage(struct page *page, gfp_t gfp_mask) · 41 unmodified lines
542542 int ret = 1;
543543 int offset;
544544
545− for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) {
545+ for (offset = 0; offset < PAGE_SIZE; offset += PSIZE) {
546546 mp = page_to_mp(page, offset);
547547
548548 if (!mp)
@@ -568,7 +568,7 @@ static int metapage_releasepage(struct page *page, gfp_t gfp_mask) · 19 unmodified lines
568568 static void metapage_invalidatepage(struct page *page, unsigned int offset,
569569 unsigned int length)
570570 {
571− BUG_ON(offset || length < PAGE_CACHE_SIZE);
571+ BUG_ON(offset || length < PAGE_SIZE);
572572
573573 BUG_ON(PageWriteback(page));
574574
@@ -599,10 +599,10 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, · 24 unmodified lines
599599 inode->i_ino, lblock, absolute);
600600
601601 l2bsize = inode->i_blkbits;
602− l2BlocksPerPage = PAGE_CACHE_SHIFT - l2bsize;
602+ l2BlocksPerPage = PAGE_SHIFT - l2bsize;
603603 page_index = lblock >> l2BlocksPerPage;
604604 page_offset = (lblock - (page_index << l2BlocksPerPage)) << l2bsize;
605− if ((page_offset + size) > PAGE_CACHE_SIZE) {
605+ if ((page_offset + size) > PAGE_SIZE) {
606606 jfs_err("MetaData crosses page boundary!!");
607607 jfs_err("lblock = %lx, size = %d", lblock, size);
608608 dump_stack();
@@ -621,7 +621,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, · 12 unmodified lines
621621 mapping = inode->i_mapping;
622622 }
623623
624− if (new && (PSIZE == PAGE_CACHE_SIZE)) {
624+ if (new && (PSIZE == PAGE_SIZE)) {
625625 page = grab_cache_page(mapping, page_index);
626626 if (!page) {
627627 jfs_err("grab_cache_page failed!");
@@ -693,7 +693,7 @@ unlock: · 65 unmodified lines
693693 void grab_metapage(struct metapage * mp)
694694 {
695695 jfs_info("grab_metapage: mp = 0x%p", mp);
696− page_cache_get(mp->page);
696+ get_page(mp->page);
697697 lock_page(mp->page);
698698 mp->count++;
699699 lock_metapage(mp);
@@ -706,12 +706,12 @@ void force_metapage(struct metapage *mp) · 6 unmodified lines
706706 jfs_info("force_metapage: mp = 0x%p", mp);
707707 set_bit(META_forcewrite, &mp->flag);
708708 clear_bit(META_sync, &mp->flag);
709− page_cache_get(page);
709+ get_page(page);
710710 lock_page(page);
711711 set_page_dirty(page);
712712 write_one_page(page, 1);
713713 clear_bit(META_forcewrite, &mp->flag);
714− page_cache_release(page);
714+ put_page(page);
715715 }
716716
717717 void hold_metapage(struct metapage *mp)
@@ -726,7 +726,7 @@ void put_metapage(struct metapage *mp) · 8 unmodified lines
726726 unlock_page(mp->page);
727727 return;
728728 }
729− page_cache_get(mp->page);
729+ get_page(mp->page);
730730 mp->count++;
731731 lock_metapage(mp);
732732 unlock_page(mp->page);
@@ -746,7 +746,7 @@ void release_metapage(struct metapage * mp) · 13 unmodified lines
746746 assert(mp->count);
747747 if (--mp->count || mp->nohomeok) {
748748 unlock_page(page);
749− page_cache_release(page);
749+ put_page(page);
750750 return;
751751 }
752752
@@ -764,13 +764,13 @@ void release_metapage(struct metapage * mp) · 11 unmodified lines
764764 drop_metapage(page, mp);
765765
766766 unlock_page(page);
767− page_cache_release(page);
767+ put_page(page);
768768 }
769769
770770 void __invalidate_metapages(struct inode *ip, s64 addr, int len)
771771 {
772772 sector_t lblock;
773− int l2BlocksPerPage = PAGE_CACHE_SHIFT - ip->i_blkbits;
773+ int l2BlocksPerPage = PAGE_SHIFT - ip->i_blkbits;
774774 int BlocksPerPage = 1 << l2BlocksPerPage;
775775 /* All callers are interested in block device's mapping */
776776 struct address_space *mapping =
@@ -788,7 +788,7 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len) · 11 unmodified lines
788788 page = find_lock_page(mapping, lblock >> l2BlocksPerPage);
789789 if (!page)
790790 continue;
791− for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) {
791+ for (offset = 0; offset < PAGE_SIZE; offset += PSIZE) {
792792 mp = page_to_mp(page, offset);
793793 if (!mp)
794794 continue;
@@ -803,7 +803,7 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len) · 8 unmodified lines
803803 remove_from_logsync(mp);
804804 }
805805 unlock_page(page);
806− page_cache_release(page);
806+ put_page(page);
807807 }
808808 }
809809
fs/jfs/jfs_metapage.h+2−2
@@ -106,7 +106,7 @@ static inline void metapage_nohomeok(struct metapage *mp) · 105 unmodified lines
106106 lock_page(page);
107107 if (!mp->nohomeok++) {
108108 mark_metapage_dirty(mp);
109− page_cache_get(page);
109+ get_page(page);
110110 wait_on_page_writeback(page);
111111 }
112112 unlock_page(page);
@@ -128,7 +128,7 @@ static inline void metapage_wait_for_io(struct metapage *mp) · 15 unmodified lines
128128 static inline void _metapage_homeok(struct metapage *mp)
129129 {
130130 if (!--mp->nohomeok)
131− page_cache_release(mp->page);
131+ put_page(mp->page);
132132 }
133133
134134 static inline void metapage_homeok(struct metapage *mp)
fs/jfs/super.c+1−1
@@ -596,7 +596,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) · 595 unmodified lines
596596 * Page cache is indexed by long.
597597 * I would use MAX_LFS_FILESIZE, but it's only half as big
598598 */
599− sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1,
599+ sb->s_maxbytes = min(((u64) PAGE_SIZE << 32) - 1,
600600 (u64)sb->s_maxbytes);
601601 #endif
602602 sb->s_time_gran = 1;
fs/kernfs/mount.c+2−2
@@ -138,8 +138,8 @@ static int kernfs_fill_super(struct super_block *sb, unsigned long magic) · 137 unmodified lines
138138 struct dentry *root;
139139
140140 info->sb = sb;
141− sb->s_blocksize = PAGE_CACHE_SIZE;
142− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
141+ sb->s_blocksize = PAGE_SIZE;
142+ sb->s_blocksize_bits = PAGE_SHIFT;
143143 sb->s_magic = magic;
144144 sb->s_op = &kernfs_sops;
145145 sb->s_time_gran = 1;
fs/libfs.c+12−12
@@ -25,7 +25,7 @@ int simple_getattr(struct vfsmount *mnt, struct dentry *dentry, · 24 unmodified lines
2525 {
2626 struct inode *inode = d_inode(dentry);
2727 generic_fillattr(inode, stat);
28− stat->blocks = inode->i_mapping->nrpages << (PAGE_CACHE_SHIFT - 9);
28+ stat->blocks = inode->i_mapping->nrpages << (PAGE_SHIFT - 9);
2929 return 0;
3030 }
3131 EXPORT_SYMBOL(simple_getattr);
@@ -33,7 +33,7 @@ EXPORT_SYMBOL(simple_getattr); · 1 unmodified line
3333 int simple_statfs(struct dentry *dentry, struct kstatfs *buf)
3434 {
3535 buf->f_type = dentry->d_sb->s_magic;
36− buf->f_bsize = PAGE_CACHE_SIZE;
36+ buf->f_bsize = PAGE_SIZE;
3737 buf->f_namelen = NAME_MAX;
3838 return 0;
3939 }
@@ -395,7 +395,7 @@ int simple_write_begin(struct file *file, struct address_space *mapping, · 355 unmodified lines
395395 struct page *page;
396396 pgoff_t index;
397397
398− index = pos >> PAGE_CACHE_SHIFT;
398+ index = pos >> PAGE_SHIFT;
399399
400400 page = grab_cache_page_write_begin(mapping, index, flags);
401401 if (!page)
@@ -403,10 +403,10 @@ int simple_write_begin(struct file *file, struct address_space *mapping, · 1 unmodified line
403403
404404 *pagep = page;
405405
406− if (!PageUptodate(page) && (len != PAGE_CACHE_SIZE)) {
407− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
406+ if (!PageUptodate(page) && (len != PAGE_SIZE)) {
407+ unsigned from = pos & (PAGE_SIZE - 1);
408408
409− zero_user_segments(page, 0, from, from + len, PAGE_CACHE_SIZE);
409+ zero_user_segments(page, 0, from, from + len, PAGE_SIZE);
410410 }
411411 return 0;
412412 }
@@ -442,7 +442,7 @@ int simple_write_end(struct file *file, struct address_space *mapping, · 29 unmodified lines
442442
443443 /* zero the stale part of the page if we did a short copy */
444444 if (copied < len) {
445− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
445+ unsigned from = pos & (PAGE_SIZE - 1);
446446
447447 zero_user(page, from + copied, len - copied);
448448 }
@@ -458,7 +458,7 @@ int simple_write_end(struct file *file, struct address_space *mapping, · 9 unmodified lines
458458
459459 set_page_dirty(page);
460460 unlock_page(page);
461− page_cache_release(page);
461+ put_page(page);
462462
463463 return copied;
464464 }
@@ -477,8 +477,8 @@ int simple_fill_super(struct super_block *s, unsigned long magic, · 12 unmodified lines
477477 struct dentry *dentry;
478478 int i;
479479
480− s->s_blocksize = PAGE_CACHE_SIZE;
481− s->s_blocksize_bits = PAGE_CACHE_SHIFT;
480+ s->s_blocksize = PAGE_SIZE;
481+ s->s_blocksize_bits = PAGE_SHIFT;
482482 s->s_magic = magic;
483483 s->s_op = &simple_super_operations;
484484 s->s_time_gran = 1;
@@ -994,12 +994,12 @@ int generic_check_addressable(unsigned blocksize_bits, u64 num_blocks) · 509 unmodified lines
994994 {
995995 u64 last_fs_block = num_blocks - 1;
996996 u64 last_fs_page =
997− last_fs_block >> (PAGE_CACHE_SHIFT - blocksize_bits);
997+ last_fs_block >> (PAGE_SHIFT - blocksize_bits);
998998
999999 if (unlikely(num_blocks == 0))
10001000 return 0;
10011001
1002− if ((blocksize_bits < 9) || (blocksize_bits > PAGE_CACHE_SHIFT))
1002+ if ((blocksize_bits < 9) || (blocksize_bits > PAGE_SHIFT))
10031003 return -EINVAL;
10041004
10051005 if ((last_fs_block > (sector_t)(~0ULL) >> (blocksize_bits - 9)) ||
fs/logfs/dev_bdev.c+1−1
@@ -64,7 +64,7 @@ static void writeseg_end_io(struct bio *bio) · 63 unmodified lines
6464
6565 bio_for_each_segment_all(bvec, bio, i) {
6666 end_page_writeback(bvec->bv_page);
67− page_cache_release(bvec->bv_page);
67+ put_page(bvec->bv_page);
6868 }
6969 bio_put(bio);
7070 if (atomic_dec_and_test(&super->s_pending_writes))
fs/logfs/dev_mtd.c+5−5
@@ -46,9 +46,9 @@ static int loffs_mtd_write(struct super_block *sb, loff_t ofs, size_t len, · 45 unmodified lines
4646
4747 BUG_ON((ofs >= mtd->size) || (len > mtd->size - ofs));
4848 BUG_ON(ofs != (ofs >> super->s_writeshift) << super->s_writeshift);
49− BUG_ON(len > PAGE_CACHE_SIZE);
50− page_start = ofs & PAGE_CACHE_MASK;
51− page_end = PAGE_CACHE_ALIGN(ofs + len) - 1;
49+ BUG_ON(len > PAGE_SIZE);
50+ page_start = ofs & PAGE_MASK;
51+ page_end = PAGE_ALIGN(ofs + len) - 1;
5252 ret = mtd_write(mtd, ofs, len, &retlen, buf);
5353 if (ret || (retlen != len))
5454 return -EIO;
@@ -82,7 +82,7 @@ static int logfs_mtd_erase_mapping(struct super_block *sb, loff_t ofs, · 27 unmodified lines
8282 if (!page)
8383 continue;
8484 memset(page_address(page), 0xFF, PAGE_SIZE);
85− page_cache_release(page);
85+ put_page(page);
8686 }
8787 return 0;
8888 }
@@ -195,7 +195,7 @@ static int __logfs_mtd_writeseg(struct super_block *sb, u64 ofs, pgoff_t index, · 106 unmodified lines
195195 err = loffs_mtd_write(sb, page->index << PAGE_SHIFT, PAGE_SIZE,
196196 page_address(page));
197197 unlock_page(page);
198− page_cache_release(page);
198+ put_page(page);
199199 if (err)
200200 return err;
201201 }
fs/logfs/dir.c+6−6
@@ -183,7 +183,7 @@ static struct page *logfs_get_dd_page(struct inode *dir, struct dentry *dentry) · 182 unmodified lines
183183 if (name->len != be16_to_cpu(dd->namelen) ||
184184 memcmp(name->name, dd->name, name->len)) {
185185 kunmap_atomic(dd);
186− page_cache_release(page);
186+ put_page(page);
187187 continue;
188188 }
189189
@@ -238,7 +238,7 @@ static int logfs_unlink(struct inode *dir, struct dentry *dentry) · 48 unmodified lines
238238 return PTR_ERR(page);
239239 }
240240 index = page->index;
241− page_cache_release(page);
241+ put_page(page);
242242
243243 mutex_lock(&super->s_dirop_mutex);
244244 logfs_add_transaction(dir, ta);
@@ -316,7 +316,7 @@ static int logfs_readdir(struct file *file, struct dir_context *ctx) · 71 unmodified lines
316316 be16_to_cpu(dd->namelen),
317317 be64_to_cpu(dd->ino), dd->type);
318318 kunmap(page);
319− page_cache_release(page);
319+ put_page(page);
320320 if (full)
321321 break;
322322 }
@@ -349,7 +349,7 @@ static struct dentry *logfs_lookup(struct inode *dir, struct dentry *dentry, · 26 unmodified lines
349349 dd = kmap_atomic(page);
350350 ino = be64_to_cpu(dd->ino);
351351 kunmap_atomic(dd);
352− page_cache_release(page);
352+ put_page(page);
353353
354354 inode = logfs_iget(dir->i_sb, ino);
355355 if (IS_ERR(inode))
@@ -392,7 +392,7 @@ static int logfs_write_dir(struct inode *dir, struct dentry *dentry, · 36 unmodified lines
392392
393393 err = logfs_write_buf(dir, page, WF_LOCK);
394394 unlock_page(page);
395− page_cache_release(page);
395+ put_page(page);
396396 if (!err)
397397 grow_dir(dir, index);
398398 return err;
@@ -561,7 +561,7 @@ static int logfs_get_dd(struct inode *dir, struct dentry *dentry, · 162 unmodified lines
561561 map = kmap_atomic(page);
562562 memcpy(dd, map, sizeof(*dd));
563563 kunmap_atomic(map);
564− page_cache_release(page);
564+ put_page(page);
565565 return 0;
566566 }
567567
fs/logfs/file.c+13−13
@@ -15,21 +15,21 @@ static int logfs_write_begin(struct file *file, struct address_space *mapping, · 14 unmodified lines
1515 {
1616 struct inode *inode = mapping->host;
1717 struct page *page;
18− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
18+ pgoff_t index = pos >> PAGE_SHIFT;
1919
2020 page = grab_cache_page_write_begin(mapping, index, flags);
2121 if (!page)
2222 return -ENOMEM;
2323 *pagep = page;
2424
25− if ((len == PAGE_CACHE_SIZE) || PageUptodate(page))
25+ if ((len == PAGE_SIZE) || PageUptodate(page))
2626 return 0;
27− if ((pos & PAGE_CACHE_MASK) >= i_size_read(inode)) {
28− unsigned start = pos & (PAGE_CACHE_SIZE - 1);
27+ if ((pos & PAGE_MASK) >= i_size_read(inode)) {
28+ unsigned start = pos & (PAGE_SIZE - 1);
2929 unsigned end = start + len;
3030
3131 /* Reading beyond i_size is simple: memset to zero */
32− zero_user_segments(page, 0, start, end, PAGE_CACHE_SIZE);
32+ zero_user_segments(page, 0, start, end, PAGE_SIZE);
3333 return 0;
3434 }
3535 return logfs_readpage_nolock(page);
@@ -41,11 +41,11 @@ static int logfs_write_end(struct file *file, struct address_space *mapping, · 5 unmodified lines
4141 {
4242 struct inode *inode = mapping->host;
4343 pgoff_t index = page->index;
44− unsigned start = pos & (PAGE_CACHE_SIZE - 1);
44+ unsigned start = pos & (PAGE_SIZE - 1);
4545 unsigned end = start + copied;
4646 int ret = 0;
4747
48− BUG_ON(PAGE_CACHE_SIZE != inode->i_sb->s_blocksize);
48+ BUG_ON(PAGE_SIZE != inode->i_sb->s_blocksize);
4949 BUG_ON(page->index > I3_BLOCKS);
5050
5151 if (copied < len) {
@@ -61,8 +61,8 @@ static int logfs_write_end(struct file *file, struct address_space *mapping, · 9 unmodified lines
6161 if (copied == 0)
6262 goto out; /* FIXME: do we need to update inode? */
6363
64− if (i_size_read(inode) < (index << PAGE_CACHE_SHIFT) + end) {
65− i_size_write(inode, (index << PAGE_CACHE_SHIFT) + end);
64+ if (i_size_read(inode) < (index << PAGE_SHIFT) + end) {
65+ i_size_write(inode, (index << PAGE_SHIFT) + end);
6666 mark_inode_dirty_sync(inode);
6767 }
6868
@@ -75,7 +75,7 @@ static int logfs_write_end(struct file *file, struct address_space *mapping, · 6 unmodified lines
7575 }
7676 out:
7777 unlock_page(page);
78− page_cache_release(page);
78+ put_page(page);
7979 return ret ? ret : copied;
8080 }
8181
@@ -118,7 +118,7 @@ static int logfs_writepage(struct page *page, struct writeback_control *wbc) · 36 unmodified lines
118118 {
119119 struct inode *inode = page->mapping->host;
120120 loff_t i_size = i_size_read(inode);
121− pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
121+ pgoff_t end_index = i_size >> PAGE_SHIFT;
122122 unsigned offset;
123123 u64 bix;
124124 level_t level;
@@ -142,7 +142,7 @@ static int logfs_writepage(struct page *page, struct writeback_control *wbc) · 17 unmodified lines
142142 return __logfs_writepage(page);
143143
144144 /* Is the page fully outside i_size? (truncate in progress) */
145− offset = i_size & (PAGE_CACHE_SIZE-1);
145+ offset = i_size & (PAGE_SIZE-1);
146146 if (bix > end_index || offset == 0) {
147147 unlock_page(page);
148148 return 0; /* don't care */
@@ -155,7 +155,7 @@ static int logfs_writepage(struct page *page, struct writeback_control *wbc) · 6 unmodified lines
155155 * the page size, the remaining memory is zeroed when mapped, and
156156 * writes to that region are not written out to the file."
157157 */
158− zero_user_segment(page, offset, PAGE_CACHE_SIZE);
158+ zero_user_segment(page, offset, PAGE_SIZE);
159159 return __logfs_writepage(page);
160160 }
161161
fs/logfs/readwrite.c+10−10
@@ -281,7 +281,7 @@ static struct page *logfs_get_read_page(struct inode *inode, u64 bix, · 280 unmodified lines
281281 static void logfs_put_read_page(struct page *page)
282282 {
283283 unlock_page(page);
284− page_cache_release(page);
284+ put_page(page);
285285 }
286286
287287 static void logfs_lock_write_page(struct page *page)
@@ -323,7 +323,7 @@ repeat: · 35 unmodified lines
323323 return NULL;
324324 err = add_to_page_cache_lru(page, mapping, index, GFP_NOFS);
325325 if (unlikely(err)) {
326− page_cache_release(page);
326+ put_page(page);
327327 if (err == -EEXIST)
328328 goto repeat;
329329 return NULL;
@@ -342,7 +342,7 @@ static void logfs_unlock_write_page(struct page *page) · 12 unmodified lines
342342 static void logfs_put_write_page(struct page *page)
343343 {
344344 logfs_unlock_write_page(page);
345− page_cache_release(page);
345+ put_page(page);
346346 }
347347
348348 static struct page *logfs_get_page(struct inode *inode, u64 bix, level_t level,
@@ -562,7 +562,7 @@ static void indirect_free_block(struct super_block *sb, · 213 unmodified lines
562562
563563 if (PagePrivate(page)) {
564564 ClearPagePrivate(page);
565− page_cache_release(page);
565+ put_page(page);
566566 set_page_private(page, 0);
567567 }
568568 __free_block(sb, block);
@@ -655,7 +655,7 @@ static void alloc_data_block(struct inode *inode, struct page *page) · 86 unmodified lines
655655 block->page = page;
656656
657657 SetPagePrivate(page);
658− page_cache_get(page);
658+ get_page(page);
659659 set_page_private(page, (unsigned long) block);
660660
661661 block->ops = &indirect_block_ops;
@@ -709,7 +709,7 @@ static u64 block_get_pointer(struct page *page, int index) · 47 unmodified lines
709709
710710 static int logfs_read_empty(struct page *page)
711711 {
712− zero_user_segment(page, 0, PAGE_CACHE_SIZE);
712+ zero_user_segment(page, 0, PAGE_SIZE);
713713 return 0;
714714 }
715715
@@ -1660,7 +1660,7 @@ static int truncate_data_block(struct inode *inode, struct page *page, · 944 unmodified lines
16601660 if (err)
16611661 return err;
16621662
1663− zero_user_segment(page, size - pageofs, PAGE_CACHE_SIZE);
1663+ zero_user_segment(page, size - pageofs, PAGE_SIZE);
16641664 return logfs_segment_write(inode, page, shadow);
16651665 }
16661666
@@ -1919,7 +1919,7 @@ static void move_page_to_inode(struct inode *inode, struct page *page) · 252 unmodified lines
19191919 block->page = NULL;
19201920 if (PagePrivate(page)) {
19211921 ClearPagePrivate(page);
1922− page_cache_release(page);
1922+ put_page(page);
19231923 set_page_private(page, 0);
19241924 }
19251925 }
@@ -1940,7 +1940,7 @@ static void move_inode_to_page(struct page *page, struct inode *inode) · 14 unmodified lines
19401940
19411941 if (!PagePrivate(page)) {
19421942 SetPagePrivate(page);
1943− page_cache_get(page);
1943+ get_page(page);
19441944 set_page_private(page, (unsigned long) block);
19451945 }
19461946
@@ -1971,7 +1971,7 @@ int logfs_read_inode(struct inode *inode) · 24 unmodified lines
19711971 logfs_disk_to_inode(di, inode);
19721972 kunmap_atomic(di);
19731973 move_page_to_inode(inode, page);
1974− page_cache_release(page);
1974+ put_page(page);
19751975 return 0;
19761976 }
19771977
fs/logfs/segment.c+14−14
@@ -90,9 +90,9 @@ int __logfs_buf_write(struct logfs_area *area, u64 ofs, void *buf, size_t len, · 89 unmodified lines
9090
9191 if (!PagePrivate(page)) {
9292 SetPagePrivate(page);
93− page_cache_get(page);
93+ get_page(page);
9494 }
95− page_cache_release(page);
95+ put_page(page);
9696
9797 buf += copylen;
9898 len -= copylen;
@@ -117,9 +117,9 @@ static void pad_partial_page(struct logfs_area *area) · 18 unmodified lines
117117 memset(page_address(page) + offset, 0xff, len);
118118 if (!PagePrivate(page)) {
119119 SetPagePrivate(page);
120− page_cache_get(page);
120+ get_page(page);
121121 }
122− page_cache_release(page);
122+ put_page(page);
123123 }
124124 }
125125
@@ -129,20 +129,20 @@ static void pad_full_pages(struct logfs_area *area) · 3 unmodified lines
129129 struct logfs_super *super = logfs_super(sb);
130130 u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes);
131131 u32 len = super->s_segsize - area->a_used_bytes;
132− pgoff_t index = PAGE_CACHE_ALIGN(ofs) >> PAGE_CACHE_SHIFT;
133− pgoff_t no_indizes = len >> PAGE_CACHE_SHIFT;
132+ pgoff_t index = PAGE_ALIGN(ofs) >> PAGE_SHIFT;
133+ pgoff_t no_indizes = len >> PAGE_SHIFT;
134134 struct page *page;
135135
136136 while (no_indizes) {
137137 page = get_mapping_page(sb, index, 0);
138138 BUG_ON(!page); /* FIXME: reserve a pool */
139139 SetPageUptodate(page);
140− memset(page_address(page), 0xff, PAGE_CACHE_SIZE);
140+ memset(page_address(page), 0xff, PAGE_SIZE);
141141 if (!PagePrivate(page)) {
142142 SetPagePrivate(page);
143− page_cache_get(page);
143+ get_page(page);
144144 }
145− page_cache_release(page);
145+ put_page(page);
146146 index++;
147147 no_indizes--;
148148 }
@@ -411,7 +411,7 @@ int wbuf_read(struct super_block *sb, u64 ofs, size_t len, void *buf) · 262 unmodified lines
411411 if (IS_ERR(page))
412412 return PTR_ERR(page);
413413 memcpy(buf, page_address(page) + offset, copylen);
414− page_cache_release(page);
414+ put_page(page);
415415
416416 buf += copylen;
417417 len -= copylen;
@@ -499,7 +499,7 @@ static void move_btree_to_page(struct inode *inode, struct page *page, · 81 unmodified lines
499499
500500 if (!PagePrivate(page)) {
501501 SetPagePrivate(page);
502− page_cache_get(page);
502+ get_page(page);
503503 set_page_private(page, (unsigned long) block);
504504 }
505505 block->ops = &indirect_block_ops;
@@ -554,7 +554,7 @@ void move_page_to_btree(struct page *page) · 48 unmodified lines
554554
555555 if (PagePrivate(page)) {
556556 ClearPagePrivate(page);
557− page_cache_release(page);
557+ put_page(page);
558558 set_page_private(page, 0);
559559 }
560560 block->ops = &btree_block_ops;
@@ -723,9 +723,9 @@ void freeseg(struct super_block *sb, u32 segno) · 162 unmodified lines
723723 continue;
724724 if (PagePrivate(page)) {
725725 ClearPagePrivate(page);
726− page_cache_release(page);
726+ put_page(page);
727727 }
728− page_cache_release(page);
728+ put_page(page);
729729 }
730730 }
731731
fs/logfs/super.c+8−8
@@ -48,7 +48,7 @@ void emergency_read_end(struct page *page) · 47 unmodified lines
4848 if (page == emergency_page)
4949 mutex_unlock(&emergency_mutex);
5050 else
51− page_cache_release(page);
51+ put_page(page);
5252 }
5353
5454 static void dump_segfile(struct super_block *sb)
@@ -206,7 +206,7 @@ static int write_one_sb(struct super_block *sb, · 151 unmodified lines
206206 logfs_set_segment_erased(sb, segno, ec, 0);
207207 logfs_write_ds(sb, ds, segno, ec);
208208 err = super->s_devops->write_sb(sb, page);
209− page_cache_release(page);
209+ put_page(page);
210210 return err;
211211 }
212212
@@ -366,24 +366,24 @@ static struct page *find_super_block(struct super_block *sb) · 153 unmodified lines
366366 return NULL;
367367 last = super->s_devops->find_last_sb(sb, &super->s_sb_ofs[1]);
368368 if (!last || IS_ERR(last)) {
369− page_cache_release(first);
369+ put_page(first);
370370 return NULL;
371371 }
372372
373373 if (!logfs_check_ds(page_address(first))) {
374− page_cache_release(last);
374+ put_page(last);
375375 return first;
376376 }
377377
378378 /* First one didn't work, try the second superblock */
379379 if (!logfs_check_ds(page_address(last))) {
380− page_cache_release(first);
380+ put_page(first);
381381 return last;
382382 }
383383
384384 /* Neither worked, sorry folks */
385− page_cache_release(first);
386− page_cache_release(last);
385+ put_page(first);
386+ put_page(last);
387387 return NULL;
388388 }
389389
@@ -425,7 +425,7 @@ static int __logfs_read_sb(struct super_block *sb) · 35 unmodified lines
425425 super->s_data_levels = ds->ds_data_levels;
426426 super->s_total_levels = super->s_ifile_levels + super->s_iblock_levels
427427 + super->s_data_levels;
428− page_cache_release(page);
428+ put_page(page);
429429 return 0;
430430 }
431431
fs/minix/dir.c+9−9
@@ -28,7 +28,7 @@ const struct file_operations minix_dir_operations = { · 27 unmodified lines
2828 static inline void dir_put_page(struct page *page)
2929 {
3030 kunmap(page);
31− page_cache_release(page);
31+ put_page(page);
3232 }
3333
3434 /*
@@ -38,10 +38,10 @@ static inline void dir_put_page(struct page *page) · 3 unmodified lines
3838 static unsigned
3939 minix_last_byte(struct inode *inode, unsigned long page_nr)
4040 {
41− unsigned last_byte = PAGE_CACHE_SIZE;
41+ unsigned last_byte = PAGE_SIZE;
4242
43− if (page_nr == (inode->i_size >> PAGE_CACHE_SHIFT))
44− last_byte = inode->i_size & (PAGE_CACHE_SIZE - 1);
43+ if (page_nr == (inode->i_size >> PAGE_SHIFT))
44+ last_byte = inode->i_size & (PAGE_SIZE - 1);
4545 return last_byte;
4646 }
4747
@@ -92,8 +92,8 @@ static int minix_readdir(struct file *file, struct dir_context *ctx) · 44 unmodified lines
9292 if (pos >= inode->i_size)
9393 return 0;
9494
95− offset = pos & ~PAGE_CACHE_MASK;
96− n = pos >> PAGE_CACHE_SHIFT;
95+ offset = pos & ~PAGE_MASK;
96+ n = pos >> PAGE_SHIFT;
9797
9898 for ( ; n < npages; n++, offset = 0) {
9999 char *p, *kaddr, *limit;
@@ -229,7 +229,7 @@ int minix_add_link(struct dentry *dentry, struct inode *inode) · 129 unmodified lines
229229 lock_page(page);
230230 kaddr = (char*)page_address(page);
231231 dir_end = kaddr + minix_last_byte(dir, n);
232− limit = kaddr + PAGE_CACHE_SIZE - sbi->s_dirsize;
232+ limit = kaddr + PAGE_SIZE - sbi->s_dirsize;
233233 for (p = kaddr; p <= limit; p = minix_next_entry(p, sbi)) {
234234 de = (minix_dirent *)p;
235235 de3 = (minix3_dirent *)p;
@@ -327,7 +327,7 @@ int minix_make_empty(struct inode *inode, struct inode *dir) · 91 unmodified lines
327327 }
328328
329329 kaddr = kmap_atomic(page);
330− memset(kaddr, 0, PAGE_CACHE_SIZE);
330+ memset(kaddr, 0, PAGE_SIZE);
331331
332332 if (sbi->s_version == MINIX_V3) {
333333 minix3_dirent *de3 = (minix3_dirent *)kaddr;
@@ -350,7 +350,7 @@ int minix_make_empty(struct inode *inode, struct inode *dir) · 16 unmodified lines
350350
351351 err = dir_commit_chunk(page, 0, 2 * sbi->s_dirsize);
352352 fail:
353− page_cache_release(page);
353+ put_page(page);
354354 return err;
355355 }
356356
fs/minix/namei.c+2−2
@@ -243,11 +243,11 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry, · 242 unmodified lines
243243 out_dir:
244244 if (dir_de) {
245245 kunmap(dir_page);
246− page_cache_release(dir_page);
246+ put_page(dir_page);
247247 }
248248 out_old:
249249 kunmap(old_page);
250− page_cache_release(old_page);
250+ put_page(old_page);
251251 out:
252252 return err;
253253 }
fs/mpage.c+10−10
@@ -107,7 +107,7 @@ map_buffer_to_page(struct page *page, struct buffer_head *bh, int page_block) · 106 unmodified lines
107107 * don't make any buffers if there is only one buffer on
108108 * the page and the page just needs to be set up to date
109109 */
110− if (inode->i_blkbits == PAGE_CACHE_SHIFT &&
110+ if (inode->i_blkbits == PAGE_SHIFT &&
111111 buffer_uptodate(bh)) {
112112 SetPageUptodate(page);
113113 return;
@@ -145,7 +145,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, · 31 unmodified lines
145145 {
146146 struct inode *inode = page->mapping->host;
147147 const unsigned blkbits = inode->i_blkbits;
148− const unsigned blocks_per_page = PAGE_CACHE_SIZE >> blkbits;
148+ const unsigned blocks_per_page = PAGE_SIZE >> blkbits;
149149 const unsigned blocksize = 1 << blkbits;
150150 sector_t block_in_file;
151151 sector_t last_block;
@@ -162,7 +162,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, · 10 unmodified lines
162162 if (page_has_buffers(page))
163163 goto confused;
164164
165− block_in_file = (sector_t)page->index << (PAGE_CACHE_SHIFT - blkbits);
165+ block_in_file = (sector_t)page->index << (PAGE_SHIFT - blkbits);
166166 last_block = block_in_file + nr_pages * blocks_per_page;
167167 last_block_in_file = (i_size_read(inode) + blocksize - 1) >> blkbits;
168168 if (last_block > last_block_in_file)
@@ -249,7 +249,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, · 80 unmodified lines
249249 }
250250
251251 if (first_hole != blocks_per_page) {
252− zero_user_segment(page, first_hole << blkbits, PAGE_CACHE_SIZE);
252+ zero_user_segment(page, first_hole << blkbits, PAGE_SIZE);
253253 if (first_hole == 0) {
254254 SetPageUptodate(page);
255255 unlock_page(page);
@@ -380,7 +380,7 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages, · 124 unmodified lines
380380 &first_logical_block,
381381 get_block, gfp);
382382 }
383− page_cache_release(page);
383+ put_page(page);
384384 }
385385 BUG_ON(!list_empty(pages));
386386 if (bio)
@@ -472,7 +472,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc, · 85 unmodified lines
472472 struct inode *inode = page->mapping->host;
473473 const unsigned blkbits = inode->i_blkbits;
474474 unsigned long end_index;
475− const unsigned blocks_per_page = PAGE_CACHE_SIZE >> blkbits;
475+ const unsigned blocks_per_page = PAGE_SIZE >> blkbits;
476476 sector_t last_block;
477477 sector_t block_in_file;
478478 sector_t blocks[MAX_BUF_PER_PAGE];
@@ -542,7 +542,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc, · 63 unmodified lines
542542 * The page has no buffers: map it to disk
543543 */
544544 BUG_ON(!PageUptodate(page));
545− block_in_file = (sector_t)page->index << (PAGE_CACHE_SHIFT - blkbits);
545+ block_in_file = (sector_t)page->index << (PAGE_SHIFT - blkbits);
546546 last_block = (i_size - 1) >> blkbits;
547547 map_bh.b_page = page;
548548 for (page_block = 0; page_block < blocks_per_page; ) {
@@ -574,7 +574,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc, · 25 unmodified lines
574574 first_unmapped = page_block;
575575
576576 page_is_mapped:
577− end_index = i_size >> PAGE_CACHE_SHIFT;
577+ end_index = i_size >> PAGE_SHIFT;
578578 if (page->index >= end_index) {
579579 /*
580580 * The page straddles i_size. It must be zeroed out on each
@@ -584,11 +584,11 @@ page_is_mapped: · 3 unmodified lines
584584 * is zeroed when mapped, and writes to that region are not
585585 * written out to the file."
586586 */
587− unsigned offset = i_size & (PAGE_CACHE_SIZE - 1);
587+ unsigned offset = i_size & (PAGE_SIZE - 1);
588588
589589 if (page->index > end_index || !offset)
590590 goto confused;
591− zero_user_segment(page, offset, PAGE_CACHE_SIZE);
591+ zero_user_segment(page, offset, PAGE_SIZE);
592592 }
593593
594594 /*
fs/ncpfs/dir.c+5−5
@@ -510,7 +510,7 @@ static int ncp_readdir(struct file *file, struct dir_context *ctx) · 509 unmodified lines
510510 kunmap(ctl.page);
511511 SetPageUptodate(ctl.page);
512512 unlock_page(ctl.page);
513− page_cache_release(ctl.page);
513+ put_page(ctl.page);
514514 ctl.page = NULL;
515515 }
516516 ctl.idx = 0;
@@ -520,7 +520,7 @@ invalid_cache: · 3 unmodified lines
520520 if (ctl.page) {
521521 kunmap(ctl.page);
522522 unlock_page(ctl.page);
523− page_cache_release(ctl.page);
523+ put_page(ctl.page);
524524 ctl.page = NULL;
525525 }
526526 ctl.cache = cache;
@@ -554,14 +554,14 @@ finished: · 27 unmodified lines
554554 kunmap(ctl.page);
555555 SetPageUptodate(ctl.page);
556556 unlock_page(ctl.page);
557− page_cache_release(ctl.page);
557+ put_page(ctl.page);
558558 }
559559 if (page) {
560560 cache->head = ctl.head;
561561 kunmap(page);
562562 SetPageUptodate(page);
563563 unlock_page(page);
564− page_cache_release(page);
564+ put_page(page);
565565 }
566566 out:
567567 return result;
@@ -649,7 +649,7 @@ ncp_fill_cache(struct file *file, struct dir_context *ctx, · 81 unmodified lines
649649 kunmap(ctl.page);
650650 SetPageUptodate(ctl.page);
651651 unlock_page(ctl.page);
652− page_cache_release(ctl.page);
652+ put_page(ctl.page);
653653 }
654654 ctl.cache = NULL;
655655 ctl.idx -= NCP_DIRCACHE_SIZE;
fs/ncpfs/ncplib_kernel.h+1−1
@@ -191,7 +191,7 @@ struct ncp_cache_head { · 190 unmodified lines
191191 int eof;
192192 };
193193
194−#define NCP_DIRCACHE_SIZE ((int)(PAGE_CACHE_SIZE/sizeof(struct dentry *)))
194+#define NCP_DIRCACHE_SIZE ((int)(PAGE_SIZE/sizeof(struct dentry *)))
195195 union ncp_dir_cache {
196196 struct ncp_cache_head head;
197197 struct dentry *dentry[NCP_DIRCACHE_SIZE];
fs/nfs/blocklayout/blocklayout.c+12−12
@@ -231,7 +231,7 @@ bl_read_pagelist(struct nfs_pgio_header *header) · 230 unmodified lines
231231 size_t bytes_left = header->args.count;
232232 unsigned int pg_offset = header->args.pgbase, pg_len;
233233 struct page **pages = header->args.pages;
234− int pg_index = header->args.pgbase >> PAGE_CACHE_SHIFT;
234+ int pg_index = header->args.pgbase >> PAGE_SHIFT;
235235 const bool is_dio = (header->dreq != NULL);
236236 struct blk_plug plug;
237237 int i;
@@ -263,13 +263,13 @@ bl_read_pagelist(struct nfs_pgio_header *header) · 25 unmodified lines
263263 }
264264
265265 if (is_dio) {
266− if (pg_offset + bytes_left > PAGE_CACHE_SIZE)
267− pg_len = PAGE_CACHE_SIZE - pg_offset;
266+ if (pg_offset + bytes_left > PAGE_SIZE)
267+ pg_len = PAGE_SIZE - pg_offset;
268268 else
269269 pg_len = bytes_left;
270270 } else {
271271 BUG_ON(pg_offset != 0);
272− pg_len = PAGE_CACHE_SIZE;
272+ pg_len = PAGE_SIZE;
273273 }
274274
275275 if (is_hole(&be)) {
@@ -339,9 +339,9 @@ static void bl_write_cleanup(struct work_struct *work) · 63 unmodified lines
339339
340340 if (likely(!hdr->pnfs_error)) {
341341 struct pnfs_block_layout *bl = BLK_LSEG2EXT(hdr->lseg);
342− u64 start = hdr->args.offset & (loff_t)PAGE_CACHE_MASK;
342+ u64 start = hdr->args.offset & (loff_t)PAGE_MASK;
343343 u64 end = (hdr->args.offset + hdr->args.count +
344− PAGE_CACHE_SIZE - 1) & (loff_t)PAGE_CACHE_MASK;
344+ PAGE_SIZE - 1) & (loff_t)PAGE_MASK;
345345
346346 ext_tree_mark_written(bl, start >> SECTOR_SHIFT,
347347 (end - start) >> SECTOR_SHIFT);
@@ -373,7 +373,7 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync) · 25 unmodified lines
373373 loff_t offset = header->args.offset;
374374 size_t count = header->args.count;
375375 struct page **pages = header->args.pages;
376− int pg_index = header->args.pgbase >> PAGE_CACHE_SHIFT;
376+ int pg_index = header->args.pgbase >> PAGE_SHIFT;
377377 unsigned int pg_len;
378378 struct blk_plug plug;
379379 int i;
@@ -392,7 +392,7 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync) · 12 unmodified lines
392392 blk_start_plug(&plug);
393393
394394 /* we always write out the whole page */
395− offset = offset & (loff_t)PAGE_CACHE_MASK;
395+ offset = offset & (loff_t)PAGE_MASK;
396396 isect = offset >> SECTOR_SHIFT;
397397
398398 for (i = pg_index; i < header->page_array.npages; i++) {
@@ -408,7 +408,7 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync) · 9 unmodified lines
408408 extent_length = be.be_length - (isect - be.be_f_offset);
409409 }
410410
411− pg_len = PAGE_CACHE_SIZE;
411+ pg_len = PAGE_SIZE;
412412 bio = do_add_page_to_bio(bio, header->page_array.npages - i,
413413 WRITE, isect, pages[i], &map, &be,
414414 bl_end_io_write, par,
@@ -820,7 +820,7 @@ static u64 pnfs_num_cont_bytes(struct inode *inode, pgoff_t idx) · 405 unmodified lines
820820 pgoff_t end;
821821
822822 /* Optimize common case that writes from 0 to end of file */
823− end = DIV_ROUND_UP(i_size_read(inode), PAGE_CACHE_SIZE);
823+ end = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE);
824824 if (end != inode->i_mapping->nrpages) {
825825 rcu_read_lock();
826826 end = page_cache_next_hole(mapping, idx + 1, ULONG_MAX);
@@ -828,9 +828,9 @@ static u64 pnfs_num_cont_bytes(struct inode *inode, pgoff_t idx) · 1 unmodified line
828828 }
829829
830830 if (!end)
831− return i_size_read(inode) - (idx << PAGE_CACHE_SHIFT);
831+ return i_size_read(inode) - (idx << PAGE_SHIFT);
832832 else
833− return (end - idx) << PAGE_CACHE_SHIFT;
833+ return (end - idx) << PAGE_SHIFT;
834834 }
835835
836836 static void
fs/nfs/blocklayout/blocklayout.h+2−2
@@ -40,8 +40,8 @@ · 39 unmodified lines
4040 #include "../pnfs.h"
4141 #include "../netns.h"
4242
43−#define PAGE_CACHE_SECTORS (PAGE_CACHE_SIZE >> SECTOR_SHIFT)
44−#define PAGE_CACHE_SECTOR_SHIFT (PAGE_CACHE_SHIFT - SECTOR_SHIFT)
43+#define PAGE_CACHE_SECTORS (PAGE_SIZE >> SECTOR_SHIFT)
44+#define PAGE_CACHE_SECTOR_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)
4545 #define SECTOR_SIZE (1 << SECTOR_SHIFT)
4646
4747 struct pnfs_block_dev;
fs/nfs/client.c+4−4
@@ -736,7 +736,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, · 735 unmodified lines
736736 server->rsize = max_rpc_payload;
737737 if (server->rsize > NFS_MAX_FILE_IO_SIZE)
738738 server->rsize = NFS_MAX_FILE_IO_SIZE;
739− server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
739+ server->rpages = (server->rsize + PAGE_SIZE - 1) >> PAGE_SHIFT;
740740
741741 server->backing_dev_info.name = "nfs";
742742 server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD;
@@ -745,13 +745,13 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, · 2 unmodified lines
745745 server->wsize = max_rpc_payload;
746746 if (server->wsize > NFS_MAX_FILE_IO_SIZE)
747747 server->wsize = NFS_MAX_FILE_IO_SIZE;
748− server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
748+ server->wpages = (server->wsize + PAGE_SIZE - 1) >> PAGE_SHIFT;
749749
750750 server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
751751
752752 server->dtsize = nfs_block_size(fsinfo->dtpref, NULL);
753− if (server->dtsize > PAGE_CACHE_SIZE * NFS_MAX_READDIR_PAGES)
754− server->dtsize = PAGE_CACHE_SIZE * NFS_MAX_READDIR_PAGES;
753+ if (server->dtsize > PAGE_SIZE * NFS_MAX_READDIR_PAGES)
754+ server->dtsize = PAGE_SIZE * NFS_MAX_READDIR_PAGES;
755755 if (server->dtsize > server->rsize)
756756 server->dtsize = server->rsize;
757757
fs/nfs/dir.c+2−2
@@ -707,7 +707,7 @@ void cache_page_release(nfs_readdir_descriptor_t *desc) · 706 unmodified lines
707707 {
708708 if (!desc->page->mapping)
709709 nfs_readdir_clear_array(desc->page);
710− page_cache_release(desc->page);
710+ put_page(desc->page);
711711 desc->page = NULL;
712712 }
713713
@@ -1923,7 +1923,7 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) · 1209 unmodified lines
19231923 * add_to_page_cache_lru() grabs an extra page refcount.
19241924 * Drop it here to avoid leaking this page later.
19251925 */
1926− page_cache_release(page);
1926+ put_page(page);
19271927 } else
19281928 __free_page(page);
19291929
fs/nfs/direct.c+4−4
@@ -269,7 +269,7 @@ static void nfs_direct_release_pages(struct page **pages, unsigned int npages) · 268 unmodified lines
269269 {
270270 unsigned int i;
271271 for (i = 0; i < npages; i++)
272− page_cache_release(pages[i]);
272+ put_page(pages[i]);
273273 }
274274
275275 void nfs_init_cinfo_from_dreq(struct nfs_commit_info *cinfo,
@@ -1003,7 +1003,7 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter) · 727 unmodified lines
10031003 iov_iter_count(iter));
10041004
10051005 pos = iocb->ki_pos;
1006− end = (pos + iov_iter_count(iter) - 1) >> PAGE_CACHE_SHIFT;
1006+ end = (pos + iov_iter_count(iter) - 1) >> PAGE_SHIFT;
10071007
10081008 inode_lock(inode);
10091009
@@ -1013,7 +1013,7 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter) · 3 unmodified lines
10131013
10141014 if (mapping->nrpages) {
10151015 result = invalidate_inode_pages2_range(mapping,
1016− pos >> PAGE_CACHE_SHIFT, end);
1016+ pos >> PAGE_SHIFT, end);
10171017 if (result)
10181018 goto out_unlock;
10191019 }
@@ -1042,7 +1042,7 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter) · 22 unmodified lines
10421042
10431043 if (mapping->nrpages) {
10441044 invalidate_inode_pages2_range(mapping,
1045− pos >> PAGE_CACHE_SHIFT, end);
1045+ pos >> PAGE_SHIFT, end);
10461046 }
10471047
10481048 inode_unlock(inode);
fs/nfs/file.c+10−10
@@ -320,7 +320,7 @@ static int nfs_want_read_modify_write(struct file *file, struct page *page, · 319 unmodified lines
320320 loff_t pos, unsigned len)
321321 {
322322 unsigned int pglen = nfs_page_length(page);
323− unsigned int offset = pos & (PAGE_CACHE_SIZE - 1);
323+ unsigned int offset = pos & (PAGE_SIZE - 1);
324324 unsigned int end = offset + len;
325325
326326 if (pnfs_ld_read_whole_page(file->f_mapping->host)) {
@@ -351,7 +351,7 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping, · 24 unmodified lines
351351 struct page **pagep, void **fsdata)
352352 {
353353 int ret;
354− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
354+ pgoff_t index = pos >> PAGE_SHIFT;
355355 struct page *page;
356356 int once_thru = 0;
357357
@@ -380,12 +380,12 @@ start: · 22 unmodified lines
380380 ret = nfs_flush_incompatible(file, page);
381381 if (ret) {
382382 unlock_page(page);
383− page_cache_release(page);
383+ put_page(page);
384384 } else if (!once_thru &&
385385 nfs_want_read_modify_write(file, page, pos, len)) {
386386 once_thru = 1;
387387 ret = nfs_readpage(file, page);
388− page_cache_release(page);
388+ put_page(page);
389389 if (!ret)
390390 goto start;
391391 }
@@ -396,7 +396,7 @@ static int nfs_write_end(struct file *file, struct address_space *mapping, · 4 unmodified lines
396396 loff_t pos, unsigned len, unsigned copied,
397397 struct page *page, void *fsdata)
398398 {
399− unsigned offset = pos & (PAGE_CACHE_SIZE - 1);
399+ unsigned offset = pos & (PAGE_SIZE - 1);
400400 struct nfs_open_context *ctx = nfs_file_open_context(file);
401401 int status;
402402
@@ -413,20 +413,20 @@ static int nfs_write_end(struct file *file, struct address_space *mapping, · 10 unmodified lines
413413
414414 if (pglen == 0) {
415415 zero_user_segments(page, 0, offset,
416− end, PAGE_CACHE_SIZE);
416+ end, PAGE_SIZE);
417417 SetPageUptodate(page);
418418 } else if (end >= pglen) {
419− zero_user_segment(page, end, PAGE_CACHE_SIZE);
419+ zero_user_segment(page, end, PAGE_SIZE);
420420 if (offset == 0)
421421 SetPageUptodate(page);
422422 } else
423− zero_user_segment(page, pglen, PAGE_CACHE_SIZE);
423+ zero_user_segment(page, pglen, PAGE_SIZE);
424424 }
425425
426426 status = nfs_updatepage(file, page, offset, copied);
427427
428428 unlock_page(page);
429− page_cache_release(page);
429+ put_page(page);
430430
431431 if (status < 0)
432432 return status;
@@ -454,7 +454,7 @@ static void nfs_invalidate_page(struct page *page, unsigned int offset, · 21 unmodified lines
454454 dfprintk(PAGECACHE, "NFS: invalidate_page(%p, %u, %u)\n",
455455 page, offset, length);
456456
457− if (offset != 0 || length < PAGE_CACHE_SIZE)
457+ if (offset != 0 || length < PAGE_SIZE)
458458 return;
459459 /* Cancel any unstarted writes on this page */
460460 nfs_wb_page_cancel(page_file_mapping(page)->host, page);
fs/nfs/internal.h+3−3
@@ -638,11 +638,11 @@ unsigned int nfs_page_length(struct page *page) · 637 unmodified lines
638638
639639 if (i_size > 0) {
640640 pgoff_t page_index = page_file_index(page);
641− pgoff_t end_index = (i_size - 1) >> PAGE_CACHE_SHIFT;
641+ pgoff_t end_index = (i_size - 1) >> PAGE_SHIFT;
642642 if (page_index < end_index)
643− return PAGE_CACHE_SIZE;
643+ return PAGE_SIZE;
644644 if (page_index == end_index)
645− return ((i_size - 1) & ~PAGE_CACHE_MASK) + 1;
645+ return ((i_size - 1) & ~PAGE_MASK) + 1;
646646 }
647647 return 0;
648648 }
fs/nfs/nfs4xdr.c+1−1
@@ -5001,7 +5001,7 @@ static int decode_space_limit(struct xdr_stream *xdr, · 5000 unmodified lines
50015001 blocksize = be32_to_cpup(p);
50025002 maxsize = (uint64_t)nblocks * (uint64_t)blocksize;
50035003 }
5004− maxsize >>= PAGE_CACHE_SHIFT;
5004+ maxsize >>= PAGE_SHIFT;
50055005 *pagemod_limit = min_t(u64, maxsize, ULONG_MAX);
50065006 return 0;
50075007 out_overflow:
fs/nfs/objlayout/objio_osd.c+1−1
@@ -486,7 +486,7 @@ static void __r4w_put_page(void *priv, struct page *page) · 485 unmodified lines
486486 dprintk("%s: index=0x%lx\n", __func__,
487487 (page == ZERO_PAGE(0)) ? -1UL : page->index);
488488 if (ZERO_PAGE(0) != page)
489− page_cache_release(page);
489+ put_page(page);
490490 return;
491491 }
492492
fs/nfs/pagelist.c+3−3
@@ -342,7 +342,7 @@ nfs_create_request(struct nfs_open_context *ctx, struct page *page, · 341 unmodified lines
342342 * update_nfs_request below if the region is not locked. */
343343 req->wb_page = page;
344344 req->wb_index = page_file_index(page);
345− page_cache_get(page);
345+ get_page(page);
346346 req->wb_offset = offset;
347347 req->wb_pgbase = offset;
348348 req->wb_bytes = count;
@@ -392,7 +392,7 @@ static void nfs_clear_request(struct nfs_page *req) · 43 unmodified lines
392392 struct nfs_lock_context *l_ctx = req->wb_lock_context;
393393
394394 if (page != NULL) {
395− page_cache_release(page);
395+ put_page(page);
396396 req->wb_page = NULL;
397397 }
398398 if (l_ctx != NULL) {
@@ -904,7 +904,7 @@ static bool nfs_can_coalesce_requests(struct nfs_page *prev, · 505 unmodified lines
904904 return false;
905905 } else {
906906 if (req->wb_pgbase != 0 ||
907− prev->wb_pgbase + prev->wb_bytes != PAGE_CACHE_SIZE)
907+ prev->wb_pgbase + prev->wb_bytes != PAGE_SIZE)
908908 return false;
909909 }
910910 }
fs/nfs/pnfs.c+3−3
@@ -841,7 +841,7 @@ send_layoutget(struct pnfs_layout_hdr *lo, · 840 unmodified lines
841841
842842 i_size = i_size_read(ino);
843843
844− lgp->args.minlength = PAGE_CACHE_SIZE;
844+ lgp->args.minlength = PAGE_SIZE;
845845 if (lgp->args.minlength > range->length)
846846 lgp->args.minlength = range->length;
847847 if (range->iomode == IOMODE_READ) {
@@ -1618,13 +1618,13 @@ lookup_again: · 770 unmodified lines
16181618 spin_unlock(&clp->cl_lock);
16191619 }
16201620
1621− pg_offset = arg.offset & ~PAGE_CACHE_MASK;
1621+ pg_offset = arg.offset & ~PAGE_MASK;
16221622 if (pg_offset) {
16231623 arg.offset -= pg_offset;
16241624 arg.length += pg_offset;
16251625 }
16261626 if (arg.length != NFS4_MAX_UINT64)
1627− arg.length = PAGE_CACHE_ALIGN(arg.length);
1627+ arg.length = PAGE_ALIGN(arg.length);
16281628
16291629 lseg = send_layoutget(lo, ctx, &arg, gfp_flags);
16301630 atomic_dec(&lo->plh_outstanding);
fs/nfs/read.c+8−8
@@ -46,7 +46,7 @@ static void nfs_readhdr_free(struct nfs_pgio_header *rhdr) · 45 unmodified lines
4646 static
4747 int nfs_return_empty_page(struct page *page)
4848 {
49− zero_user(page, 0, PAGE_CACHE_SIZE);
49+ zero_user(page, 0, PAGE_SIZE);
5050 SetPageUptodate(page);
5151 unlock_page(page);
5252 return 0;
@@ -118,8 +118,8 @@ int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode, · 65 unmodified lines
118118 unlock_page(page);
119119 return PTR_ERR(new);
120120 }
121− if (len < PAGE_CACHE_SIZE)
122− zero_user_segment(page, len, PAGE_CACHE_SIZE);
121+ if (len < PAGE_SIZE)
122+ zero_user_segment(page, len, PAGE_SIZE);
123123
124124 nfs_pageio_init_read(&pgio, inode, false,
125125 &nfs_async_read_completion_ops);
@@ -295,7 +295,7 @@ int nfs_readpage(struct file *file, struct page *page) · 169 unmodified lines
295295 int error;
296296
297297 dprintk("NFS: nfs_readpage (%p %ld@%lu)\n",
298− page, PAGE_CACHE_SIZE, page_file_index(page));
298+ page, PAGE_SIZE, page_file_index(page));
299299 nfs_inc_stats(inode, NFSIOS_VFSREADPAGE);
300300 nfs_add_stats(inode, NFSIOS_READPAGES, 1);
301301
@@ -361,8 +361,8 @@ readpage_async_filler(void *data, struct page *page) · 59 unmodified lines
361361 if (IS_ERR(new))
362362 goto out_error;
363363
364− if (len < PAGE_CACHE_SIZE)
365− zero_user_segment(page, len, PAGE_CACHE_SIZE);
364+ if (len < PAGE_SIZE)
365+ zero_user_segment(page, len, PAGE_SIZE);
366366 if (!nfs_pageio_add_request(desc->pgio, new)) {
367367 nfs_list_remove_request(new);
368368 nfs_readpage_release(new);
@@ -424,8 +424,8 @@ int nfs_readpages(struct file *filp, struct address_space *mapping, · 55 unmodified lines
424424
425425 pgm = &pgio.pg_mirrors[0];
426426 NFS_I(inode)->read_io += pgm->pg_bytes_written;
427− npages = (pgm->pg_bytes_written + PAGE_CACHE_SIZE - 1) >>
428− PAGE_CACHE_SHIFT;
427+ npages = (pgm->pg_bytes_written + PAGE_SIZE - 1) >>
428+ PAGE_SHIFT;
429429 nfs_add_stats(inode, NFSIOS_READPAGES, npages);
430430 read_complete:
431431 put_nfs_open_context(desc.ctx);
fs/nfs/write.c+2−2
@@ -150,7 +150,7 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int c · 149 unmodified lines
150150
151151 spin_lock(&inode->i_lock);
152152 i_size = i_size_read(inode);
153− end_index = (i_size - 1) >> PAGE_CACHE_SHIFT;
153+ end_index = (i_size - 1) >> PAGE_SHIFT;
154154 if (i_size > 0 && page_file_index(page) < end_index)
155155 goto out;
156156 end = page_file_offset(page) + ((loff_t)offset+count);
@@ -1942,7 +1942,7 @@ int nfs_wb_page_cancel(struct inode *inode, struct page *page) · 1785 unmodified lines
19421942 int nfs_wb_single_page(struct inode *inode, struct page *page, bool launder)
19431943 {
19441944 loff_t range_start = page_file_offset(page);
1945− loff_t range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1);
1945+ loff_t range_end = range_start + (loff_t)(PAGE_SIZE - 1);
19461946 struct writeback_control wbc = {
19471947 .sync_mode = WB_SYNC_ALL,
19481948 .nr_to_write = 0,
fs/nilfs2/bmap.c+1−1
@@ -458,7 +458,7 @@ __u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap, · 457 unmodified lines
458458 struct buffer_head *pbh;
459459 __u64 key;
460460
461− key = page_index(bh->b_page) << (PAGE_CACHE_SHIFT -
461+ key = page_index(bh->b_page) << (PAGE_SHIFT -
462462 bmap->b_inode->i_blkbits);
463463 for (pbh = page_buffers(bh->b_page); pbh != bh; pbh = pbh->b_this_page)
464464 key++;
fs/nilfs2/btnode.c+5−5
@@ -62,7 +62,7 @@ nilfs_btnode_create_block(struct address_space *btnc, __u64 blocknr) · 61 unmodified lines
6262 set_buffer_uptodate(bh);
6363
6464 unlock_page(bh->b_page);
65− page_cache_release(bh->b_page);
65+ put_page(bh->b_page);
6666 return bh;
6767 }
6868
@@ -128,7 +128,7 @@ found: · 59 unmodified lines
128128
129129 out_locked:
130130 unlock_page(page);
131− page_cache_release(page);
131+ put_page(page);
132132 return err;
133133 }
134134
@@ -146,7 +146,7 @@ void nilfs_btnode_delete(struct buffer_head *bh) · 11 unmodified lines
146146 pgoff_t index = page_index(page);
147147 int still_dirty;
148148
149− page_cache_get(page);
149+ get_page(page);
150150 lock_page(page);
151151 wait_on_page_writeback(page);
152152
@@ -154,7 +154,7 @@ void nilfs_btnode_delete(struct buffer_head *bh) · 1 unmodified line
154154 still_dirty = PageDirty(page);
155155 mapping = page->mapping;
156156 unlock_page(page);
157− page_cache_release(page);
157+ put_page(page);
158158
159159 if (!still_dirty && mapping)
160160 invalidate_inode_pages2_range(mapping, index, index);
@@ -181,7 +181,7 @@ int nilfs_btnode_prepare_change_key(struct address_space *btnc, · 20 unmodified lines
181181 obh = ctxt->bh;
182182 ctxt->newbh = NULL;
183183
184− if (inode->i_blkbits == PAGE_CACHE_SHIFT) {
184+ if (inode->i_blkbits == PAGE_SHIFT) {
185185 lock_page(obh->b_page);
186186 /*
187187 * We cannot call radix_tree_preload for the kernels older
fs/nilfs2/dir.c+16−16
@@ -58,7 +58,7 @@ static inline unsigned nilfs_chunk_size(struct inode *inode) · 57 unmodified lines
5858 static inline void nilfs_put_page(struct page *page)
5959 {
6060 kunmap(page);
61− page_cache_release(page);
61+ put_page(page);
6262 }
6363
6464 /*
@@ -69,9 +69,9 @@ static unsigned nilfs_last_byte(struct inode *inode, unsigned long page_nr) · 4 unmodified lines
6969 {
7070 unsigned last_byte = inode->i_size;
7171
72− last_byte -= page_nr << PAGE_CACHE_SHIFT;
73− if (last_byte > PAGE_CACHE_SIZE)
74− last_byte = PAGE_CACHE_SIZE;
72+ last_byte -= page_nr << PAGE_SHIFT;
73+ if (last_byte > PAGE_SIZE)
74+ last_byte = PAGE_SIZE;
7575 return last_byte;
7676 }
7777
@@ -109,12 +109,12 @@ static void nilfs_check_page(struct page *page) · 31 unmodified lines
109109 unsigned chunk_size = nilfs_chunk_size(dir);
110110 char *kaddr = page_address(page);
111111 unsigned offs, rec_len;
112− unsigned limit = PAGE_CACHE_SIZE;
112+ unsigned limit = PAGE_SIZE;
113113 struct nilfs_dir_entry *p;
114114 char *error;
115115
116− if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) {
117− limit = dir->i_size & ~PAGE_CACHE_MASK;
116+ if ((dir->i_size >> PAGE_SHIFT) == page->index) {
117+ limit = dir->i_size & ~PAGE_MASK;
118118 if (limit & (chunk_size - 1))
119119 goto Ebadsize;
120120 if (!limit)
@@ -161,7 +161,7 @@ Espan: · 40 unmodified lines
161161 bad_entry:
162162 nilfs_error(sb, "nilfs_check_page", "bad entry in directory #%lu: %s - "
163163 "offset=%lu, inode=%lu, rec_len=%d, name_len=%d",
164− dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
164+ dir->i_ino, error, (page->index<<PAGE_SHIFT)+offs,
165165 (unsigned long) le64_to_cpu(p->inode),
166166 rec_len, p->name_len);
167167 goto fail;
@@ -170,7 +170,7 @@ Eend: · 2 unmodified lines
170170 nilfs_error(sb, "nilfs_check_page",
171171 "entry in directory #%lu spans the page boundary"
172172 "offset=%lu, inode=%lu",
173− dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs,
173+ dir->i_ino, (page->index<<PAGE_SHIFT)+offs,
174174 (unsigned long) le64_to_cpu(p->inode));
175175 fail:
176176 SetPageChecked(page);
@@ -256,8 +256,8 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx) · 79 unmodified lines
256256 loff_t pos = ctx->pos;
257257 struct inode *inode = file_inode(file);
258258 struct super_block *sb = inode->i_sb;
259− unsigned int offset = pos & ~PAGE_CACHE_MASK;
260− unsigned long n = pos >> PAGE_CACHE_SHIFT;
259+ unsigned int offset = pos & ~PAGE_MASK;
260+ unsigned long n = pos >> PAGE_SHIFT;
261261 unsigned long npages = dir_pages(inode);
262262 /* unsigned chunk_mask = ~(nilfs_chunk_size(inode)-1); */
263263
@@ -272,7 +272,7 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx) · 8 unmodified lines
272272 if (IS_ERR(page)) {
273273 nilfs_error(sb, __func__, "bad page in #%lu",
274274 inode->i_ino);
275− ctx->pos += PAGE_CACHE_SIZE - offset;
275+ ctx->pos += PAGE_SIZE - offset;
276276 return -EIO;
277277 }
278278 kaddr = page_address(page);
@@ -361,7 +361,7 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr, · 82 unmodified lines
361361 if (++n >= npages)
362362 n = 0;
363363 /* next page is past the blocks we've got */
364− if (unlikely(n > (dir->i_blocks >> (PAGE_CACHE_SHIFT - 9)))) {
364+ if (unlikely(n > (dir->i_blocks >> (PAGE_SHIFT - 9)))) {
365365 nilfs_error(dir->i_sb, __func__,
366366 "dir %lu size %lld exceeds block count %llu",
367367 dir->i_ino, dir->i_size,
@@ -401,7 +401,7 @@ ino_t nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr) · 33 unmodified lines
401401 if (de) {
402402 res = le64_to_cpu(de->inode);
403403 kunmap(page);
404− page_cache_release(page);
404+ put_page(page);
405405 }
406406 return res;
407407 }
@@ -460,7 +460,7 @@ int nilfs_add_link(struct dentry *dentry, struct inode *inode) · 52 unmodified lines
460460 kaddr = page_address(page);
461461 dir_end = kaddr + nilfs_last_byte(dir, n);
462462 de = (struct nilfs_dir_entry *)kaddr;
463− kaddr += PAGE_CACHE_SIZE - reclen;
463+ kaddr += PAGE_SIZE - reclen;
464464 while ((char *)de <= kaddr) {
465465 if ((char *)de == dir_end) {
466466 /* We hit i_size */
@@ -603,7 +603,7 @@ int nilfs_make_empty(struct inode *inode, struct inode *parent) · 136 unmodified lines
603603 kunmap_atomic(kaddr);
604604 nilfs_commit_chunk(page, mapping, 0, chunk_size);
605605 fail:
606− page_cache_release(page);
606+ put_page(page);
607607 return err;
608608 }
609609
fs/nilfs2/gcinode.c+1−1
@@ -115,7 +115,7 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, · 114 unmodified lines
115115
116116 failed:
117117 unlock_page(bh->b_page);
118− page_cache_release(bh->b_page);
118+ put_page(bh->b_page);
119119 return err;
120120 }
121121
fs/nilfs2/inode.c+2−2
@@ -249,7 +249,7 @@ static int nilfs_set_page_dirty(struct page *page) · 248 unmodified lines
249249 if (nr_dirty)
250250 nilfs_set_file_dirty(inode, nr_dirty);
251251 } else if (ret) {
252− unsigned nr_dirty = 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits);
252+ unsigned nr_dirty = 1 << (PAGE_SHIFT - inode->i_blkbits);
253253
254254 nilfs_set_file_dirty(inode, nr_dirty);
255255 }
@@ -291,7 +291,7 @@ static int nilfs_write_end(struct file *file, struct address_space *mapping, · 35 unmodified lines
291291 struct page *page, void *fsdata)
292292 {
293293 struct inode *inode = mapping->host;
294− unsigned start = pos & (PAGE_CACHE_SIZE - 1);
294+ unsigned start = pos & (PAGE_SIZE - 1);
295295 unsigned nr_dirty;
296296 int err;
297297
fs/nilfs2/mdt.c+7−7
@@ -110,7 +110,7 @@ static int nilfs_mdt_create_block(struct inode *inode, unsigned long block, · 109 unmodified lines
110110
111111 failed_bh:
112112 unlock_page(bh->b_page);
113− page_cache_release(bh->b_page);
113+ put_page(bh->b_page);
114114 brelse(bh);
115115
116116 failed_unlock:
@@ -170,7 +170,7 @@ nilfs_mdt_submit_block(struct inode *inode, unsigned long blkoff, · 53 unmodified lines
170170
171171 failed_bh:
172172 unlock_page(bh->b_page);
173− page_cache_release(bh->b_page);
173+ put_page(bh->b_page);
174174 brelse(bh);
175175 failed:
176176 return ret;
@@ -363,7 +363,7 @@ int nilfs_mdt_delete_block(struct inode *inode, unsigned long block) · 186 unmodified lines
363363 int nilfs_mdt_forget_block(struct inode *inode, unsigned long block)
364364 {
365365 pgoff_t index = (pgoff_t)block >>
366− (PAGE_CACHE_SHIFT - inode->i_blkbits);
366+ (PAGE_SHIFT - inode->i_blkbits);
367367 struct page *page;
368368 unsigned long first_block;
369369 int ret = 0;
@@ -376,7 +376,7 @@ int nilfs_mdt_forget_block(struct inode *inode, unsigned long block) · 6 unmodified lines
376376 wait_on_page_writeback(page);
377377
378378 first_block = (unsigned long)index <<
379− (PAGE_CACHE_SHIFT - inode->i_blkbits);
379+ (PAGE_SHIFT - inode->i_blkbits);
380380 if (page_has_buffers(page)) {
381381 struct buffer_head *bh;
382382
@@ -385,7 +385,7 @@ int nilfs_mdt_forget_block(struct inode *inode, unsigned long block) · 2 unmodified lines
385385 }
386386 still_dirty = PageDirty(page);
387387 unlock_page(page);
388− page_cache_release(page);
388+ put_page(page);
389389
390390 if (still_dirty ||
391391 invalidate_inode_pages2_range(inode->i_mapping, index, index) != 0)
@@ -578,7 +578,7 @@ int nilfs_mdt_freeze_buffer(struct inode *inode, struct buffer_head *bh) · 186 unmodified lines
578578 }
579579
580580 unlock_page(page);
581− page_cache_release(page);
581+ put_page(page);
582582 return 0;
583583 }
584584
@@ -597,7 +597,7 @@ nilfs_mdt_get_frozen_buffer(struct inode *inode, struct buffer_head *bh) · 12 unmodified lines
597597 bh_frozen = nilfs_page_get_nth_block(page, n);
598598 }
599599 unlock_page(page);
600− page_cache_release(page);
600+ put_page(page);
601601 }
602602 return bh_frozen;
603603 }
fs/nilfs2/namei.c+2−2
@@ -431,11 +431,11 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, · 430 unmodified lines
431431 out_dir:
432432 if (dir_de) {
433433 kunmap(dir_page);
434− page_cache_release(dir_page);
434+ put_page(dir_page);
435435 }
436436 out_old:
437437 kunmap(old_page);
438− page_cache_release(old_page);
438+ put_page(old_page);
439439 out:
440440 nilfs_transaction_abort(old_dir->i_sb);
441441 return err;
fs/nilfs2/page.c+9−9
@@ -50,7 +50,7 @@ __nilfs_get_page_block(struct page *page, unsigned long block, pgoff_t index, · 49 unmodified lines
5050 if (!page_has_buffers(page))
5151 create_empty_buffers(page, 1 << blkbits, b_state);
5252
53− first_block = (unsigned long)index << (PAGE_CACHE_SHIFT - blkbits);
53+ first_block = (unsigned long)index << (PAGE_SHIFT - blkbits);
5454 bh = nilfs_page_get_nth_block(page, block - first_block);
5555
5656 touch_buffer(bh);
@@ -64,7 +64,7 @@ struct buffer_head *nilfs_grab_buffer(struct inode *inode, · 7 unmodified lines
6464 unsigned long b_state)
6565 {
6666 int blkbits = inode->i_blkbits;
67− pgoff_t index = blkoff >> (PAGE_CACHE_SHIFT - blkbits);
67+ pgoff_t index = blkoff >> (PAGE_SHIFT - blkbits);
6868 struct page *page;
6969 struct buffer_head *bh;
7070
@@ -75,7 +75,7 @@ struct buffer_head *nilfs_grab_buffer(struct inode *inode, · 4 unmodified lines
7575 bh = __nilfs_get_page_block(page, blkoff, index, blkbits, b_state);
7676 if (unlikely(!bh)) {
7777 unlock_page(page);
78− page_cache_release(page);
78+ put_page(page);
7979 return NULL;
8080 }
8181 return bh;
@@ -288,7 +288,7 @@ repeat: · 206 unmodified lines
288288 __set_page_dirty_nobuffers(dpage);
289289
290290 unlock_page(dpage);
291− page_cache_release(dpage);
291+ put_page(dpage);
292292 unlock_page(page);
293293 }
294294 pagevec_release(&pvec);
@@ -333,7 +333,7 @@ repeat: · 38 unmodified lines
333333 WARN_ON(PageDirty(dpage));
334334 nilfs_copy_page(dpage, page, 0);
335335 unlock_page(dpage);
336− page_cache_release(dpage);
336+ put_page(dpage);
337337 } else {
338338 struct page *page2;
339339
@@ -350,7 +350,7 @@ repeat: · 10 unmodified lines
350350 if (unlikely(err < 0)) {
351351 WARN_ON(err == -EEXIST);
352352 page->mapping = NULL;
353− page_cache_release(page); /* for cache */
353+ put_page(page); /* for cache */
354354 } else {
355355 page->mapping = dmap;
356356 dmap->nrpages++;
@@ -523,8 +523,8 @@ unsigned long nilfs_find_uncommitted_extent(struct inode *inode, · 166 unmodified lines
523523 if (inode->i_mapping->nrpages == 0)
524524 return 0;
525525
526− index = start_blk >> (PAGE_CACHE_SHIFT - inode->i_blkbits);
527− nblocks_in_page = 1U << (PAGE_CACHE_SHIFT - inode->i_blkbits);
526+ index = start_blk >> (PAGE_SHIFT - inode->i_blkbits);
527+ nblocks_in_page = 1U << (PAGE_SHIFT - inode->i_blkbits);
528528
529529 pagevec_init(&pvec, 0);
530530
@@ -537,7 +537,7 @@ repeat: · 6 unmodified lines
537537 if (length > 0 && pvec.pages[0]->index > index)
538538 goto out;
539539
540− b = pvec.pages[0]->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
540+ b = pvec.pages[0]->index << (PAGE_SHIFT - inode->i_blkbits);
541541 i = 0;
542542 do {
543543 page = pvec.pages[i];
fs/nilfs2/recovery.c+2−2
@@ -544,14 +544,14 @@ static int nilfs_recover_dsync_blocks(struct the_nilfs *nilfs, · 543 unmodified lines
544544 blocksize, page, NULL);
545545
546546 unlock_page(page);
547− page_cache_release(page);
547+ put_page(page);
548548
549549 (*nr_salvaged_blocks)++;
550550 goto next;
551551
552552 failed_page:
553553 unlock_page(page);
554− page_cache_release(page);
554+ put_page(page);
555555
556556 failed_inode:
557557 printk(KERN_WARNING
fs/nilfs2/segment.c+1−1
@@ -2070,7 +2070,7 @@ static int nilfs_segctor_do_construct(struct nilfs_sc_info *sci, int mode) · 2069 unmodified lines
20702070 goto failed_to_write;
20712071
20722072 if (nilfs_sc_cstage_get(sci) == NILFS_ST_DONE ||
2073− nilfs->ns_blocksize_bits != PAGE_CACHE_SHIFT) {
2073+ nilfs->ns_blocksize_bits != PAGE_SHIFT) {
20742074 /*
20752075 * At this point, we avoid double buffering
20762076 * for blocksize < pagesize because page dirty
fs/ntfs/aops.c+24−24
@@ -74,7 +74,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) · 73 unmodified lines
7474
7575 set_buffer_uptodate(bh);
7676
77− file_ofs = ((s64)page->index << PAGE_CACHE_SHIFT) +
77+ file_ofs = ((s64)page->index << PAGE_SHIFT) +
7878 bh_offset(bh);
7979 read_lock_irqsave(&ni->size_lock, flags);
8080 init_size = ni->initialized_size;
@@ -142,7 +142,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) · 61 unmodified lines
142142 u32 rec_size;
143143
144144 rec_size = ni->itype.index.block_size;
145− recs = PAGE_CACHE_SIZE / rec_size;
145+ recs = PAGE_SIZE / rec_size;
146146 /* Should have been verified before we got here... */
147147 BUG_ON(!recs);
148148 local_irq_save(flags);
@@ -229,7 +229,7 @@ static int ntfs_read_block(struct page *page) · 80 unmodified lines
229229 * fully truncated, truncate will throw it away as soon as we unlock
230230 * it so no need to worry what we do with it.
231231 */
232− iblock = (s64)page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
232+ iblock = (s64)page->index << (PAGE_SHIFT - blocksize_bits);
233233 read_lock_irqsave(&ni->size_lock, flags);
234234 lblock = (ni->allocated_size + blocksize - 1) >> blocksize_bits;
235235 init_size = ni->initialized_size;
@@ -412,9 +412,9 @@ retry_readpage: · 176 unmodified lines
412412 vi = page->mapping->host;
413413 i_size = i_size_read(vi);
414414 /* Is the page fully outside i_size? (truncate in progress) */
415− if (unlikely(page->index >= (i_size + PAGE_CACHE_SIZE - 1) >>
416− PAGE_CACHE_SHIFT)) {
417− zero_user(page, 0, PAGE_CACHE_SIZE);
415+ if (unlikely(page->index >= (i_size + PAGE_SIZE - 1) >>
416+ PAGE_SHIFT)) {
417+ zero_user(page, 0, PAGE_SIZE);
418418 ntfs_debug("Read outside i_size - truncated?");
419419 goto done;
420420 }
@@ -463,7 +463,7 @@ retry_readpage: · 42 unmodified lines
463463 * ok to ignore the compressed flag here.
464464 */
465465 if (unlikely(page->index > 0)) {
466− zero_user(page, 0, PAGE_CACHE_SIZE);
466+ zero_user(page, 0, PAGE_SIZE);
467467 goto done;
468468 }
469469 if (!NInoAttr(ni))
@@ -509,7 +509,7 @@ retry_readpage: · 39 unmodified lines
509509 le16_to_cpu(ctx->attr->data.resident.value_offset),
510510 attr_len);
511511 /* Zero the remainder of the page. */
512− memset(addr + attr_len, 0, PAGE_CACHE_SIZE - attr_len);
512+ memset(addr + attr_len, 0, PAGE_SIZE - attr_len);
513513 flush_dcache_page(page);
514514 kunmap_atomic(addr);
515515 put_unm_err_out:
@@ -599,7 +599,7 @@ static int ntfs_write_block(struct page *page, struct writeback_control *wbc) · 83 unmodified lines
599599 /* NOTE: Different naming scheme to ntfs_read_block()! */
600600
601601 /* The first block in the page. */
602− block = (s64)page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
602+ block = (s64)page->index << (PAGE_SHIFT - blocksize_bits);
603603
604604 read_lock_irqsave(&ni->size_lock, flags);
605605 i_size = i_size_read(vi);
@@ -925,7 +925,7 @@ static int ntfs_write_mst_block(struct page *page, · 319 unmodified lines
925925 ntfs_volume *vol = ni->vol;
926926 u8 *kaddr;
927927 unsigned int rec_size = ni->itype.index.block_size;
928− ntfs_inode *locked_nis[PAGE_CACHE_SIZE / rec_size];
928+ ntfs_inode *locked_nis[PAGE_SIZE / rec_size];
929929 struct buffer_head *bh, *head, *tbh, *rec_start_bh;
930930 struct buffer_head *bhs[MAX_BUF_PER_PAGE];
931931 runlist_element *rl;
@@ -949,7 +949,7 @@ static int ntfs_write_mst_block(struct page *page, · 17 unmodified lines
949949 (NInoAttr(ni) && ni->type == AT_INDEX_ALLOCATION)));
950950 bh_size = vol->sb->s_blocksize;
951951 bh_size_bits = vol->sb->s_blocksize_bits;
952− max_bhs = PAGE_CACHE_SIZE / bh_size;
952+ max_bhs = PAGE_SIZE / bh_size;
953953 BUG_ON(!max_bhs);
954954 BUG_ON(max_bhs > MAX_BUF_PER_PAGE);
955955
@@ -961,13 +961,13 @@ static int ntfs_write_mst_block(struct page *page, · 5 unmodified lines
961961 BUG_ON(!bh);
962962
963963 rec_size_bits = ni->itype.index.block_size_bits;
964− BUG_ON(!(PAGE_CACHE_SIZE >> rec_size_bits));
964+ BUG_ON(!(PAGE_SIZE >> rec_size_bits));
965965 bhs_per_rec = rec_size >> bh_size_bits;
966966 BUG_ON(!bhs_per_rec);
967967
968968 /* The first block in the page. */
969969 rec_block = block = (sector_t)page->index <<
970− (PAGE_CACHE_SHIFT - bh_size_bits);
970+ (PAGE_SHIFT - bh_size_bits);
971971
972972 /* The first out of bounds block for the data size. */
973973 dblock = (i_size_read(vi) + bh_size - 1) >> bh_size_bits;
@@ -1133,7 +1133,7 @@ lock_retry_remap: · 159 unmodified lines
11331133 unsigned long mft_no;
11341134
11351135 /* Get the mft record number. */
1136− mft_no = (((s64)page->index << PAGE_CACHE_SHIFT) + ofs)
1136+ mft_no = (((s64)page->index << PAGE_SHIFT) + ofs)
11371137 >> rec_size_bits;
11381138 /* Check whether to write this mft record. */
11391139 tni = NULL;
@@ -1249,7 +1249,7 @@ do_mirror: · 109 unmodified lines
12491249 continue;
12501250 ofs = bh_offset(tbh);
12511251 /* Get the mft record number. */
1252− mft_no = (((s64)page->index << PAGE_CACHE_SHIFT) + ofs)
1252+ mft_no = (((s64)page->index << PAGE_SHIFT) + ofs)
12531253 >> rec_size_bits;
12541254 if (mft_no < vol->mftmirr_size)
12551255 ntfs_sync_mft_mirror(vol, mft_no,
@@ -1300,7 +1300,7 @@ done: · 44 unmodified lines
13001300 * Set page error if there is only one ntfs record in the page.
13011301 * Otherwise we would loose per-record granularity.
13021302 */
1303− if (ni->itype.index.block_size == PAGE_CACHE_SIZE)
1303+ if (ni->itype.index.block_size == PAGE_SIZE)
13041304 SetPageError(page);
13051305 NVolSetErrors(vol);
13061306 }
@@ -1308,7 +1308,7 @@ done: · 1 unmodified line
13081308 ntfs_debug("Page still contains one or more dirty ntfs "
13091309 "records. Redirtying the page starting at "
13101310 "record 0x%lx.", page->index <<
1311− (PAGE_CACHE_SHIFT - rec_size_bits));
1311+ (PAGE_SHIFT - rec_size_bits));
13121312 redirty_page_for_writepage(wbc, page);
13131313 unlock_page(page);
13141314 } else {
@@ -1365,13 +1365,13 @@ retry_writepage: · 50 unmodified lines
13651365 BUG_ON(!PageLocked(page));
13661366 i_size = i_size_read(vi);
13671367 /* Is the page fully outside i_size? (truncate in progress) */
1368− if (unlikely(page->index >= (i_size + PAGE_CACHE_SIZE - 1) >>
1369− PAGE_CACHE_SHIFT)) {
1368+ if (unlikely(page->index >= (i_size + PAGE_SIZE - 1) >>
1369+ PAGE_SHIFT)) {
13701370 /*
13711371 * The page may have dirty, unmapped buffers. Make them
13721372 * freeable here, so the page does not leak.
13731373 */
1374− block_invalidatepage(page, 0, PAGE_CACHE_SIZE);
1374+ block_invalidatepage(page, 0, PAGE_SIZE);
13751375 unlock_page(page);
13761376 ntfs_debug("Write outside i_size - truncated?");
13771377 return 0;
@@ -1414,10 +1414,10 @@ retry_writepage: · 36 unmodified lines
14141414 /* NInoNonResident() == NInoIndexAllocPresent() */
14151415 if (NInoNonResident(ni)) {
14161416 /* We have to zero every time due to mmap-at-end-of-file. */
1417− if (page->index >= (i_size >> PAGE_CACHE_SHIFT)) {
1417+ if (page->index >= (i_size >> PAGE_SHIFT)) {
14181418 /* The page straddles i_size. */
1419− unsigned int ofs = i_size & ~PAGE_CACHE_MASK;
1420− zero_user_segment(page, ofs, PAGE_CACHE_SIZE);
1419+ unsigned int ofs = i_size & ~PAGE_MASK;
1420+ zero_user_segment(page, ofs, PAGE_SIZE);
14211421 }
14221422 /* Handle mst protected attributes. */
14231423 if (NInoMstProtected(ni))
@@ -1500,7 +1500,7 @@ retry_writepage: · 76 unmodified lines
15001500 le16_to_cpu(ctx->attr->data.resident.value_offset),
15011501 addr, attr_len);
15021502 /* Zero out of bounds area in the page cache page. */
1503− memset(addr + attr_len, 0, PAGE_CACHE_SIZE - attr_len);
1503+ memset(addr + attr_len, 0, PAGE_SIZE - attr_len);
15041504 kunmap_atomic(addr);
15051505 flush_dcache_page(page);
15061506 flush_dcache_mft_record_page(ctx->ntfs_ino);
fs/ntfs/aops.h+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 static inline void ntfs_unmap_page(struct page *page)
4141 {
4242 kunmap(page);
43− page_cache_release(page);
43+ put_page(page);
4444 }
4545
4646 /**
fs/ntfs/attrib.c+14−14
@@ -152,7 +152,7 @@ int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx) · 151 unmodified lines
152152 if (old_ctx.base_ntfs_ino && old_ctx.ntfs_ino !=
153153 old_ctx.base_ntfs_ino) {
154154 put_this_page = old_ctx.ntfs_ino->page;
155− page_cache_get(put_this_page);
155+ get_page(put_this_page);
156156 }
157157 /*
158158 * Reinitialize the search context so we can lookup the
@@ -275,7 +275,7 @@ retry_map: · 116 unmodified lines
275275 * the pieces anyway.
276276 */
277277 if (put_this_page)
278− page_cache_release(put_this_page);
278+ put_page(put_this_page);
279279 }
280280 return err;
281281 }
@@ -1660,7 +1660,7 @@ int ntfs_attr_make_non_resident(ntfs_inode *ni, const u32 data_size) · 1378 unmodified lines
16601660 memcpy(kaddr, (u8*)a +
16611661 le16_to_cpu(a->data.resident.value_offset),
16621662 attr_size);
1663− memset(kaddr + attr_size, 0, PAGE_CACHE_SIZE - attr_size);
1663+ memset(kaddr + attr_size, 0, PAGE_SIZE - attr_size);
16641664 kunmap_atomic(kaddr);
16651665 flush_dcache_page(page);
16661666 SetPageUptodate(page);
@@ -1748,7 +1748,7 @@ int ntfs_attr_make_non_resident(ntfs_inode *ni, const u32 data_size) · 81 unmodified lines
17481748 if (page) {
17491749 set_page_dirty(page);
17501750 unlock_page(page);
1751− page_cache_release(page);
1751+ put_page(page);
17521752 }
17531753 ntfs_debug("Done.");
17541754 return 0;
@@ -1835,7 +1835,7 @@ rl_err_out: · 80 unmodified lines
18351835 ntfs_free(rl);
18361836 page_err_out:
18371837 unlock_page(page);
1838− page_cache_release(page);
1838+ put_page(page);
18391839 }
18401840 if (err == -EINVAL)
18411841 err = -EIO;
@@ -2513,17 +2513,17 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) · 671 unmodified lines
25132513 BUG_ON(NInoEncrypted(ni));
25142514 mapping = VFS_I(ni)->i_mapping;
25152515 /* Work out the starting index and page offset. */
2516− idx = ofs >> PAGE_CACHE_SHIFT;
2517− start_ofs = ofs & ~PAGE_CACHE_MASK;
2516+ idx = ofs >> PAGE_SHIFT;
2517+ start_ofs = ofs & ~PAGE_MASK;
25182518 /* Work out the ending index and page offset. */
25192519 end = ofs + cnt;
2520− end_ofs = end & ~PAGE_CACHE_MASK;
2520+ end_ofs = end & ~PAGE_MASK;
25212521 /* If the end is outside the inode size return -ESPIPE. */
25222522 if (unlikely(end > i_size_read(VFS_I(ni)))) {
25232523 ntfs_error(vol->sb, "Request exceeds end of attribute.");
25242524 return -ESPIPE;
25252525 }
2526− end >>= PAGE_CACHE_SHIFT;
2526+ end >>= PAGE_SHIFT;
25272527 /* If there is a first partial page, need to do it the slow way. */
25282528 if (start_ofs) {
25292529 page = read_mapping_page(mapping, idx, NULL);
@@ -2536,7 +2536,7 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) · 6 unmodified lines
25362536 * If the last page is the same as the first page, need to
25372537 * limit the write to the end offset.
25382538 */
2539− size = PAGE_CACHE_SIZE;
2539+ size = PAGE_SIZE;
25402540 if (idx == end)
25412541 size = end_ofs;
25422542 kaddr = kmap_atomic(page);
@@ -2544,7 +2544,7 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) · 1 unmodified line
25442544 flush_dcache_page(page);
25452545 kunmap_atomic(kaddr);
25462546 set_page_dirty(page);
2547− page_cache_release(page);
2547+ put_page(page);
25482548 balance_dirty_pages_ratelimited(mapping);
25492549 cond_resched();
25502550 if (idx == end)
@@ -2561,7 +2561,7 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) · 10 unmodified lines
25612561 return -ENOMEM;
25622562 }
25632563 kaddr = kmap_atomic(page);
2564− memset(kaddr, val, PAGE_CACHE_SIZE);
2564+ memset(kaddr, val, PAGE_SIZE);
25652565 flush_dcache_page(page);
25662566 kunmap_atomic(kaddr);
25672567 /*
@@ -2585,7 +2585,7 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) · 17 unmodified lines
25852585 set_page_dirty(page);
25862586 /* Finally unlock and release the page. */
25872587 unlock_page(page);
2588− page_cache_release(page);
2588+ put_page(page);
25892589 balance_dirty_pages_ratelimited(mapping);
25902590 cond_resched();
25912591 }
@@ -2602,7 +2602,7 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) · 10 unmodified lines
26022602 flush_dcache_page(page);
26032603 kunmap_atomic(kaddr);
26042604 set_page_dirty(page);
2605− page_cache_release(page);
2605+ put_page(page);
26062606 balance_dirty_pages_ratelimited(mapping);
26072607 cond_resched();
26082608 }
fs/ntfs/bitmap.c+5−5
@@ -67,8 +67,8 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, · 66 unmodified lines
6767 * Calculate the indices for the pages containing the first and last
6868 * bits, i.e. @start_bit and @start_bit + @cnt - 1, respectively.
6969 */
70− index = start_bit >> (3 + PAGE_CACHE_SHIFT);
71− end_index = (start_bit + cnt - 1) >> (3 + PAGE_CACHE_SHIFT);
70+ index = start_bit >> (3 + PAGE_SHIFT);
71+ end_index = (start_bit + cnt - 1) >> (3 + PAGE_SHIFT);
7272
7373 /* Get the page containing the first bit (@start_bit). */
7474 mapping = vi->i_mapping;
@@ -82,7 +82,7 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, · 7 unmodified lines
8282 kaddr = page_address(page);
8383
8484 /* Set @pos to the position of the byte containing @start_bit. */
85− pos = (start_bit >> 3) & ~PAGE_CACHE_MASK;
85+ pos = (start_bit >> 3) & ~PAGE_MASK;
8686
8787 /* Calculate the position of @start_bit in the first byte. */
8888 bit = start_bit & 7;
@@ -108,7 +108,7 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, · 19 unmodified lines
108108 * Depending on @value, modify all remaining whole bytes in the page up
109109 * to @cnt.
110110 */
111− len = min_t(s64, cnt >> 3, PAGE_CACHE_SIZE - pos);
111+ len = min_t(s64, cnt >> 3, PAGE_SIZE - pos);
112112 memset(kaddr + pos, value ? 0xff : 0, len);
113113 cnt -= len << 3;
114114
@@ -132,7 +132,7 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, · 17 unmodified lines
132132 * Depending on @value, modify all remaining whole bytes in the
133133 * page up to @cnt.
134134 */
135− len = min_t(s64, cnt >> 3, PAGE_CACHE_SIZE);
135+ len = min_t(s64, cnt >> 3, PAGE_SIZE);
136136 memset(kaddr, value ? 0xff : 0, len);
137137 cnt -= len << 3;
138138 }
fs/ntfs/compress.c+28−28
@@ -104,7 +104,7 @@ static void zero_partial_compressed_page(struct page *page, · 103 unmodified lines
104104 unsigned int kp_ofs;
105105
106106 ntfs_debug("Zeroing page region outside initialized size.");
107− if (((s64)page->index << PAGE_CACHE_SHIFT) >= initialized_size) {
107+ if (((s64)page->index << PAGE_SHIFT) >= initialized_size) {
108108 /*
109109 * FIXME: Using clear_page() will become wrong when we get
110110 * PAGE_CACHE_SIZE != PAGE_SIZE but for now there is no problem.
@@ -112,8 +112,8 @@ static void zero_partial_compressed_page(struct page *page, · 1 unmodified line
112112 clear_page(kp);
113113 return;
114114 }
115− kp_ofs = initialized_size & ~PAGE_CACHE_MASK;
116− memset(kp + kp_ofs, 0, PAGE_CACHE_SIZE - kp_ofs);
115+ kp_ofs = initialized_size & ~PAGE_MASK;
116+ memset(kp + kp_ofs, 0, PAGE_SIZE - kp_ofs);
117117 return;
118118 }
119119
@@ -123,7 +123,7 @@ static void zero_partial_compressed_page(struct page *page, · 3 unmodified lines
123123 static inline void handle_bounds_compressed_page(struct page *page,
124124 const loff_t i_size, const s64 initialized_size)
125125 {
126− if ((page->index >= (initialized_size >> PAGE_CACHE_SHIFT)) &&
126+ if ((page->index >= (initialized_size >> PAGE_SHIFT)) &&
127127 (initialized_size < i_size))
128128 zero_partial_compressed_page(page, initialized_size);
129129 return;
@@ -241,7 +241,7 @@ return_error: · 111 unmodified lines
241241 if (di == xpage)
242242 *xpage_done = 1;
243243 else
244− page_cache_release(dp);
244+ put_page(dp);
245245 dest_pages[di] = NULL;
246246 }
247247 }
@@ -274,7 +274,7 @@ return_error: · 26 unmodified lines
274274 cb = cb_sb_end;
275275
276276 /* Advance destination position to next sub-block. */
277− *dest_ofs = (*dest_ofs + NTFS_SB_SIZE) & ~PAGE_CACHE_MASK;
277+ *dest_ofs = (*dest_ofs + NTFS_SB_SIZE) & ~PAGE_MASK;
278278 if (!*dest_ofs && (++*dest_index > dest_max_index))
279279 goto return_overflow;
280280 goto do_next_sb;
@@ -301,7 +301,7 @@ return_error: · 20 unmodified lines
301301
302302 /* Advance destination position to next sub-block. */
303303 *dest_ofs += NTFS_SB_SIZE;
304− if (!(*dest_ofs &= ~PAGE_CACHE_MASK)) {
304+ if (!(*dest_ofs &= ~PAGE_MASK)) {
305305 finalize_page:
306306 /*
307307 * First stage: add current page index to array of
@@ -335,7 +335,7 @@ do_next_tag: · 27 unmodified lines
335335 *dest_ofs += nr_bytes;
336336 }
337337 /* We have finished the current sub-block. */
338− if (!(*dest_ofs &= ~PAGE_CACHE_MASK))
338+ if (!(*dest_ofs &= ~PAGE_MASK))
339339 goto finalize_page;
340340 goto do_next_sb;
341341 }
@@ -498,13 +498,13 @@ int ntfs_read_compressed_block(struct page *page) · 156 unmodified lines
498498 VCN vcn;
499499 LCN lcn;
500500 /* The first wanted vcn (minimum alignment is PAGE_CACHE_SIZE). */
501− VCN start_vcn = (((s64)index << PAGE_CACHE_SHIFT) & ~cb_size_mask) >>
501+ VCN start_vcn = (((s64)index << PAGE_SHIFT) & ~cb_size_mask) >>
502502 vol->cluster_size_bits;
503503 /*
504504 * The first vcn after the last wanted vcn (minimum alignment is again
505505 * PAGE_CACHE_SIZE.
506506 */
507− VCN end_vcn = ((((s64)(index + 1UL) << PAGE_CACHE_SHIFT) + cb_size - 1)
507+ VCN end_vcn = ((((s64)(index + 1UL) << PAGE_SHIFT) + cb_size - 1)
508508 & ~cb_size_mask) >> vol->cluster_size_bits;
509509 /* Number of compression blocks (cbs) in the wanted vcn range. */
510510 unsigned int nr_cbs = (end_vcn - start_vcn) << vol->cluster_size_bits
@@ -515,7 +515,7 @@ int ntfs_read_compressed_block(struct page *page) · 4 unmodified lines
515515 * guarantees of start_vcn and end_vcn, no need to round up here.
516516 */
517517 unsigned int nr_pages = (end_vcn - start_vcn) <<
518− vol->cluster_size_bits >> PAGE_CACHE_SHIFT;
518+ vol->cluster_size_bits >> PAGE_SHIFT;
519519 unsigned int xpage, max_page, cur_page, cur_ofs, i;
520520 unsigned int cb_clusters, cb_max_ofs;
521521 int block, max_block, cb_max_page, bhs_size, nr_bhs, err = 0;
@@ -549,7 +549,7 @@ int ntfs_read_compressed_block(struct page *page) · 27 unmodified lines
549549 * We have already been given one page, this is the one we must do.
550550 * Once again, the alignment guarantees keep it simple.
551551 */
552− offset = start_vcn << vol->cluster_size_bits >> PAGE_CACHE_SHIFT;
552+ offset = start_vcn << vol->cluster_size_bits >> PAGE_SHIFT;
553553 xpage = index - offset;
554554 pages[xpage] = page;
555555 /*
@@ -560,13 +560,13 @@ int ntfs_read_compressed_block(struct page *page) · 4 unmodified lines
560560 i_size = i_size_read(VFS_I(ni));
561561 initialized_size = ni->initialized_size;
562562 read_unlock_irqrestore(&ni->size_lock, flags);
563− max_page = ((i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) -
563+ max_page = ((i_size + PAGE_SIZE - 1) >> PAGE_SHIFT) -
564564 offset;
565565 /* Is the page fully outside i_size? (truncate in progress) */
566566 if (xpage >= max_page) {
567567 kfree(bhs);
568568 kfree(pages);
569− zero_user(page, 0, PAGE_CACHE_SIZE);
569+ zero_user(page, 0, PAGE_SIZE);
570570 ntfs_debug("Compressed read outside i_size - truncated?");
571571 SetPageUptodate(page);
572572 unlock_page(page);
@@ -591,7 +591,7 @@ int ntfs_read_compressed_block(struct page *page) · 18 unmodified lines
591591 continue;
592592 }
593593 unlock_page(page);
594− page_cache_release(page);
594+ put_page(page);
595595 pages[i] = NULL;
596596 }
597597 }
@@ -735,9 +735,9 @@ lock_retry_remap: · 137 unmodified lines
735735 ntfs_debug("Successfully read the compression block.");
736736
737737 /* The last page and maximum offset within it for the current cb. */
738− cb_max_page = (cur_page << PAGE_CACHE_SHIFT) + cur_ofs + cb_size;
739− cb_max_ofs = cb_max_page & ~PAGE_CACHE_MASK;
740− cb_max_page >>= PAGE_CACHE_SHIFT;
738+ cb_max_page = (cur_page << PAGE_SHIFT) + cur_ofs + cb_size;
739+ cb_max_ofs = cb_max_page & ~PAGE_MASK;
740+ cb_max_page >>= PAGE_SHIFT;
741741
742742 /* Catch end of file inside a compression block. */
743743 if (cb_max_page > max_page)
@@ -762,7 +762,7 @@ lock_retry_remap: · 18 unmodified lines
762762 clear_page(page_address(page));
763763 else
764764 memset(page_address(page) + cur_ofs, 0,
765− PAGE_CACHE_SIZE -
765+ PAGE_SIZE -
766766 cur_ofs);
767767 flush_dcache_page(page);
768768 kunmap(page);
@@ -771,10 +771,10 @@ lock_retry_remap: · 2 unmodified lines
771771 if (cur_page == xpage)
772772 xpage_done = 1;
773773 else
774− page_cache_release(page);
774+ put_page(page);
775775 pages[cur_page] = NULL;
776776 }
777− cb_pos += PAGE_CACHE_SIZE - cur_ofs;
777+ cb_pos += PAGE_SIZE - cur_ofs;
778778 cur_ofs = 0;
779779 if (cb_pos >= cb_end)
780780 break;
@@ -816,8 +816,8 @@ lock_retry_remap: · 35 unmodified lines
816816 page = pages[cur_page];
817817 if (page)
818818 memcpy(page_address(page) + cur_ofs, cb_pos,
819− PAGE_CACHE_SIZE - cur_ofs);
820− cb_pos += PAGE_CACHE_SIZE - cur_ofs;
819+ PAGE_SIZE - cur_ofs);
820+ cb_pos += PAGE_SIZE - cur_ofs;
821821 cur_ofs = 0;
822822 if (cb_pos >= cb_end)
823823 break;
@@ -850,10 +850,10 @@ lock_retry_remap: · 26 unmodified lines
850850 if (cur2_page == xpage)
851851 xpage_done = 1;
852852 else
853− page_cache_release(page);
853+ put_page(page);
854854 pages[cur2_page] = NULL;
855855 }
856− cb_pos2 += PAGE_CACHE_SIZE - cur_ofs2;
856+ cb_pos2 += PAGE_SIZE - cur_ofs2;
857857 cur_ofs2 = 0;
858858 if (cb_pos2 >= cb_end)
859859 break;
@@ -884,7 +884,7 @@ lock_retry_remap: · 24 unmodified lines
884884 kunmap(page);
885885 unlock_page(page);
886886 if (prev_cur_page != xpage)
887− page_cache_release(page);
887+ put_page(page);
888888 pages[prev_cur_page] = NULL;
889889 }
890890 }
@@ -914,7 +914,7 @@ lock_retry_remap: · 23 unmodified lines
914914 kunmap(page);
915915 unlock_page(page);
916916 if (cur_page != xpage)
917− page_cache_release(page);
917+ put_page(page);
918918 pages[cur_page] = NULL;
919919 }
920920 }
@@ -961,7 +961,7 @@ err_out: · 40 unmodified lines
961961 kunmap(page);
962962 unlock_page(page);
963963 if (i != xpage)
964− page_cache_release(page);
964+ put_page(page);
965965 }
966966 }
967967 kfree(pages);
fs/ntfs/dir.c+20−20
@@ -319,7 +319,7 @@ descend_into_child_node: · 318 unmodified lines
319319 * disk if necessary.
320320 */
321321 page = ntfs_map_page(ia_mapping, vcn <<
322− dir_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT);
322+ dir_ni->itype.index.vcn_size_bits >> PAGE_SHIFT);
323323 if (IS_ERR(page)) {
324324 ntfs_error(sb, "Failed to map directory index page, error %ld.",
325325 -PTR_ERR(page));
@@ -331,9 +331,9 @@ descend_into_child_node: · 5 unmodified lines
331331 fast_descend_into_child_node:
332332 /* Get to the index allocation block. */
333333 ia = (INDEX_ALLOCATION*)(kaddr + ((vcn <<
334− dir_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK));
334+ dir_ni->itype.index.vcn_size_bits) & ~PAGE_MASK));
335335 /* Bounds checks. */
336− if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE) {
336+ if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_SIZE) {
337337 ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
338338 "inode 0x%lx or driver bug.", dir_ni->mft_no);
339339 goto unm_err_out;
@@ -366,7 +366,7 @@ fast_descend_into_child_node: · 26 unmodified lines
366366 goto unm_err_out;
367367 }
368368 index_end = (u8*)ia + dir_ni->itype.index.block_size;
369− if (index_end > kaddr + PAGE_CACHE_SIZE) {
369+ if (index_end > kaddr + PAGE_SIZE) {
370370 ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
371371 "0x%lx crosses page boundary. Impossible! "
372372 "Cannot access! This is probably a bug in the "
@@ -559,9 +559,9 @@ found_it2: · 186 unmodified lines
559559 /* If vcn is in the same page cache page as old_vcn we
560560 * recycle the mapped page. */
561561 if (old_vcn << vol->cluster_size_bits >>
562− PAGE_CACHE_SHIFT == vcn <<
562+ PAGE_SHIFT == vcn <<
563563 vol->cluster_size_bits >>
564− PAGE_CACHE_SHIFT)
564+ PAGE_SHIFT)
565565 goto fast_descend_into_child_node;
566566 unlock_page(page);
567567 ntfs_unmap_page(page);
@@ -1246,15 +1246,15 @@ skip_index_root: · 678 unmodified lines
12461246 goto iput_err_out;
12471247 }
12481248 /* Get the starting bit position in the current bitmap page. */
1249− cur_bmp_pos = bmp_pos & ((PAGE_CACHE_SIZE * 8) - 1);
1250− bmp_pos &= ~(u64)((PAGE_CACHE_SIZE * 8) - 1);
1249+ cur_bmp_pos = bmp_pos & ((PAGE_SIZE * 8) - 1);
1250+ bmp_pos &= ~(u64)((PAGE_SIZE * 8) - 1);
12511251 get_next_bmp_page:
12521252 ntfs_debug("Reading bitmap with page index 0x%llx, bit ofs 0x%llx",
1253− (unsigned long long)bmp_pos >> (3 + PAGE_CACHE_SHIFT),
1253+ (unsigned long long)bmp_pos >> (3 + PAGE_SHIFT),
12541254 (unsigned long long)bmp_pos &
1255− (unsigned long long)((PAGE_CACHE_SIZE * 8) - 1));
1255+ (unsigned long long)((PAGE_SIZE * 8) - 1));
12561256 bmp_page = ntfs_map_page(bmp_mapping,
1257− bmp_pos >> (3 + PAGE_CACHE_SHIFT));
1257+ bmp_pos >> (3 + PAGE_SHIFT));
12581258 if (IS_ERR(bmp_page)) {
12591259 ntfs_error(sb, "Reading index bitmap failed.");
12601260 err = PTR_ERR(bmp_page);
@@ -1270,9 +1270,9 @@ find_next_index_buffer: · 9 unmodified lines
12701270 * If we have reached the end of the bitmap page, get the next
12711271 * page, and put away the old one.
12721272 */
1273− if (unlikely((cur_bmp_pos >> 3) >= PAGE_CACHE_SIZE)) {
1273+ if (unlikely((cur_bmp_pos >> 3) >= PAGE_SIZE)) {
12741274 ntfs_unmap_page(bmp_page);
1275− bmp_pos += PAGE_CACHE_SIZE * 8;
1275+ bmp_pos += PAGE_SIZE * 8;
12761276 cur_bmp_pos = 0;
12771277 goto get_next_bmp_page;
12781278 }
@@ -1285,8 +1285,8 @@ find_next_index_buffer: · 6 unmodified lines
12851285 ntfs_debug("Handling index buffer 0x%llx.",
12861286 (unsigned long long)bmp_pos + cur_bmp_pos);
12871287 /* If the current index buffer is in the same page we reuse the page. */
1288− if ((prev_ia_pos & (s64)PAGE_CACHE_MASK) !=
1289− (ia_pos & (s64)PAGE_CACHE_MASK)) {
1288+ if ((prev_ia_pos & (s64)PAGE_MASK) !=
1289+ (ia_pos & (s64)PAGE_MASK)) {
12901290 prev_ia_pos = ia_pos;
12911291 if (likely(ia_page != NULL)) {
12921292 unlock_page(ia_page);
@@ -1296,7 +1296,7 @@ find_next_index_buffer: · 3 unmodified lines
12961296 * Map the page cache page containing the current ia_pos,
12971297 * reading it from disk if necessary.
12981298 */
1299− ia_page = ntfs_map_page(ia_mapping, ia_pos >> PAGE_CACHE_SHIFT);
1299+ ia_page = ntfs_map_page(ia_mapping, ia_pos >> PAGE_SHIFT);
13001300 if (IS_ERR(ia_page)) {
13011301 ntfs_error(sb, "Reading index allocation data failed.");
13021302 err = PTR_ERR(ia_page);
@@ -1307,10 +1307,10 @@ find_next_index_buffer: · 4 unmodified lines
13071307 kaddr = (u8*)page_address(ia_page);
13081308 }
13091309 /* Get the current index buffer. */
1310− ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_CACHE_MASK &
1311− ~(s64)(ndir->itype.index.block_size - 1)));
1310+ ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_MASK &
1311+ ~(s64)(ndir->itype.index.block_size - 1)));
13121312 /* Bounds checks. */
1313− if (unlikely((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE)) {
1313+ if (unlikely((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_SIZE)) {
13141314 ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
13151315 "inode 0x%lx or driver bug.", vdir->i_ino);
13161316 goto err_out;
@@ -1348,7 +1348,7 @@ find_next_index_buffer: · 31 unmodified lines
13481348 goto err_out;
13491349 }
13501350 index_end = (u8*)ia + ndir->itype.index.block_size;
1351− if (unlikely(index_end > kaddr + PAGE_CACHE_SIZE)) {
1351+ if (unlikely(index_end > kaddr + PAGE_SIZE)) {
13521352 ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
13531353 "0x%lx crosses page boundary. Impossible! "
13541354 "Cannot access! This is probably a bug in the "
fs/ntfs/file.c+27−27
@@ -220,8 +220,8 @@ do_non_resident_extend: · 219 unmodified lines
220220 m = NULL;
221221 }
222222 mapping = vi->i_mapping;
223− index = old_init_size >> PAGE_CACHE_SHIFT;
224− end_index = (new_init_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
223+ index = old_init_size >> PAGE_SHIFT;
224+ end_index = (new_init_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
225225 do {
226226 /*
227227 * Read the page. If the page is not present, this will zero
@@ -233,7 +233,7 @@ do_non_resident_extend: · 5 unmodified lines
233233 goto init_err_out;
234234 }
235235 if (unlikely(PageError(page))) {
236− page_cache_release(page);
236+ put_page(page);
237237 err = -EIO;
238238 goto init_err_out;
239239 }
@@ -242,13 +242,13 @@ do_non_resident_extend: · 2 unmodified lines
242242 * enough to make ntfs_writepage() work.
243243 */
244244 write_lock_irqsave(&ni->size_lock, flags);
245− ni->initialized_size = (s64)(index + 1) << PAGE_CACHE_SHIFT;
245+ ni->initialized_size = (s64)(index + 1) << PAGE_SHIFT;
246246 if (ni->initialized_size > new_init_size)
247247 ni->initialized_size = new_init_size;
248248 write_unlock_irqrestore(&ni->size_lock, flags);
249249 /* Set the page dirty so it gets written out. */
250250 set_page_dirty(page);
251− page_cache_release(page);
251+ put_page(page);
252252 /*
253253 * Play nice with the vm and the rest of the system. This is
254254 * very much needed as we can potentially be modifying the
@@ -543,7 +543,7 @@ out: · 288 unmodified lines
543543 err_out:
544544 while (nr > 0) {
545545 unlock_page(pages[--nr]);
546− page_cache_release(pages[nr]);
546+ put_page(pages[nr]);
547547 }
548548 goto out;
549549 }
@@ -653,7 +653,7 @@ static int ntfs_prepare_pages_for_non_resident_write(struct page **pages, · 103 unmodified lines
653653 u = 0;
654654 do_next_page:
655655 page = pages[u];
656− bh_pos = (s64)page->index << PAGE_CACHE_SHIFT;
656+ bh_pos = (s64)page->index << PAGE_SHIFT;
657657 bh = head = page_buffers(page);
658658 do {
659659 VCN cdelta;
@@ -810,11 +810,11 @@ map_buffer_cached: · 150 unmodified lines
810810
811811 kaddr = kmap_atomic(page);
812812 if (bh_pos < pos) {
813− pofs = bh_pos & ~PAGE_CACHE_MASK;
813+ pofs = bh_pos & ~PAGE_MASK;
814814 memset(kaddr + pofs, 0, pos - bh_pos);
815815 }
816816 if (bh_end > end) {
817− pofs = end & ~PAGE_CACHE_MASK;
817+ pofs = end & ~PAGE_MASK;
818818 memset(kaddr + pofs, 0, bh_end - end);
819819 }
820820 kunmap_atomic(kaddr);
@@ -942,7 +942,7 @@ rl_not_mapped_enoent: · 121 unmodified lines
942942 * unmapped. This can only happen when the cluster size is
943943 * less than the page cache size.
944944 */
945− if (unlikely(vol->cluster_size < PAGE_CACHE_SIZE)) {
945+ if (unlikely(vol->cluster_size < PAGE_SIZE)) {
946946 bh_cend = (bh_end + vol->cluster_size - 1) >>
947947 vol->cluster_size_bits;
948948 if ((bh_cend <= cpos || bh_cpos >= cend)) {
@@ -1208,7 +1208,7 @@ rl_not_mapped_enoent: · 259 unmodified lines
12081208 wait_on_buffer(bh);
12091209 if (likely(buffer_uptodate(bh))) {
12101210 page = bh->b_page;
1211− bh_pos = ((s64)page->index << PAGE_CACHE_SHIFT) +
1211+ bh_pos = ((s64)page->index << PAGE_SHIFT) +
12121212 bh_offset(bh);
12131213 /*
12141214 * If the buffer overflows the initialized size, need
@@ -1350,7 +1350,7 @@ rl_not_mapped_enoent: · 135 unmodified lines
13501350 bh = head = page_buffers(page);
13511351 do {
13521352 if (u == nr_pages &&
1353− ((s64)page->index << PAGE_CACHE_SHIFT) +
1353+ ((s64)page->index << PAGE_SHIFT) +
13541354 bh_offset(bh) >= end)
13551355 break;
13561356 if (!buffer_new(bh))
@@ -1422,7 +1422,7 @@ static inline int ntfs_commit_pages_after_non_resident_write( · 65 unmodified lines
14221422 bool partial;
14231423
14241424 page = pages[u];
1425− bh_pos = (s64)page->index << PAGE_CACHE_SHIFT;
1425+ bh_pos = (s64)page->index << PAGE_SHIFT;
14261426 bh = head = page_buffers(page);
14271427 partial = false;
14281428 do {
@@ -1639,7 +1639,7 @@ static int ntfs_commit_pages_after_write(struct page **pages, · 210 unmodified lines
16391639 if (end < attr_len)
16401640 memcpy(kaddr + end, kattr + end, attr_len - end);
16411641 /* Zero the region outside the end of the attribute value. */
1642− memset(kaddr + attr_len, 0, PAGE_CACHE_SIZE - attr_len);
1642+ memset(kaddr + attr_len, 0, PAGE_SIZE - attr_len);
16431643 flush_dcache_page(page);
16441644 SetPageUptodate(page);
16451645 }
@@ -1706,7 +1706,7 @@ static size_t ntfs_copy_from_user_iter(struct page **pages, unsigned nr_pages, · 60 unmodified lines
17061706 unsigned len, copied;
17071707
17081708 do {
1709− len = PAGE_CACHE_SIZE - ofs;
1709+ len = PAGE_SIZE - ofs;
17101710 if (len > bytes)
17111711 len = bytes;
17121712 copied = iov_iter_copy_from_user_atomic(*pages, &data, ofs,
@@ -1724,14 +1724,14 @@ out: · 11 unmodified lines
17241724 return total;
17251725 err:
17261726 /* Zero the rest of the target like __copy_from_user(). */
1727− len = PAGE_CACHE_SIZE - copied;
1727+ len = PAGE_SIZE - copied;
17281728 do {
17291729 if (len > bytes)
17301730 len = bytes;
17311731 zero_user(*pages, copied, len);
17321732 bytes -= len;
17331733 copied = 0;
1734− len = PAGE_CACHE_SIZE;
1734+ len = PAGE_SIZE;
17351735 } while (++pages < last_page);
17361736 goto out;
17371737 }
@@ -1787,8 +1787,8 @@ static ssize_t ntfs_perform_write(struct file *file, struct iov_iter *i, · 49 unmodified lines
17871787 * attributes.
17881788 */
17891789 nr_pages = 1;
1790− if (vol->cluster_size > PAGE_CACHE_SIZE && NInoNonResident(ni))
1791− nr_pages = vol->cluster_size >> PAGE_CACHE_SHIFT;
1790+ if (vol->cluster_size > PAGE_SIZE && NInoNonResident(ni))
1791+ nr_pages = vol->cluster_size >> PAGE_SHIFT;
17921792 last_vcn = -1;
17931793 do {
17941794 VCN vcn;
@@ -1796,9 +1796,9 @@ static ssize_t ntfs_perform_write(struct file *file, struct iov_iter *i, · 1 unmodified line
17961796 unsigned ofs, do_pages, u;
17971797 size_t copied;
17981798
1799− start_idx = idx = pos >> PAGE_CACHE_SHIFT;
1800− ofs = pos & ~PAGE_CACHE_MASK;
1801− bytes = PAGE_CACHE_SIZE - ofs;
1799+ start_idx = idx = pos >> PAGE_SHIFT;
1800+ ofs = pos & ~PAGE_MASK;
1801+ bytes = PAGE_SIZE - ofs;
18021802 do_pages = 1;
18031803 if (nr_pages > 1) {
18041804 vcn = pos >> vol->cluster_size_bits;
@@ -1832,7 +1832,7 @@ static ssize_t ntfs_perform_write(struct file *file, struct iov_iter *i, · 27 unmodified lines
18321832 if (lcn == LCN_HOLE) {
18331833 start_idx = (pos & ~(s64)
18341834 vol->cluster_size_mask)
1835− >> PAGE_CACHE_SHIFT;
1835+ >> PAGE_SHIFT;
18361836 bytes = vol->cluster_size - (pos &
18371837 vol->cluster_size_mask);
18381838 do_pages = nr_pages;
@@ -1871,12 +1871,12 @@ again: · 32 unmodified lines
18711871 if (unlikely(status)) {
18721872 do {
18731873 unlock_page(pages[--do_pages]);
1874− page_cache_release(pages[do_pages]);
1874+ put_page(pages[do_pages]);
18751875 } while (do_pages);
18761876 break;
18771877 }
18781878 }
1879− u = (pos >> PAGE_CACHE_SHIFT) - pages[0]->index;
1879+ u = (pos >> PAGE_SHIFT) - pages[0]->index;
18801880 copied = ntfs_copy_from_user_iter(pages + u, do_pages - u, ofs,
18811881 i, bytes);
18821882 ntfs_flush_dcache_pages(pages + u, do_pages - u);
@@ -1889,7 +1889,7 @@ again: · 6 unmodified lines
18891889 }
18901890 do {
18911891 unlock_page(pages[--do_pages]);
1892− page_cache_release(pages[do_pages]);
1892+ put_page(pages[do_pages]);
18931893 } while (do_pages);
18941894 if (unlikely(status < 0))
18951895 break;
@@ -1921,7 +1921,7 @@ again: · 25 unmodified lines
19211921 }
19221922 } while (iov_iter_count(i));
19231923 if (cached_page)
1924− page_cache_release(cached_page);
1924+ put_page(cached_page);
19251925 ntfs_debug("Done. Returning %s (written 0x%lx, status %li).",
19261926 written ? "written" : "status", (unsigned long)written,
19271927 (long)status);
fs/ntfs/index.c+6−6
@@ -276,7 +276,7 @@ descend_into_child_node: · 275 unmodified lines
276276 * disk if necessary.
277277 */
278278 page = ntfs_map_page(ia_mapping, vcn <<
279− idx_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT);
279+ idx_ni->itype.index.vcn_size_bits >> PAGE_SHIFT);
280280 if (IS_ERR(page)) {
281281 ntfs_error(sb, "Failed to map index page, error %ld.",
282282 -PTR_ERR(page));
@@ -288,9 +288,9 @@ descend_into_child_node: · 5 unmodified lines
288288 fast_descend_into_child_node:
289289 /* Get to the index allocation block. */
290290 ia = (INDEX_ALLOCATION*)(kaddr + ((vcn <<
291− idx_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK));
291+ idx_ni->itype.index.vcn_size_bits) & ~PAGE_MASK));
292292 /* Bounds checks. */
293− if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE) {
293+ if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_SIZE) {
294294 ntfs_error(sb, "Out of bounds check failed. Corrupt inode "
295295 "0x%lx or driver bug.", idx_ni->mft_no);
296296 goto unm_err_out;
@@ -323,7 +323,7 @@ fast_descend_into_child_node: · 26 unmodified lines
323323 goto unm_err_out;
324324 }
325325 index_end = (u8*)ia + idx_ni->itype.index.block_size;
326− if (index_end > kaddr + PAGE_CACHE_SIZE) {
326+ if (index_end > kaddr + PAGE_SIZE) {
327327 ntfs_error(sb, "Index buffer (VCN 0x%llx) of inode 0x%lx "
328328 "crosses page boundary. Impossible! Cannot "
329329 "access! This is probably a bug in the "
@@ -427,9 +427,9 @@ ia_done: · 97 unmodified lines
427427 * the mapped page.
428428 */
429429 if (old_vcn << vol->cluster_size_bits >>
430− PAGE_CACHE_SHIFT == vcn <<
430+ PAGE_SHIFT == vcn <<
431431 vol->cluster_size_bits >>
432− PAGE_CACHE_SHIFT)
432+ PAGE_SHIFT)
433433 goto fast_descend_into_child_node;
434434 unlock_page(page);
435435 ntfs_unmap_page(page);
fs/ntfs/inode.c+4−4
@@ -868,12 +868,12 @@ skip_attr_list_load: · 867 unmodified lines
868868 ni->itype.index.block_size);
869869 goto unm_err_out;
870870 }
871− if (ni->itype.index.block_size > PAGE_CACHE_SIZE) {
871+ if (ni->itype.index.block_size > PAGE_SIZE) {
872872 ntfs_error(vi->i_sb, "Index block size (%u) > "
873873 "PAGE_CACHE_SIZE (%ld) is not "
874874 "supported. Sorry.",
875875 ni->itype.index.block_size,
876− PAGE_CACHE_SIZE);
876+ PAGE_SIZE);
877877 err = -EOPNOTSUPP;
878878 goto unm_err_out;
879879 }
@@ -1585,10 +1585,10 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) · 705 unmodified lines
15851585 "two.", ni->itype.index.block_size);
15861586 goto unm_err_out;
15871587 }
1588− if (ni->itype.index.block_size > PAGE_CACHE_SIZE) {
1588+ if (ni->itype.index.block_size > PAGE_SIZE) {
15891589 ntfs_error(vi->i_sb, "Index block size (%u) > PAGE_CACHE_SIZE "
15901590 "(%ld) is not supported. Sorry.",
1591− ni->itype.index.block_size, PAGE_CACHE_SIZE);
1591+ ni->itype.index.block_size, PAGE_SIZE);
15921592 err = -EOPNOTSUPP;
15931593 goto unm_err_out;
15941594 }
fs/ntfs/lcnalloc.c+3−3
@@ -283,15 +283,15 @@ runlist_element *ntfs_cluster_alloc(ntfs_volume *vol, const VCN start_vcn, · 282 unmodified lines
283283 ntfs_unmap_page(page);
284284 }
285285 page = ntfs_map_page(mapping, last_read_pos >>
286− PAGE_CACHE_SHIFT);
286+ PAGE_SHIFT);
287287 if (IS_ERR(page)) {
288288 err = PTR_ERR(page);
289289 ntfs_error(vol->sb, "Failed to map page.");
290290 goto out;
291291 }
292− buf_size = last_read_pos & ~PAGE_CACHE_MASK;
292+ buf_size = last_read_pos & ~PAGE_MASK;
293293 buf = page_address(page) + buf_size;
294− buf_size = PAGE_CACHE_SIZE - buf_size;
294+ buf_size = PAGE_SIZE - buf_size;
295295 if (unlikely(last_read_pos + buf_size > i_size))
296296 buf_size = i_size - last_read_pos;
297297 buf_size <<= 3;
fs/ntfs/logfile.c+8−8
@@ -381,7 +381,7 @@ static int ntfs_check_and_load_restart_page(struct inode *vi, · 380 unmodified lines
381381 * completely inside @rp, just copy it from there. Otherwise map all
382382 * the required pages and copy the data from them.
383383 */
384− size = PAGE_CACHE_SIZE - (pos & ~PAGE_CACHE_MASK);
384+ size = PAGE_SIZE - (pos & ~PAGE_MASK);
385385 if (size >= le32_to_cpu(rp->system_page_size)) {
386386 memcpy(trp, rp, le32_to_cpu(rp->system_page_size));
387387 } else {
@@ -394,8 +394,8 @@ static int ntfs_check_and_load_restart_page(struct inode *vi, · 6 unmodified lines
394394 /* Copy the remaining data one page at a time. */
395395 have_read = size;
396396 to_read = le32_to_cpu(rp->system_page_size) - size;
397− idx = (pos + size) >> PAGE_CACHE_SHIFT;
398− BUG_ON((pos + size) & ~PAGE_CACHE_MASK);
397+ idx = (pos + size) >> PAGE_SHIFT;
398+ BUG_ON((pos + size) & ~PAGE_MASK);
399399 do {
400400 page = ntfs_map_page(vi->i_mapping, idx);
401401 if (IS_ERR(page)) {
@@ -406,7 +406,7 @@ static int ntfs_check_and_load_restart_page(struct inode *vi, · 4 unmodified lines
406406 err = -EIO;
407407 goto err_out;
408408 }
409− size = min_t(int, to_read, PAGE_CACHE_SIZE);
409+ size = min_t(int, to_read, PAGE_SIZE);
410410 memcpy((u8*)trp + have_read, page_address(page), size);
411411 ntfs_unmap_page(page);
412412 have_read += size;
@@ -509,11 +509,11 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp) · 96 unmodified lines
509509 * log page size if the page cache size is between the default log page
510510 * size and twice that.
511511 */
512− if (PAGE_CACHE_SIZE >= DefaultLogPageSize && PAGE_CACHE_SIZE <=
512+ if (PAGE_SIZE >= DefaultLogPageSize && PAGE_SIZE <=
513513 DefaultLogPageSize * 2)
514514 log_page_size = DefaultLogPageSize;
515515 else
516− log_page_size = PAGE_CACHE_SIZE;
516+ log_page_size = PAGE_SIZE;
517517 log_page_mask = log_page_size - 1;
518518 /*
519519 * Use ntfs_ffs() instead of ffs() to enable the compiler to
@@ -539,7 +539,7 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp) · 19 unmodified lines
539539 * to be empty.
540540 */
541541 for (pos = 0; pos < size; pos <<= 1) {
542− pgoff_t idx = pos >> PAGE_CACHE_SHIFT;
542+ pgoff_t idx = pos >> PAGE_SHIFT;
543543 if (!page || page->index != idx) {
544544 if (page)
545545 ntfs_unmap_page(page);
@@ -550,7 +550,7 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp) · 4 unmodified lines
550550 goto err_out;
551551 }
552552 }
553− kaddr = (u8*)page_address(page) + (pos & ~PAGE_CACHE_MASK);
553+ kaddr = (u8*)page_address(page) + (pos & ~PAGE_MASK);
554554 /*
555555 * A non-empty block means the logfile is not empty while an
556556 * empty block after a non-empty block has been encountered
fs/ntfs/mft.c+17−17
@@ -61,16 +61,16 @@ static inline MFT_RECORD *map_mft_record_page(ntfs_inode *ni) · 60 unmodified lines
6161 * here if the volume was that big...
6262 */
6363 index = (u64)ni->mft_no << vol->mft_record_size_bits >>
64− PAGE_CACHE_SHIFT;
65− ofs = (ni->mft_no << vol->mft_record_size_bits) & ~PAGE_CACHE_MASK;
64+ PAGE_SHIFT;
65+ ofs = (ni->mft_no << vol->mft_record_size_bits) & ~PAGE_MASK;
6666
6767 i_size = i_size_read(mft_vi);
6868 /* The maximum valid index into the page cache for $MFT's data. */
69− end_index = i_size >> PAGE_CACHE_SHIFT;
69+ end_index = i_size >> PAGE_SHIFT;
7070
7171 /* If the wanted index is out of bounds the mft record doesn't exist. */
7272 if (unlikely(index >= end_index)) {
73− if (index > end_index || (i_size & ~PAGE_CACHE_MASK) < ofs +
73+ if (index > end_index || (i_size & ~PAGE_MASK) < ofs +
7474 vol->mft_record_size) {
7575 page = ERR_PTR(-ENOENT);
7676 ntfs_error(vol->sb, "Attempt to read mft record 0x%lx, "
@@ -487,7 +487,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no, · 410 unmodified lines
487487 }
488488 /* Get the page containing the mirror copy of the mft record @m. */
489489 page = ntfs_map_page(vol->mftmirr_ino->i_mapping, mft_no >>
490− (PAGE_CACHE_SHIFT - vol->mft_record_size_bits));
490+ (PAGE_SHIFT - vol->mft_record_size_bits));
491491 if (IS_ERR(page)) {
492492 ntfs_error(vol->sb, "Failed to map mft mirror page.");
493493 err = PTR_ERR(page);
@@ -497,7 +497,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no, · 3 unmodified lines
497497 BUG_ON(!PageUptodate(page));
498498 ClearPageUptodate(page);
499499 /* Offset of the mft mirror record inside the page. */
500− page_ofs = (mft_no << vol->mft_record_size_bits) & ~PAGE_CACHE_MASK;
500+ page_ofs = (mft_no << vol->mft_record_size_bits) & ~PAGE_MASK;
501501 /* The address in the page of the mirror copy of the mft record @m. */
502502 kmirr = page_address(page) + page_ofs;
503503 /* Copy the mst protected mft record to the mirror. */
@@ -1178,8 +1178,8 @@ static int ntfs_mft_bitmap_find_and_alloc_free_rec_nolock(ntfs_volume *vol, · 674 unmodified lines
11781178 for (; pass <= 2;) {
11791179 /* Cap size to pass_end. */
11801180 ofs = data_pos >> 3;
1181− page_ofs = ofs & ~PAGE_CACHE_MASK;
1182− size = PAGE_CACHE_SIZE - page_ofs;
1181+ page_ofs = ofs & ~PAGE_MASK;
1182+ size = PAGE_SIZE - page_ofs;
11831183 ll = ((pass_end + 7) >> 3) - ofs;
11841184 if (size > ll)
11851185 size = ll;
@@ -1190,7 +1190,7 @@ static int ntfs_mft_bitmap_find_and_alloc_free_rec_nolock(ntfs_volume *vol, · 4 unmodified lines
11901190 */
11911191 if (size) {
11921192 page = ntfs_map_page(mftbmp_mapping,
1193− ofs >> PAGE_CACHE_SHIFT);
1193+ ofs >> PAGE_SHIFT);
11941194 if (IS_ERR(page)) {
11951195 ntfs_error(vol->sb, "Failed to read mft "
11961196 "bitmap, aborting.");
@@ -1328,13 +1328,13 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol) · 131 unmodified lines
13281328 */
13291329 ll = lcn >> 3;
13301330 page = ntfs_map_page(vol->lcnbmp_ino->i_mapping,
1331− ll >> PAGE_CACHE_SHIFT);
1331+ ll >> PAGE_SHIFT);
13321332 if (IS_ERR(page)) {
13331333 up_write(&mftbmp_ni->runlist.lock);
13341334 ntfs_error(vol->sb, "Failed to read from lcn bitmap.");
13351335 return PTR_ERR(page);
13361336 }
1337− b = (u8*)page_address(page) + (ll & ~PAGE_CACHE_MASK);
1337+ b = (u8*)page_address(page) + (ll & ~PAGE_MASK);
13381338 tb = 1 << (lcn & 7ull);
13391339 down_write(&vol->lcnbmp_lock);
13401340 if (*b != 0xff && !(*b & tb)) {
@@ -2103,14 +2103,14 @@ static int ntfs_mft_record_format(const ntfs_volume *vol, const s64 mft_no) · 762 unmodified lines
21032103 * The index into the page cache and the offset within the page cache
21042104 * page of the wanted mft record.
21052105 */
2106− index = mft_no << vol->mft_record_size_bits >> PAGE_CACHE_SHIFT;
2107− ofs = (mft_no << vol->mft_record_size_bits) & ~PAGE_CACHE_MASK;
2106+ index = mft_no << vol->mft_record_size_bits >> PAGE_SHIFT;
2107+ ofs = (mft_no << vol->mft_record_size_bits) & ~PAGE_MASK;
21082108 /* The maximum valid index into the page cache for $MFT's data. */
21092109 i_size = i_size_read(mft_vi);
2110− end_index = i_size >> PAGE_CACHE_SHIFT;
2110+ end_index = i_size >> PAGE_SHIFT;
21112111 if (unlikely(index >= end_index)) {
21122112 if (unlikely(index > end_index || ofs + vol->mft_record_size >=
2113− (i_size & ~PAGE_CACHE_MASK))) {
2113+ (i_size & ~PAGE_MASK))) {
21142114 ntfs_error(vol->sb, "Tried to format non-existing mft "
21152115 "record 0x%llx.", (long long)mft_no);
21162116 return -ENOENT;
@@ -2515,8 +2515,8 @@ mft_rec_already_initialized: · 398 unmodified lines
25152515 * We now have allocated and initialized the mft record. Calculate the
25162516 * index of and the offset within the page cache page the record is in.
25172517 */
2518− index = bit << vol->mft_record_size_bits >> PAGE_CACHE_SHIFT;
2519− ofs = (bit << vol->mft_record_size_bits) & ~PAGE_CACHE_MASK;
2518+ index = bit << vol->mft_record_size_bits >> PAGE_SHIFT;
2519+ ofs = (bit << vol->mft_record_size_bits) & ~PAGE_MASK;
25202520 /* Read, map, and pin the page containing the mft record. */
25212521 page = ntfs_map_page(vol->mft_ino->i_mapping, index);
25222522 if (IS_ERR(page)) {
fs/ntfs/ntfs.h+1−1
@@ -43,7 +43,7 @@ typedef enum { · 42 unmodified lines
4343 NTFS_MAX_NAME_LEN = 255,
4444 NTFS_MAX_ATTR_NAME_LEN = 255,
4545 NTFS_MAX_CLUSTER_SIZE = 64 * 1024, /* 64kiB */
46− NTFS_MAX_PAGES_PER_CLUSTER = NTFS_MAX_CLUSTER_SIZE / PAGE_CACHE_SIZE,
46+ NTFS_MAX_PAGES_PER_CLUSTER = NTFS_MAX_CLUSTER_SIZE / PAGE_SIZE,
4747 } NTFS_CONSTANTS;
4848
4949 /* Global variables. */
fs/ntfs/super.c+29−29
@@ -826,11 +826,11 @@ static bool parse_ntfs_boot_sector(ntfs_volume *vol, const NTFS_BOOT_SECTOR *b) · 825 unmodified lines
826826 * We cannot support mft record sizes above the PAGE_CACHE_SIZE since
827827 * we store $MFT/$DATA, the table of mft records in the page cache.
828828 */
829− if (vol->mft_record_size > PAGE_CACHE_SIZE) {
829+ if (vol->mft_record_size > PAGE_SIZE) {
830830 ntfs_error(vol->sb, "Mft record size (%i) exceeds the "
831831 "PAGE_CACHE_SIZE on your system (%lu). "
832832 "This is not supported. Sorry.",
833− vol->mft_record_size, PAGE_CACHE_SIZE);
833+ vol->mft_record_size, PAGE_SIZE);
834834 return false;
835835 }
836836 /* We cannot support mft record sizes below the sector size. */
@@ -1096,7 +1096,7 @@ static bool check_mft_mirror(ntfs_volume *vol) · 259 unmodified lines
10961096
10971097 ntfs_debug("Entering.");
10981098 /* Compare contents of $MFT and $MFTMirr. */
1099− mrecs_per_page = PAGE_CACHE_SIZE / vol->mft_record_size;
1099+ mrecs_per_page = PAGE_SIZE / vol->mft_record_size;
11001100 BUG_ON(!mrecs_per_page);
11011101 BUG_ON(!vol->mftmirr_size);
11021102 mft_page = mirr_page = NULL;
@@ -1615,20 +1615,20 @@ static bool load_and_init_attrdef(ntfs_volume *vol) · 512 unmodified lines
16151615 if (!vol->attrdef)
16161616 goto iput_failed;
16171617 index = 0;
1618− max_index = i_size >> PAGE_CACHE_SHIFT;
1619− size = PAGE_CACHE_SIZE;
1618+ max_index = i_size >> PAGE_SHIFT;
1619+ size = PAGE_SIZE;
16201620 while (index < max_index) {
16211621 /* Read the attrdef table and copy it into the linear buffer. */
16221622 read_partial_attrdef_page:
16231623 page = ntfs_map_page(ino->i_mapping, index);
16241624 if (IS_ERR(page))
16251625 goto free_iput_failed;
1626− memcpy((u8*)vol->attrdef + (index++ << PAGE_CACHE_SHIFT),
1626+ memcpy((u8*)vol->attrdef + (index++ << PAGE_SHIFT),
16271627 page_address(page), size);
16281628 ntfs_unmap_page(page);
16291629 };
1630− if (size == PAGE_CACHE_SIZE) {
1631− size = i_size & ~PAGE_CACHE_MASK;
1630+ if (size == PAGE_SIZE) {
1631+ size = i_size & ~PAGE_MASK;
16321632 if (size)
16331633 goto read_partial_attrdef_page;
16341634 }
@@ -1684,20 +1684,20 @@ static bool load_and_init_upcase(ntfs_volume *vol) · 49 unmodified lines
16841684 if (!vol->upcase)
16851685 goto iput_upcase_failed;
16861686 index = 0;
1687− max_index = i_size >> PAGE_CACHE_SHIFT;
1688− size = PAGE_CACHE_SIZE;
1687+ max_index = i_size >> PAGE_SHIFT;
1688+ size = PAGE_SIZE;
16891689 while (index < max_index) {
16901690 /* Read the upcase table and copy it into the linear buffer. */
16911691 read_partial_upcase_page:
16921692 page = ntfs_map_page(ino->i_mapping, index);
16931693 if (IS_ERR(page))
16941694 goto iput_upcase_failed;
1695− memcpy((char*)vol->upcase + (index++ << PAGE_CACHE_SHIFT),
1695+ memcpy((char*)vol->upcase + (index++ << PAGE_SHIFT),
16961696 page_address(page), size);
16971697 ntfs_unmap_page(page);
16981698 };
1699− if (size == PAGE_CACHE_SIZE) {
1700− size = i_size & ~PAGE_CACHE_MASK;
1699+ if (size == PAGE_SIZE) {
1700+ size = i_size & ~PAGE_MASK;
17011701 if (size)
17021702 goto read_partial_upcase_page;
17031703 }
@@ -2474,11 +2474,11 @@ static s64 get_nr_free_clusters(ntfs_volume *vol) · 770 unmodified lines
24742474 * multiples of PAGE_CACHE_SIZE, rounding up so that if we have one
24752475 * full and one partial page max_index = 2.
24762476 */
2477− max_index = (((vol->nr_clusters + 7) >> 3) + PAGE_CACHE_SIZE - 1) >>
2478− PAGE_CACHE_SHIFT;
2477+ max_index = (((vol->nr_clusters + 7) >> 3) + PAGE_SIZE - 1) >>
2478+ PAGE_SHIFT;
24792479 /* Use multiples of 4 bytes, thus max_size is PAGE_CACHE_SIZE / 4. */
24802480 ntfs_debug("Reading $Bitmap, max_index = 0x%lx, max_size = 0x%lx.",
2481− max_index, PAGE_CACHE_SIZE / 4);
2481+ max_index, PAGE_SIZE / 4);
24822482 for (index = 0; index < max_index; index++) {
24832483 unsigned long *kaddr;
24842484
@@ -2491,7 +2491,7 @@ static s64 get_nr_free_clusters(ntfs_volume *vol) · 6 unmodified lines
24912491 if (IS_ERR(page)) {
24922492 ntfs_debug("read_mapping_page() error. Skipping "
24932493 "page (index 0x%lx).", index);
2494− nr_free -= PAGE_CACHE_SIZE * 8;
2494+ nr_free -= PAGE_SIZE * 8;
24952495 continue;
24962496 }
24972497 kaddr = kmap_atomic(page);
@@ -2503,9 +2503,9 @@ static s64 get_nr_free_clusters(ntfs_volume *vol) · 5 unmodified lines
25032503 * ntfs_readpage().
25042504 */
25052505 nr_free -= bitmap_weight(kaddr,
2506− PAGE_CACHE_SIZE * BITS_PER_BYTE);
2506+ PAGE_SIZE * BITS_PER_BYTE);
25072507 kunmap_atomic(kaddr);
2508− page_cache_release(page);
2508+ put_page(page);
25092509 }
25102510 ntfs_debug("Finished reading $Bitmap, last index = 0x%lx.", index - 1);
25112511 /*
@@ -2549,7 +2549,7 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, · 37 unmodified lines
25492549 ntfs_debug("Entering.");
25502550 /* Use multiples of 4 bytes, thus max_size is PAGE_CACHE_SIZE / 4. */
25512551 ntfs_debug("Reading $MFT/$BITMAP, max_index = 0x%lx, max_size = "
2552− "0x%lx.", max_index, PAGE_CACHE_SIZE / 4);
2552+ "0x%lx.", max_index, PAGE_SIZE / 4);
25532553 for (index = 0; index < max_index; index++) {
25542554 unsigned long *kaddr;
25552555
@@ -2562,7 +2562,7 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, · 6 unmodified lines
25622562 if (IS_ERR(page)) {
25632563 ntfs_debug("read_mapping_page() error. Skipping "
25642564 "page (index 0x%lx).", index);
2565− nr_free -= PAGE_CACHE_SIZE * 8;
2565+ nr_free -= PAGE_SIZE * 8;
25662566 continue;
25672567 }
25682568 kaddr = kmap_atomic(page);
@@ -2574,9 +2574,9 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, · 5 unmodified lines
25742574 * ntfs_readpage().
25752575 */
25762576 nr_free -= bitmap_weight(kaddr,
2577− PAGE_CACHE_SIZE * BITS_PER_BYTE);
2577+ PAGE_SIZE * BITS_PER_BYTE);
25782578 kunmap_atomic(kaddr);
2579− page_cache_release(page);
2579+ put_page(page);
25802580 }
25812581 ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.",
25822582 index - 1);
@@ -2618,17 +2618,17 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) · 35 unmodified lines
26182618 /* Type of filesystem. */
26192619 sfs->f_type = NTFS_SB_MAGIC;
26202620 /* Optimal transfer block size. */
2621− sfs->f_bsize = PAGE_CACHE_SIZE;
2621+ sfs->f_bsize = PAGE_SIZE;
26222622 /*
26232623 * Total data blocks in filesystem in units of f_bsize and since
26242624 * inodes are also stored in data blocs ($MFT is a file) this is just
26252625 * the total clusters.
26262626 */
26272627 sfs->f_blocks = vol->nr_clusters << vol->cluster_size_bits >>
2628− PAGE_CACHE_SHIFT;
2628+ PAGE_SHIFT;
26292629 /* Free data blocks in filesystem in units of f_bsize. */
26302630 size = get_nr_free_clusters(vol) << vol->cluster_size_bits >>
2631− PAGE_CACHE_SHIFT;
2631+ PAGE_SHIFT;
26322632 if (size < 0LL)
26332633 size = 0LL;
26342634 /* Free blocks avail to non-superuser, same as above on NTFS. */
@@ -2643,7 +2643,7 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) · 8 unmodified lines
26432643 * have one full and one partial page max_index = 2.
26442644 */
26452645 max_index = ((((mft_ni->initialized_size >> vol->mft_record_size_bits)
2646− + 7) >> 3) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
2646+ + 7) >> 3) + PAGE_SIZE - 1) >> PAGE_SHIFT;
26472647 read_unlock_irqrestore(&mft_ni->size_lock, flags);
26482648 /* Number of inodes in filesystem (at this point in time). */
26492649 sfs->f_files = size;
@@ -2766,14 +2766,14 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) · 116 unmodified lines
27662766 goto err_out_now;
27672767
27682768 /* We support sector sizes up to the PAGE_CACHE_SIZE. */
2769− if (bdev_logical_block_size(sb->s_bdev) > PAGE_CACHE_SIZE) {
2769+ if (bdev_logical_block_size(sb->s_bdev) > PAGE_SIZE) {
27702770 if (!silent)
27712771 ntfs_error(sb, "Device has unsupported sector size "
27722772 "(%i). The maximum supported sector "
27732773 "size on this architecture is %lu "
27742774 "bytes.",
27752775 bdev_logical_block_size(sb->s_bdev),
2776− PAGE_CACHE_SIZE);
2776+ PAGE_SIZE);
27772777 goto err_out_now;
27782778 }
27792779 /*
fs/ocfs2/alloc.c+14−14
@@ -6671,7 +6671,7 @@ static void ocfs2_zero_cluster_pages(struct inode *inode, loff_t start, · 6670 unmodified lines
66716671 {
66726672 int i;
66736673 struct page *page;
6674− unsigned int from, to = PAGE_CACHE_SIZE;
6674+ unsigned int from, to = PAGE_SIZE;
66756675 struct super_block *sb = inode->i_sb;
66766676
66776677 BUG_ON(!ocfs2_sparse_alloc(OCFS2_SB(sb)));
@@ -6679,21 +6679,21 @@ static void ocfs2_zero_cluster_pages(struct inode *inode, loff_t start, · 1 unmodified line
66796679 if (numpages == 0)
66806680 goto out;
66816681
6682− to = PAGE_CACHE_SIZE;
6682+ to = PAGE_SIZE;
66836683 for(i = 0; i < numpages; i++) {
66846684 page = pages[i];
66856685
6686− from = start & (PAGE_CACHE_SIZE - 1);
6687− if ((end >> PAGE_CACHE_SHIFT) == page->index)
6688− to = end & (PAGE_CACHE_SIZE - 1);
6686+ from = start & (PAGE_SIZE - 1);
6687+ if ((end >> PAGE_SHIFT) == page->index)
6688+ to = end & (PAGE_SIZE - 1);
66896689
6690− BUG_ON(from > PAGE_CACHE_SIZE);
6691− BUG_ON(to > PAGE_CACHE_SIZE);
6690+ BUG_ON(from > PAGE_SIZE);
6691+ BUG_ON(to > PAGE_SIZE);
66926692
66936693 ocfs2_map_and_dirty_page(inode, handle, from, to, page, 1,
66946694 &phys);
66956695
6696− start = (page->index + 1) << PAGE_CACHE_SHIFT;
6696+ start = (page->index + 1) << PAGE_SHIFT;
66976697 }
66986698 out:
66996699 if (pages)
@@ -6712,7 +6712,7 @@ int ocfs2_grab_pages(struct inode *inode, loff_t start, loff_t end, · 12 unmodified lines
67126712
67136713 numpages = 0;
67146714 last_page_bytes = PAGE_ALIGN(end);
6715− index = start >> PAGE_CACHE_SHIFT;
6715+ index = start >> PAGE_SHIFT;
67166716 do {
67176717 pages[numpages] = find_or_create_page(mapping, index, GFP_NOFS);
67186718 if (!pages[numpages]) {
@@ -6723,7 +6723,7 @@ int ocfs2_grab_pages(struct inode *inode, loff_t start, loff_t end, · 4 unmodified lines
67236723
67246724 numpages++;
67256725 index++;
6726− } while (index < (last_page_bytes >> PAGE_CACHE_SHIFT));
6726+ } while (index < (last_page_bytes >> PAGE_SHIFT));
67276727
67286728 out:
67296729 if (ret != 0) {
@@ -6950,8 +6950,8 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, · 220 unmodified lines
69506950 * to do that now.
69516951 */
69526952 if (!ocfs2_sparse_alloc(osb) &&
6953− PAGE_CACHE_SIZE < osb->s_clustersize)
6954− end = PAGE_CACHE_SIZE;
6953+ PAGE_SIZE < osb->s_clustersize)
6954+ end = PAGE_SIZE;
69556955
69566956 ret = ocfs2_grab_eof_pages(inode, 0, end, pages, &num_pages);
69576957 if (ret) {
@@ -6971,8 +6971,8 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, · 13 unmodified lines
69716971 goto out_unlock;
69726972 }
69736973
6974− page_end = PAGE_CACHE_SIZE;
6975− if (PAGE_CACHE_SIZE > osb->s_clustersize)
6974+ page_end = PAGE_SIZE;
6975+ if (PAGE_SIZE > osb->s_clustersize)
69766976 page_end = osb->s_clustersize;
69776977
69786978 for (i = 0; i < num_pages; i++)
fs/ocfs2/aops.c+24−24
@@ -234,7 +234,7 @@ int ocfs2_read_inline_data(struct inode *inode, struct page *page, · 233 unmodified lines
234234
235235 size = i_size_read(inode);
236236
237− if (size > PAGE_CACHE_SIZE ||
237+ if (size > PAGE_SIZE ||
238238 size > ocfs2_max_inline_data_with_xattr(inode->i_sb, di)) {
239239 ocfs2_error(inode->i_sb,
240240 "Inode %llu has with inline data has bad size: %Lu\n",
@@ -247,7 +247,7 @@ int ocfs2_read_inline_data(struct inode *inode, struct page *page, · 6 unmodified lines
247247 if (size)
248248 memcpy(kaddr, di->id2.i_data.id_data, size);
249249 /* Clear the remaining part of the page */
250− memset(kaddr + size, 0, PAGE_CACHE_SIZE - size);
250+ memset(kaddr + size, 0, PAGE_SIZE - size);
251251 flush_dcache_page(page);
252252 kunmap_atomic(kaddr);
253253
@@ -282,7 +282,7 @@ static int ocfs2_readpage(struct file *file, struct page *page) · 28 unmodified lines
282282 {
283283 struct inode *inode = page->mapping->host;
284284 struct ocfs2_inode_info *oi = OCFS2_I(inode);
285− loff_t start = (loff_t)page->index << PAGE_CACHE_SHIFT;
285+ loff_t start = (loff_t)page->index << PAGE_SHIFT;
286286 int ret, unlock = 1;
287287
288288 trace_ocfs2_readpage((unsigned long long)oi->ip_blkno,
@@ -385,7 +385,7 @@ static int ocfs2_readpages(struct file *filp, struct address_space *mapping, · 96 unmodified lines
385385 * drop out in that case as it's not worth handling here.
386386 */
387387 last = list_entry(pages->prev, struct page, lru);
388− start = (loff_t)last->index << PAGE_CACHE_SHIFT;
388+ start = (loff_t)last->index << PAGE_SHIFT;
389389 if (start >= i_size_read(inode))
390390 goto out_unlock;
391391
@@ -511,12 +511,12 @@ static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb, · 119 unmodified lines
511511 unsigned int *start,
512512 unsigned int *end)
513513 {
514− unsigned int cluster_start = 0, cluster_end = PAGE_CACHE_SIZE;
514+ unsigned int cluster_start = 0, cluster_end = PAGE_SIZE;
515515
516− if (unlikely(PAGE_CACHE_SHIFT > osb->s_clustersize_bits)) {
516+ if (unlikely(PAGE_SHIFT > osb->s_clustersize_bits)) {
517517 unsigned int cpp;
518518
519− cpp = 1 << (PAGE_CACHE_SHIFT - osb->s_clustersize_bits);
519+ cpp = 1 << (PAGE_SHIFT - osb->s_clustersize_bits);
520520
521521 cluster_start = cpos % cpp;
522522 cluster_start = cluster_start << osb->s_clustersize_bits;
@@ -687,10 +687,10 @@ next_bh: · 164 unmodified lines
687687 #if (PAGE_CACHE_SIZE >= OCFS2_MAX_CLUSTERSIZE)
688688 #define OCFS2_MAX_CTXT_PAGES 1
689689 #else
690−#define OCFS2_MAX_CTXT_PAGES (OCFS2_MAX_CLUSTERSIZE / PAGE_CACHE_SIZE)
690+#define OCFS2_MAX_CTXT_PAGES (OCFS2_MAX_CLUSTERSIZE / PAGE_SIZE)
691691 #endif
692692
693−#define OCFS2_MAX_CLUSTERS_PER_PAGE (PAGE_CACHE_SIZE / OCFS2_MIN_CLUSTERSIZE)
693+#define OCFS2_MAX_CLUSTERS_PER_PAGE (PAGE_SIZE / OCFS2_MIN_CLUSTERSIZE)
694694
695695 struct ocfs2_unwritten_extent {
696696 struct list_head ue_node;
@@ -785,7 +785,7 @@ void ocfs2_unlock_and_free_pages(struct page **pages, int num_pages) · 88 unmodified lines
785785 if (pages[i]) {
786786 unlock_page(pages[i]);
787787 mark_page_accessed(pages[i]);
788− page_cache_release(pages[i]);
788+ put_page(pages[i]);
789789 }
790790 }
791791 }
@@ -808,7 +808,7 @@ static void ocfs2_unlock_pages(struct ocfs2_write_ctxt *wc) · 16 unmodified lines
808808 }
809809 }
810810 mark_page_accessed(wc->w_target_page);
811− page_cache_release(wc->w_target_page);
811+ put_page(wc->w_target_page);
812812 }
813813 ocfs2_unlock_and_free_pages(wc->w_pages, wc->w_num_pages);
814814 }
@@ -857,7 +857,7 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp, · 42 unmodified lines
857857 wc->w_di_bh = di_bh;
858858 wc->w_type = type;
859859
860− if (unlikely(PAGE_CACHE_SHIFT > osb->s_clustersize_bits))
860+ if (unlikely(PAGE_SHIFT > osb->s_clustersize_bits))
861861 wc->w_large_pages = 1;
862862 else
863863 wc->w_large_pages = 0;
@@ -920,7 +920,7 @@ static void ocfs2_write_failure(struct inode *inode, · 56 unmodified lines
920920 loff_t user_pos, unsigned user_len)
921921 {
922922 int i;
923− unsigned from = user_pos & (PAGE_CACHE_SIZE - 1),
923+ unsigned from = user_pos & (PAGE_SIZE - 1),
924924 to = user_pos + user_len;
925925 struct page *tmppage;
926926
@@ -960,7 +960,7 @@ static int ocfs2_prepare_page_for_write(struct inode *inode, u64 *p_blkno, · 33 unmodified lines
960960 (page_offset(page) <= user_pos));
961961
962962 if (page == wc->w_target_page) {
963− map_from = user_pos & (PAGE_CACHE_SIZE - 1);
963+ map_from = user_pos & (PAGE_SIZE - 1);
964964 map_to = map_from + user_len;
965965
966966 if (new)
@@ -1034,7 +1034,7 @@ static int ocfs2_grab_pages_for_write(struct address_space *mapping, · 67 unmodified lines
10341034 struct inode *inode = mapping->host;
10351035 loff_t last_byte;
10361036
1037− target_index = user_pos >> PAGE_CACHE_SHIFT;
1037+ target_index = user_pos >> PAGE_SHIFT;
10381038
10391039 /*
10401040 * Figure out how many pages we'll be manipulating here. For
@@ -1053,14 +1053,14 @@ static int ocfs2_grab_pages_for_write(struct address_space *mapping, · 12 unmodified lines
10531053 */
10541054 last_byte = max(user_pos + user_len, i_size_read(inode));
10551055 BUG_ON(last_byte < 1);
1056− end_index = ((last_byte - 1) >> PAGE_CACHE_SHIFT) + 1;
1056+ end_index = ((last_byte - 1) >> PAGE_SHIFT) + 1;
10571057 if ((start + wc->w_num_pages) > end_index)
10581058 wc->w_num_pages = end_index - start;
10591059 } else {
10601060 wc->w_num_pages = 1;
10611061 start = target_index;
10621062 }
1063− end_index = (user_pos + user_len - 1) >> PAGE_CACHE_SHIFT;
1063+ end_index = (user_pos + user_len - 1) >> PAGE_SHIFT;
10641064
10651065 for(i = 0; i < wc->w_num_pages; i++) {
10661066 index = start + i;
@@ -1082,7 +1082,7 @@ static int ocfs2_grab_pages_for_write(struct address_space *mapping, · 15 unmodified lines
10821082 goto out;
10831083 }
10841084
1085− page_cache_get(mmap_page);
1085+ get_page(mmap_page);
10861086 wc->w_pages[i] = mmap_page;
10871087 wc->w_target_locked = true;
10881088 } else if (index >= target_index && index <= end_index &&
@@ -1272,7 +1272,7 @@ static void ocfs2_set_target_boundaries(struct ocfs2_super *osb, · 183 unmodified lines
12721272 {
12731273 struct ocfs2_write_cluster_desc *desc;
12741274
1275− wc->w_target_from = pos & (PAGE_CACHE_SIZE - 1);
1275+ wc->w_target_from = pos & (PAGE_SIZE - 1);
12761276 wc->w_target_to = wc->w_target_from + len;
12771277
12781278 if (alloc == 0)
@@ -1309,7 +1309,7 @@ static void ocfs2_set_target_boundaries(struct ocfs2_super *osb, · 30 unmodified lines
13091309 &wc->w_target_to);
13101310 } else {
13111311 wc->w_target_from = 0;
1312− wc->w_target_to = PAGE_CACHE_SIZE;
1312+ wc->w_target_to = PAGE_SIZE;
13131313 }
13141314 }
13151315
@@ -1981,7 +1981,7 @@ int ocfs2_write_end_nolock(struct address_space *mapping, · 665 unmodified lines
19811981 struct page *page, void *fsdata)
19821982 {
19831983 int i, ret;
1984− unsigned from, to, start = pos & (PAGE_CACHE_SIZE - 1);
1984+ unsigned from, to, start = pos & (PAGE_SIZE - 1);
19851985 struct inode *inode = mapping->host;
19861986 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
19871987 struct ocfs2_write_ctxt *wc = fsdata;
@@ -2027,8 +2027,8 @@ int ocfs2_write_end_nolock(struct address_space *mapping, · 39 unmodified lines
20272027 from = wc->w_target_from;
20282028 to = wc->w_target_to;
20292029
2030− BUG_ON(from > PAGE_CACHE_SIZE ||
2031− to > PAGE_CACHE_SIZE ||
2030+ BUG_ON(from > PAGE_SIZE ||
2031+ to > PAGE_SIZE ||
20322032 to < from);
20332033 } else {
20342034 /*
@@ -2037,7 +2037,7 @@ int ocfs2_write_end_nolock(struct address_space *mapping, · 2 unmodified lines
20372037 * to flush their entire range.
20382038 */
20392039 from = 0;
2040− to = PAGE_CACHE_SIZE;
2040+ to = PAGE_SIZE;
20412041 }
20422042
20432043 if (page_has_buffers(tmppage)) {
fs/ocfs2/cluster/heartbeat.c+5−5
@@ -417,13 +417,13 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, · 416 unmodified lines
417417 bio->bi_private = wc;
418418 bio->bi_end_io = o2hb_bio_end_io;
419419
420− vec_start = (cs << bits) % PAGE_CACHE_SIZE;
420+ vec_start = (cs << bits) % PAGE_SIZE;
421421 while(cs < max_slots) {
422422 current_page = cs / spp;
423423 page = reg->hr_slot_data[current_page];
424424
425− vec_len = min(PAGE_CACHE_SIZE - vec_start,
426− (max_slots-cs) * (PAGE_CACHE_SIZE/spp) );
425+ vec_len = min(PAGE_SIZE - vec_start,
426+ (max_slots-cs) * (PAGE_SIZE/spp) );
427427
428428 mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n",
429429 current_page, vec_len, vec_start);
@@ -431,7 +431,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, · 1 unmodified line
431431 len = bio_add_page(bio, page, vec_len, vec_start);
432432 if (len != vec_len) break;
433433
434− cs += vec_len / (PAGE_CACHE_SIZE/spp);
434+ cs += vec_len / (PAGE_SIZE/spp);
435435 vec_start = 0;
436436 }
437437
@@ -1576,7 +1576,7 @@ static ssize_t o2hb_region_dev_show(struct config_item *item, char *page) · 1138 unmodified lines
15761576
15771577 static void o2hb_init_region_params(struct o2hb_region *reg)
15781578 {
1579− reg->hr_slots_per_page = PAGE_CACHE_SIZE >> reg->hr_block_bits;
1579+ reg->hr_slots_per_page = PAGE_SIZE >> reg->hr_block_bits;
15801580 reg->hr_timeout_ms = O2HB_REGION_TIMEOUT_MS;
15811581
15821582 mlog(ML_HEARTBEAT, "hr_start_block = %llu, hr_blocks = %u\n",
fs/ocfs2/dlmfs/dlmfs.c+2−2
@@ -571,8 +571,8 @@ static int dlmfs_fill_super(struct super_block * sb, · 570 unmodified lines
571571 int silent)
572572 {
573573 sb->s_maxbytes = MAX_LFS_FILESIZE;
574− sb->s_blocksize = PAGE_CACHE_SIZE;
575− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
574+ sb->s_blocksize = PAGE_SIZE;
575+ sb->s_blocksize_bits = PAGE_SHIFT;
576576 sb->s_magic = DLMFS_MAGIC;
577577 sb->s_op = &dlmfs_ops;
578578 sb->s_root = d_make_root(dlmfs_get_root_inode(sb));
fs/ocfs2/file.c+7−7
@@ -770,14 +770,14 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from, · 769 unmodified lines
770770 {
771771 struct address_space *mapping = inode->i_mapping;
772772 struct page *page;
773− unsigned long index = abs_from >> PAGE_CACHE_SHIFT;
773+ unsigned long index = abs_from >> PAGE_SHIFT;
774774 handle_t *handle;
775775 int ret = 0;
776776 unsigned zero_from, zero_to, block_start, block_end;
777777 struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
778778
779779 BUG_ON(abs_from >= abs_to);
780− BUG_ON(abs_to > (((u64)index + 1) << PAGE_CACHE_SHIFT));
780+ BUG_ON(abs_to > (((u64)index + 1) << PAGE_SHIFT));
781781 BUG_ON(abs_from & (inode->i_blkbits - 1));
782782
783783 handle = ocfs2_zero_start_ordered_transaction(inode, di_bh);
@@ -794,10 +794,10 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from, · 10 unmodified lines
794794 }
795795
796796 /* Get the offsets within the page that we want to zero */
797− zero_from = abs_from & (PAGE_CACHE_SIZE - 1);
798− zero_to = abs_to & (PAGE_CACHE_SIZE - 1);
797+ zero_from = abs_from & (PAGE_SIZE - 1);
798+ zero_to = abs_to & (PAGE_SIZE - 1);
799799 if (!zero_to)
800− zero_to = PAGE_CACHE_SIZE;
800+ zero_to = PAGE_SIZE;
801801
802802 trace_ocfs2_write_zero_page(
803803 (unsigned long long)OCFS2_I(inode)->ip_blkno,
@@ -851,7 +851,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from, · 47 unmodified lines
851851
852852 out_unlock:
853853 unlock_page(page);
854− page_cache_release(page);
854+ put_page(page);
855855 out_commit_trans:
856856 if (handle)
857857 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle);
@@ -959,7 +959,7 @@ static int ocfs2_zero_extend_range(struct inode *inode, u64 range_start, · 101 unmodified lines
959959 BUG_ON(range_start >= range_end);
960960
961961 while (zero_pos < range_end) {
962− next_pos = (zero_pos & PAGE_CACHE_MASK) + PAGE_CACHE_SIZE;
962+ next_pos = (zero_pos & PAGE_MASK) + PAGE_SIZE;
963963 if (next_pos > range_end)
964964 next_pos = range_end;
965965 rc = ocfs2_write_zero_page(inode, zero_pos, next_pos, di_bh);
fs/ocfs2/mmap.c+3−3
@@ -65,13 +65,13 @@ static int __ocfs2_page_mkwrite(struct file *file, struct buffer_head *di_bh, · 64 unmodified lines
6565 struct inode *inode = file_inode(file);
6666 struct address_space *mapping = inode->i_mapping;
6767 loff_t pos = page_offset(page);
68− unsigned int len = PAGE_CACHE_SIZE;
68+ unsigned int len = PAGE_SIZE;
6969 pgoff_t last_index;
7070 struct page *locked_page = NULL;
7171 void *fsdata;
7272 loff_t size = i_size_read(inode);
7373
74− last_index = (size - 1) >> PAGE_CACHE_SHIFT;
74+ last_index = (size - 1) >> PAGE_SHIFT;
7575
7676 /*
7777 * There are cases that lead to the page no longer bebongs to the
@@ -102,7 +102,7 @@ static int __ocfs2_page_mkwrite(struct file *file, struct buffer_head *di_bh, · 24 unmodified lines
102102 * because the "write" would invalidate their data.
103103 */
104104 if (page->index == last_index)
105− len = ((size - 1) & ~PAGE_CACHE_MASK) + 1;
105+ len = ((size - 1) & ~PAGE_MASK) + 1;
106106
107107 ret = ocfs2_write_begin_nolock(mapping, pos, len, OCFS2_WRITE_MMAP,
108108 &locked_page, &fsdata, di_bh, page);
fs/ocfs2/ocfs2.h+10−10
@@ -822,10 +822,10 @@ static inline unsigned int ocfs2_page_index_to_clusters(struct super_block *sb, · 821 unmodified lines
822822 u32 clusters = pg_index;
823823 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits;
824824
825− if (unlikely(PAGE_CACHE_SHIFT > cbits))
826− clusters = pg_index << (PAGE_CACHE_SHIFT - cbits);
827− else if (PAGE_CACHE_SHIFT < cbits)
828− clusters = pg_index >> (cbits - PAGE_CACHE_SHIFT);
825+ if (unlikely(PAGE_SHIFT > cbits))
826+ clusters = pg_index << (PAGE_SHIFT - cbits);
827+ else if (PAGE_SHIFT < cbits)
828+ clusters = pg_index >> (cbits - PAGE_SHIFT);
829829
830830 return clusters;
831831 }
@@ -839,10 +839,10 @@ static inline pgoff_t ocfs2_align_clusters_to_page_index(struct super_block *sb, · 7 unmodified lines
839839 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits;
840840 pgoff_t index = clusters;
841841
842− if (PAGE_CACHE_SHIFT > cbits) {
843− index = (pgoff_t)clusters >> (PAGE_CACHE_SHIFT - cbits);
844− } else if (PAGE_CACHE_SHIFT < cbits) {
845− index = (pgoff_t)clusters << (cbits - PAGE_CACHE_SHIFT);
842+ if (PAGE_SHIFT > cbits) {
843+ index = (pgoff_t)clusters >> (PAGE_SHIFT - cbits);
844+ } else if (PAGE_SHIFT < cbits) {
845+ index = (pgoff_t)clusters << (cbits - PAGE_SHIFT);
846846 }
847847
848848 return index;
@@ -853,8 +853,8 @@ static inline unsigned int ocfs2_pages_per_cluster(struct super_block *sb) · 4 unmodified lines
853853 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits;
854854 unsigned int pages_per_cluster = 1;
855855
856− if (PAGE_CACHE_SHIFT < cbits)
857− pages_per_cluster = 1 << (cbits - PAGE_CACHE_SHIFT);
856+ if (PAGE_SHIFT < cbits)
857+ pages_per_cluster = 1 << (cbits - PAGE_SHIFT);
858858
859859 return pages_per_cluster;
860860 }
fs/ocfs2/refcounttree.c+11−11
@@ -2937,16 +2937,16 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle, · 2936 unmodified lines
29372937 end = i_size_read(inode);
29382938
29392939 while (offset < end) {
2940− page_index = offset >> PAGE_CACHE_SHIFT;
2941− map_end = ((loff_t)page_index + 1) << PAGE_CACHE_SHIFT;
2940+ page_index = offset >> PAGE_SHIFT;
2941+ map_end = ((loff_t)page_index + 1) << PAGE_SHIFT;
29422942 if (map_end > end)
29432943 map_end = end;
29442944
29452945 /* from, to is the offset within the page. */
2946− from = offset & (PAGE_CACHE_SIZE - 1);
2947− to = PAGE_CACHE_SIZE;
2948− if (map_end & (PAGE_CACHE_SIZE - 1))
2949− to = map_end & (PAGE_CACHE_SIZE - 1);
2946+ from = offset & (PAGE_SIZE - 1);
2947+ to = PAGE_SIZE;
2948+ if (map_end & (PAGE_SIZE - 1))
2949+ to = map_end & (PAGE_SIZE - 1);
29502950
29512951 page = find_or_create_page(mapping, page_index, GFP_NOFS);
29522952 if (!page) {
@@ -2959,7 +2959,7 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle, · 6 unmodified lines
29592959 * In case PAGE_CACHE_SIZE <= CLUSTER_SIZE, This page
29602960 * can't be dirtied before we CoW it out.
29612961 */
2962− if (PAGE_CACHE_SIZE <= OCFS2_SB(sb)->s_clustersize)
2962+ if (PAGE_SIZE <= OCFS2_SB(sb)->s_clustersize)
29632963 BUG_ON(PageDirty(page));
29642964
29652965 if (!PageUptodate(page)) {
@@ -2987,7 +2987,7 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle, · 21 unmodified lines
29872987 mark_page_accessed(page);
29882988 unlock:
29892989 unlock_page(page);
2990− page_cache_release(page);
2990+ put_page(page);
29912991 page = NULL;
29922992 offset = map_end;
29932993 if (ret)
@@ -3165,8 +3165,8 @@ int ocfs2_cow_sync_writeback(struct super_block *sb, · 171 unmodified lines
31653165 }
31663166
31673167 while (offset < end) {
3168− page_index = offset >> PAGE_CACHE_SHIFT;
3169− map_end = ((loff_t)page_index + 1) << PAGE_CACHE_SHIFT;
3168+ page_index = offset >> PAGE_SHIFT;
3169+ map_end = ((loff_t)page_index + 1) << PAGE_SHIFT;
31703170 if (map_end > end)
31713171 map_end = end;
31723172
@@ -3182,7 +3182,7 @@ int ocfs2_cow_sync_writeback(struct super_block *sb, · 9 unmodified lines
31823182 mark_page_accessed(page);
31833183
31843184 unlock_page(page);
3185− page_cache_release(page);
3185+ put_page(page);
31863186 page = NULL;
31873187 offset = map_end;
31883188 if (ret)
fs/ocfs2/super.c+2−2
@@ -605,8 +605,8 @@ static unsigned long long ocfs2_max_file_offset(unsigned int bbits, · 604 unmodified lines
605605 /*
606606 * We might be limited by page cache size.
607607 */
608− if (bytes > PAGE_CACHE_SIZE) {
609− bytes = PAGE_CACHE_SIZE;
608+ if (bytes > PAGE_SIZE) {
609+ bytes = PAGE_SIZE;
610610 trim = 1;
611611 /*
612612 * Shift by 31 here so that we don't get larger than
fs/orangefs/inode.c+5−5
@@ -18,8 +18,8 @@ static int read_one_page(struct page *page) · 17 unmodified lines
1818 int max_block;
1919 ssize_t bytes_read = 0;
2020 struct inode *inode = page->mapping->host;
21− const __u32 blocksize = PAGE_CACHE_SIZE; /* inode->i_blksize */
22− const __u32 blockbits = PAGE_CACHE_SHIFT; /* inode->i_blkbits */
21+ const __u32 blocksize = PAGE_SIZE; /* inode->i_blksize */
22+ const __u32 blockbits = PAGE_SHIFT; /* inode->i_blkbits */
2323 struct iov_iter to;
2424 struct bio_vec bv = {.bv_page = page, .bv_len = PAGE_SIZE};
2525
@@ -86,7 +86,7 @@ static int orangefs_readpages(struct file *file, · 60 unmodified lines
8686 "failure adding page to cache, read_one_page returned: %d\n",
8787 ret);
8888 } else {
89− page_cache_release(page);
89+ put_page(page);
9090 }
9191 }
9292 BUG_ON(!list_empty(pages));
@@ -328,7 +328,7 @@ static int orangefs_init_iops(struct inode *inode) · 235 unmodified lines
328328 case S_IFREG:
329329 inode->i_op = &orangefs_file_inode_operations;
330330 inode->i_fop = &orangefs_file_operations;
331− inode->i_blkbits = PAGE_CACHE_SHIFT;
331+ inode->i_blkbits = PAGE_SHIFT;
332332 break;
333333 case S_IFLNK:
334334 inode->i_op = &orangefs_symlink_inode_operations;
@@ -456,7 +456,7 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir, · 121 unmodified lines
456456 inode->i_uid = current_fsuid();
457457 inode->i_gid = current_fsgid();
458458 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
459− inode->i_size = PAGE_CACHE_SIZE;
459+ inode->i_size = PAGE_SIZE;
460460 inode->i_rdev = dev;
461461
462462 error = insert_inode_locked4(inode, hash, orangefs_test_inode, ref);
fs/orangefs/orangefs-bufmap.c+2−2
@@ -170,7 +170,7 @@ orangefs_bufmap_unmap(struct orangefs_bufmap *bufmap) · 169 unmodified lines
170170 int i;
171171
172172 for (i = 0; i < bufmap->page_count; i++)
173− page_cache_release(bufmap->page_array[i]);
173+ put_page(bufmap->page_array[i]);
174174 }
175175
176176 static void
@@ -299,7 +299,7 @@ orangefs_bufmap_map(struct orangefs_bufmap *bufmap, · 122 unmodified lines
299299
300300 for (i = 0; i < ret; i++) {
301301 SetPageError(bufmap->page_array[i]);
302− page_cache_release(bufmap->page_array[i]);
302+ put_page(bufmap->page_array[i]);
303303 }
304304 return -ENOMEM;
305305 }
fs/orangefs/orangefs-utils.c+1−1
@@ -303,7 +303,7 @@ int orangefs_inode_getattr(struct inode *inode, int new, int size) · 302 unmodified lines
303303 }
304304 break;
305305 case S_IFDIR:
306− inode->i_size = PAGE_CACHE_SIZE;
306+ inode->i_size = PAGE_SIZE;
307307 orangefs_inode->blksize = (1 << inode->i_blkbits);
308308 spin_lock(&inode->i_lock);
309309 inode_set_bytes(inode, inode->i_size);
fs/pipe.c+3−3
@@ -134,7 +134,7 @@ static void anon_pipe_buf_release(struct pipe_inode_info *pipe, · 133 unmodified lines
134134 if (page_count(page) == 1 && !pipe->tmp_page)
135135 pipe->tmp_page = page;
136136 else
137− page_cache_release(page);
137+ put_page(page);
138138 }
139139
140140 /**
@@ -180,7 +180,7 @@ EXPORT_SYMBOL(generic_pipe_buf_steal); · 39 unmodified lines
180180 */
181181 void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf)
182182 {
183− page_cache_get(buf->page);
183+ get_page(buf->page);
184184 }
185185 EXPORT_SYMBOL(generic_pipe_buf_get);
186186
@@ -211,7 +211,7 @@ EXPORT_SYMBOL(generic_pipe_buf_confirm); · 24 unmodified lines
211211 void generic_pipe_buf_release(struct pipe_inode_info *pipe,
212212 struct pipe_buffer *buf)
213213 {
214− page_cache_release(buf->page);
214+ put_page(buf->page);
215215 }
216216 EXPORT_SYMBOL(generic_pipe_buf_release);
217217
fs/proc/task_mmu.c+1−1
@@ -553,7 +553,7 @@ static void smaps_pte_entry(pte_t *pte, unsigned long addr, · 552 unmodified lines
553553 if (radix_tree_exceptional_entry(page))
554554 mss->swap += PAGE_SIZE;
555555 else
556− page_cache_release(page);
556+ put_page(page);
557557
558558 return;
559559 }
fs/proc/vmcore.c+2−2
@@ -279,12 +279,12 @@ static int mmap_vmcore_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 278 unmodified lines
279279 if (!page)
280280 return VM_FAULT_OOM;
281281 if (!PageUptodate(page)) {
282− offset = (loff_t) index << PAGE_CACHE_SHIFT;
282+ offset = (loff_t) index << PAGE_SHIFT;
283283 buf = __va((page_to_pfn(page) << PAGE_SHIFT));
284284 rc = __read_vmcore(buf, PAGE_SIZE, &offset, 0);
285285 if (rc < 0) {
286286 unlock_page(page);
287− page_cache_release(page);
287+ put_page(page);
288288 return (rc == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS;
289289 }
290290 SetPageUptodate(page);
fs/pstore/inode.c+2−2
@@ -420,8 +420,8 @@ static int pstore_fill_super(struct super_block *sb, void *data, int silent) · 419 unmodified lines
420420 pstore_sb = sb;
421421
422422 sb->s_maxbytes = MAX_LFS_FILESIZE;
423− sb->s_blocksize = PAGE_CACHE_SIZE;
424− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
423+ sb->s_blocksize = PAGE_SIZE;
424+ sb->s_blocksize_bits = PAGE_SHIFT;
425425 sb->s_magic = PSTOREFS_MAGIC;
426426 sb->s_op = &pstore_ops;
427427 sb->s_time_gran = 1;
fs/qnx6/dir.c+8−8
@@ -35,9 +35,9 @@ static struct page *qnx6_get_page(struct inode *dir, unsigned long n) · 34 unmodified lines
3535 static unsigned last_entry(struct inode *inode, unsigned long page_nr)
3636 {
3737 unsigned long last_byte = inode->i_size;
38− last_byte -= page_nr << PAGE_CACHE_SHIFT;
39− if (last_byte > PAGE_CACHE_SIZE)
40− last_byte = PAGE_CACHE_SIZE;
38+ last_byte -= page_nr << PAGE_SHIFT;
39+ if (last_byte > PAGE_SIZE)
40+ last_byte = PAGE_SIZE;
4141 return last_byte / QNX6_DIR_ENTRY_SIZE;
4242 }
4343
@@ -47,9 +47,9 @@ static struct qnx6_long_filename *qnx6_longname(struct super_block *sb, · 3 unmodified lines
4747 {
4848 struct qnx6_sb_info *sbi = QNX6_SB(sb);
4949 u32 s = fs32_to_cpu(sbi, de->de_long_inode); /* in block units */
50− u32 n = s >> (PAGE_CACHE_SHIFT - sb->s_blocksize_bits); /* in pages */
50+ u32 n = s >> (PAGE_SHIFT - sb->s_blocksize_bits); /* in pages */
5151 /* within page */
52− u32 offs = (s << sb->s_blocksize_bits) & ~PAGE_CACHE_MASK;
52+ u32 offs = (s << sb->s_blocksize_bits) & ~PAGE_MASK;
5353 struct address_space *mapping = sbi->longfile->i_mapping;
5454 struct page *page = read_mapping_page(mapping, n, NULL);
5555 if (IS_ERR(page))
@@ -115,8 +115,8 @@ static int qnx6_readdir(struct file *file, struct dir_context *ctx) · 59 unmodified lines
115115 struct qnx6_sb_info *sbi = QNX6_SB(s);
116116 loff_t pos = ctx->pos & ~(QNX6_DIR_ENTRY_SIZE - 1);
117117 unsigned long npages = dir_pages(inode);
118− unsigned long n = pos >> PAGE_CACHE_SHIFT;
119− unsigned start = (pos & ~PAGE_CACHE_MASK) / QNX6_DIR_ENTRY_SIZE;
118+ unsigned long n = pos >> PAGE_SHIFT;
119+ unsigned start = (pos & ~PAGE_MASK) / QNX6_DIR_ENTRY_SIZE;
120120 bool done = false;
121121
122122 ctx->pos = pos;
@@ -131,7 +131,7 @@ static int qnx6_readdir(struct file *file, struct dir_context *ctx) · 8 unmodified lines
131131
132132 if (IS_ERR(page)) {
133133 pr_err("%s(): read failed\n", __func__);
134− ctx->pos = (n + 1) << PAGE_CACHE_SHIFT;
134+ ctx->pos = (n + 1) << PAGE_SHIFT;
135135 return PTR_ERR(page);
136136 }
137137 de = ((struct qnx6_dir_entry *)page_address(page)) + start;
fs/qnx6/inode.c+2−2
@@ -542,8 +542,8 @@ struct inode *qnx6_iget(struct super_block *sb, unsigned ino) · 541 unmodified lines
542542 iget_failed(inode);
543543 return ERR_PTR(-EIO);
544544 }
545− n = (ino - 1) >> (PAGE_CACHE_SHIFT - QNX6_INODE_SIZE_BITS);
546− offs = (ino - 1) & (~PAGE_CACHE_MASK >> QNX6_INODE_SIZE_BITS);
545+ n = (ino - 1) >> (PAGE_SHIFT - QNX6_INODE_SIZE_BITS);
546+ offs = (ino - 1) & (~PAGE_MASK >> QNX6_INODE_SIZE_BITS);
547547 mapping = sbi->inodes->i_mapping;
548548 page = read_mapping_page(mapping, n, NULL);
549549 if (IS_ERR(page)) {
fs/qnx6/qnx6.h+1−1
@@ -128,7 +128,7 @@ extern struct qnx6_super_block *qnx6_mmi_fill_super(struct super_block *s, · 127 unmodified lines
128128 static inline void qnx6_put_page(struct page *page)
129129 {
130130 kunmap(page);
131− page_cache_release(page);
131+ put_page(page);
132132 }
133133
134134 extern unsigned qnx6_find_entry(int len, struct inode *dir, const char *name,
fs/ramfs/inode.c+2−2
@@ -223,8 +223,8 @@ int ramfs_fill_super(struct super_block *sb, void *data, int silent) · 222 unmodified lines
223223 return err;
224224
225225 sb->s_maxbytes = MAX_LFS_FILESIZE;
226− sb->s_blocksize = PAGE_CACHE_SIZE;
227− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
226+ sb->s_blocksize = PAGE_SIZE;
227+ sb->s_blocksize_bits = PAGE_SHIFT;
228228 sb->s_magic = RAMFS_MAGIC;
229229 sb->s_op = &ramfs_ops;
230230 sb->s_time_gran = 1;
fs/reiserfs/file.c+2−2
@@ -180,11 +180,11 @@ int reiserfs_commit_page(struct inode *inode, struct page *page, · 179 unmodified lines
180180 int partial = 0;
181181 unsigned blocksize;
182182 struct buffer_head *bh, *head;
183− unsigned long i_size_index = inode->i_size >> PAGE_CACHE_SHIFT;
183+ unsigned long i_size_index = inode->i_size >> PAGE_SHIFT;
184184 int new;
185185 int logit = reiserfs_file_data_log(inode);
186186 struct super_block *s = inode->i_sb;
187− int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize;
187+ int bh_per_page = PAGE_SIZE / s->s_blocksize;
188188 struct reiserfs_transaction_handle th;
189189 int ret = 0;
190190
fs/reiserfs/inode.c+22−22
@@ -386,7 +386,7 @@ static int _get_block_create_0(struct inode *inode, sector_t block, · 385 unmodified lines
386386 goto finished;
387387 }
388388 /* read file tail into part of page */
389− offset = (cpu_key_k_offset(&key) - 1) & (PAGE_CACHE_SIZE - 1);
389+ offset = (cpu_key_k_offset(&key) - 1) & (PAGE_SIZE - 1);
390390 copy_item_head(&tmp_ih, ih);
391391
392392 /*
@@ -587,10 +587,10 @@ static int convert_tail_for_hole(struct inode *inode, · 194 unmodified lines
587587 return -EIO;
588588
589589 /* always try to read until the end of the block */
590− tail_start = tail_offset & (PAGE_CACHE_SIZE - 1);
590+ tail_start = tail_offset & (PAGE_SIZE - 1);
591591 tail_end = (tail_start | (bh_result->b_size - 1)) + 1;
592592
593− index = tail_offset >> PAGE_CACHE_SHIFT;
593+ index = tail_offset >> PAGE_SHIFT;
594594 /*
595595 * hole_page can be zero in case of direct_io, we are sure
596596 * that we cannot get here if we write with O_DIRECT into tail page
@@ -629,7 +629,7 @@ static int convert_tail_for_hole(struct inode *inode, · 32 unmodified lines
629629 unlock:
630630 if (tail_page != hole_page) {
631631 unlock_page(tail_page);
632− page_cache_release(tail_page);
632+ put_page(tail_page);
633633 }
634634 out:
635635 return retval;
@@ -2189,11 +2189,11 @@ static int grab_tail_page(struct inode *inode, · 1553 unmodified lines
21892189 * we want the page with the last byte in the file,
21902190 * not the page that will hold the next byte for appending
21912191 */
2192− unsigned long index = (inode->i_size - 1) >> PAGE_CACHE_SHIFT;
2192+ unsigned long index = (inode->i_size - 1) >> PAGE_SHIFT;
21932193 unsigned long pos = 0;
21942194 unsigned long start = 0;
21952195 unsigned long blocksize = inode->i_sb->s_blocksize;
2196− unsigned long offset = (inode->i_size) & (PAGE_CACHE_SIZE - 1);
2196+ unsigned long offset = (inode->i_size) & (PAGE_SIZE - 1);
21972197 struct buffer_head *bh;
21982198 struct buffer_head *head;
21992199 struct page *page;
@@ -2251,7 +2251,7 @@ out: · 51 unmodified lines
22512251
22522252 unlock:
22532253 unlock_page(page);
2254− page_cache_release(page);
2254+ put_page(page);
22552255 return error;
22562256 }
22572257
@@ -2265,7 +2265,7 @@ int reiserfs_truncate_file(struct inode *inode, int update_timestamps) · 7 unmodified lines
22652265 {
22662266 struct reiserfs_transaction_handle th;
22672267 /* we want the offset for the first byte after the end of the file */
2268− unsigned long offset = inode->i_size & (PAGE_CACHE_SIZE - 1);
2268+ unsigned long offset = inode->i_size & (PAGE_SIZE - 1);
22692269 unsigned blocksize = inode->i_sb->s_blocksize;
22702270 unsigned length;
22712271 struct page *page = NULL;
@@ -2345,7 +2345,7 @@ int reiserfs_truncate_file(struct inode *inode, int update_timestamps) · 73 unmodified lines
23452345 }
23462346 }
23472347 unlock_page(page);
2348− page_cache_release(page);
2348+ put_page(page);
23492349 }
23502350
23512351 reiserfs_write_unlock(inode->i_sb);
@@ -2354,7 +2354,7 @@ int reiserfs_truncate_file(struct inode *inode, int update_timestamps) · 2 unmodified lines
23542354 out:
23552355 if (page) {
23562356 unlock_page(page);
2357− page_cache_release(page);
2357+ put_page(page);
23582358 }
23592359
23602360 reiserfs_write_unlock(inode->i_sb);
@@ -2426,7 +2426,7 @@ research: · 65 unmodified lines
24262426 } else if (is_direct_le_ih(ih)) {
24272427 char *p;
24282428 p = page_address(bh_result->b_page);
2429− p += (byte_offset - 1) & (PAGE_CACHE_SIZE - 1);
2429+ p += (byte_offset - 1) & (PAGE_SIZE - 1);
24302430 copy_size = ih_item_len(ih) - pos_in_item;
24312431
24322432 fs_gen = get_generation(inode->i_sb);
@@ -2525,7 +2525,7 @@ static int reiserfs_write_full_page(struct page *page, · 92 unmodified lines
25252525 struct writeback_control *wbc)
25262526 {
25272527 struct inode *inode = page->mapping->host;
2528− unsigned long end_index = inode->i_size >> PAGE_CACHE_SHIFT;
2528+ unsigned long end_index = inode->i_size >> PAGE_SHIFT;
25292529 int error = 0;
25302530 unsigned long block;
25312531 sector_t last_block;
@@ -2535,7 +2535,7 @@ static int reiserfs_write_full_page(struct page *page, · 3 unmodified lines
25352535 int checked = PageChecked(page);
25362536 struct reiserfs_transaction_handle th;
25372537 struct super_block *s = inode->i_sb;
2538− int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize;
2538+ int bh_per_page = PAGE_SIZE / s->s_blocksize;
25392539 th.t_trans_id = 0;
25402540
25412541 /* no logging allowed when nonblocking or from PF_MEMALLOC */
@@ -2564,16 +2564,16 @@ static int reiserfs_write_full_page(struct page *page, · 22 unmodified lines
25642564 if (page->index >= end_index) {
25652565 unsigned last_offset;
25662566
2567− last_offset = inode->i_size & (PAGE_CACHE_SIZE - 1);
2567+ last_offset = inode->i_size & (PAGE_SIZE - 1);
25682568 /* no file contents in this page */
25692569 if (page->index >= end_index + 1 || !last_offset) {
25702570 unlock_page(page);
25712571 return 0;
25722572 }
2573− zero_user_segment(page, last_offset, PAGE_CACHE_SIZE);
2573+ zero_user_segment(page, last_offset, PAGE_SIZE);
25742574 }
25752575 bh = head;
2576− block = page->index << (PAGE_CACHE_SHIFT - s->s_blocksize_bits);
2576+ block = page->index << (PAGE_SHIFT - s->s_blocksize_bits);
25772577 last_block = (i_size_read(inode) - 1) >> inode->i_blkbits;
25782578 /* first map all the buffers, logging any direct items we find */
25792579 do {
@@ -2774,7 +2774,7 @@ static int reiserfs_write_begin(struct file *file, · 194 unmodified lines
27742774 *fsdata = (void *)(unsigned long)flags;
27752775 }
27762776
2777− index = pos >> PAGE_CACHE_SHIFT;
2777+ index = pos >> PAGE_SHIFT;
27782778 page = grab_cache_page_write_begin(mapping, index, flags);
27792779 if (!page)
27802780 return -ENOMEM;
@@ -2822,7 +2822,7 @@ static int reiserfs_write_begin(struct file *file, · 41 unmodified lines
28222822 }
28232823 if (ret) {
28242824 unlock_page(page);
2825− page_cache_release(page);
2825+ put_page(page);
28262826 /* Truncate allocated blocks */
28272827 reiserfs_truncate_failed_write(inode);
28282828 }
@@ -2909,7 +2909,7 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping, · 80 unmodified lines
29092909 else
29102910 th = NULL;
29112911
2912− start = pos & (PAGE_CACHE_SIZE - 1);
2912+ start = pos & (PAGE_SIZE - 1);
29132913 if (unlikely(copied < len)) {
29142914 if (!PageUptodate(page))
29152915 copied = 0;
@@ -2974,7 +2974,7 @@ out: · 58 unmodified lines
29742974 if (locked)
29752975 reiserfs_write_unlock(inode->i_sb);
29762976 unlock_page(page);
2977− page_cache_release(page);
2977+ put_page(page);
29782978
29792979 if (pos + len > inode->i_size)
29802980 reiserfs_truncate_failed_write(inode);
@@ -2996,7 +2996,7 @@ int reiserfs_commit_write(struct file *f, struct page *page, · 15 unmodified lines
29962996 unsigned from, unsigned to)
29972997 {
29982998 struct inode *inode = page->mapping->host;
2999− loff_t pos = ((loff_t) page->index << PAGE_CACHE_SHIFT) + to;
2999+ loff_t pos = ((loff_t) page->index << PAGE_SHIFT) + to;
30003000 int ret = 0;
30013001 int update_sd = 0;
30023002 struct reiserfs_transaction_handle *th = NULL;
@@ -3181,7 +3181,7 @@ static void reiserfs_invalidatepage(struct page *page, unsigned int offset, · 178 unmodified lines
31813181 struct inode *inode = page->mapping->host;
31823182 unsigned int curr_off = 0;
31833183 unsigned int stop = offset + length;
3184− int partial_page = (offset || length < PAGE_CACHE_SIZE);
3184+ int partial_page = (offset || length < PAGE_SIZE);
31853185 int ret = 1;
31863186
31873187 BUG_ON(!PageLocked(page));
fs/reiserfs/ioctl.c+2−2
@@ -203,7 +203,7 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) · 202 unmodified lines
203203 * __reiserfs_write_begin on that page. This will force a
204204 * reiserfs_get_block to unpack the tail for us.
205205 */
206− index = inode->i_size >> PAGE_CACHE_SHIFT;
206+ index = inode->i_size >> PAGE_SHIFT;
207207 mapping = inode->i_mapping;
208208 page = grab_cache_page(mapping, index);
209209 retval = -ENOMEM;
@@ -221,7 +221,7 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) · 11 unmodified lines
221221
222222 out_unlock:
223223 unlock_page(page);
224− page_cache_release(page);
224+ put_page(page);
225225
226226 out:
227227 inode_unlock(inode);
fs/reiserfs/journal.c+2−2
@@ -605,12 +605,12 @@ static void release_buffer_page(struct buffer_head *bh) · 604 unmodified lines
605605 {
606606 struct page *page = bh->b_page;
607607 if (!page->mapping && trylock_page(page)) {
608− page_cache_get(page);
608+ get_page(page);
609609 put_bh(bh);
610610 if (!page->mapping)
611611 try_to_free_buffers(page);
612612 unlock_page(page);
613− page_cache_release(page);
613+ put_page(page);
614614 } else {
615615 put_bh(bh);
616616 }
fs/reiserfs/stree.c+2−2
@@ -1342,7 +1342,7 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th, · 1341 unmodified lines
13421342 */
13431343
13441344 data = kmap_atomic(un_bh->b_page);
1345− off = ((le_ih_k_offset(&s_ih) - 1) & (PAGE_CACHE_SIZE - 1));
1345+ off = ((le_ih_k_offset(&s_ih) - 1) & (PAGE_SIZE - 1));
13461346 memcpy(data + off,
13471347 ih_item_body(PATH_PLAST_BUFFER(path), &s_ih),
13481348 ret_value);
@@ -1511,7 +1511,7 @@ static void unmap_buffers(struct page *page, loff_t pos) · 162 unmodified lines
15111511
15121512 if (page) {
15131513 if (page_has_buffers(page)) {
1514− tail_index = pos & (PAGE_CACHE_SIZE - 1);
1514+ tail_index = pos & (PAGE_SIZE - 1);
15151515 cur_index = 0;
15161516 head = page_buffers(page);
15171517 bh = head;
fs/reiserfs/tail_conversion.c+2−2
@@ -151,7 +151,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, · 150 unmodified lines
151151 */
152152 if (up_to_date_bh) {
153153 unsigned pgoff =
154− (tail_offset + total_tail - 1) & (PAGE_CACHE_SIZE - 1);
154+ (tail_offset + total_tail - 1) & (PAGE_SIZE - 1);
155155 char *kaddr = kmap_atomic(up_to_date_bh->b_page);
156156 memset(kaddr + pgoff, 0, blk_size - total_tail);
157157 kunmap_atomic(kaddr);
@@ -271,7 +271,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, · 113 unmodified lines
271271 * the page was locked and this part of the page was up to date when
272272 * indirect2direct was called, so we know the bytes are still valid
273273 */
274− tail = tail + (pos & (PAGE_CACHE_SIZE - 1));
274+ tail = tail + (pos & (PAGE_SIZE - 1));
275275
276276 PATH_LAST_POSITION(path)++;
277277
fs/reiserfs/xattr.c+9−9
@@ -415,7 +415,7 @@ out: · 414 unmodified lines
415415 static inline void reiserfs_put_page(struct page *page)
416416 {
417417 kunmap(page);
418− page_cache_release(page);
418+ put_page(page);
419419 }
420420
421421 static struct page *reiserfs_get_page(struct inode *dir, size_t n)
@@ -427,7 +427,7 @@ static struct page *reiserfs_get_page(struct inode *dir, size_t n) · 5 unmodified lines
427427 * and an unlink/rmdir has just occurred - GFP_NOFS avoids this
428428 */
429429 mapping_set_gfp_mask(mapping, GFP_NOFS);
430− page = read_mapping_page(mapping, n >> PAGE_CACHE_SHIFT, NULL);
430+ page = read_mapping_page(mapping, n >> PAGE_SHIFT, NULL);
431431 if (!IS_ERR(page)) {
432432 kmap(page);
433433 if (PageError(page))
@@ -526,10 +526,10 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th, · 92 unmodified lines
526526 while (buffer_pos < buffer_size || buffer_pos == 0) {
527527 size_t chunk;
528528 size_t skip = 0;
529− size_t page_offset = (file_pos & (PAGE_CACHE_SIZE - 1));
529+ size_t page_offset = (file_pos & (PAGE_SIZE - 1));
530530
531− if (buffer_size - buffer_pos > PAGE_CACHE_SIZE)
532− chunk = PAGE_CACHE_SIZE;
531+ if (buffer_size - buffer_pos > PAGE_SIZE)
532+ chunk = PAGE_SIZE;
533533 else
534534 chunk = buffer_size - buffer_pos;
535535
@@ -546,8 +546,8 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th, · 10 unmodified lines
546546 struct reiserfs_xattr_header *rxh;
547547
548548 skip = file_pos = sizeof(struct reiserfs_xattr_header);
549− if (chunk + skip > PAGE_CACHE_SIZE)
550− chunk = PAGE_CACHE_SIZE - skip;
549+ if (chunk + skip > PAGE_SIZE)
550+ chunk = PAGE_SIZE - skip;
551551 rxh = (struct reiserfs_xattr_header *)data;
552552 rxh->h_magic = cpu_to_le32(REISERFS_XATTR_MAGIC);
553553 rxh->h_hash = cpu_to_le32(xahash);
@@ -675,8 +675,8 @@ reiserfs_xattr_get(struct inode *inode, const char *name, void *buffer, · 121 unmodified lines
675675 char *data;
676676 size_t skip = 0;
677677
678− if (isize - file_pos > PAGE_CACHE_SIZE)
679− chunk = PAGE_CACHE_SIZE;
678+ if (isize - file_pos > PAGE_SIZE)
679+ chunk = PAGE_SIZE;
680680 else
681681 chunk = isize - file_pos;
682682
fs/splice.c+16−16
@@ -88,7 +88,7 @@ out_unlock: · 87 unmodified lines
8888 static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe,
8989 struct pipe_buffer *buf)
9090 {
91− page_cache_release(buf->page);
91+ put_page(buf->page);
9292 buf->flags &= ~PIPE_BUF_FLAG_LRU;
9393 }
9494
@@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(splice_to_pipe); · 173 unmodified lines
268268
269269 void spd_release_page(struct splice_pipe_desc *spd, unsigned int i)
270270 {
271− page_cache_release(spd->pages[i]);
271+ put_page(spd->pages[i]);
272272 }
273273
274274 /*
@@ -328,9 +328,9 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, · 53 unmodified lines
328328 if (splice_grow_spd(pipe, &spd))
329329 return -ENOMEM;
330330
331− index = *ppos >> PAGE_CACHE_SHIFT;
332− loff = *ppos & ~PAGE_CACHE_MASK;
333− req_pages = (len + loff + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
331+ index = *ppos >> PAGE_SHIFT;
332+ loff = *ppos & ~PAGE_MASK;
333+ req_pages = (len + loff + PAGE_SIZE - 1) >> PAGE_SHIFT;
334334 nr_pages = min(req_pages, spd.nr_pages_max);
335335
336336 /*
@@ -365,7 +365,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, · 28 unmodified lines
365365 error = add_to_page_cache_lru(page, mapping, index,
366366 mapping_gfp_constraint(mapping, GFP_KERNEL));
367367 if (unlikely(error)) {
368− page_cache_release(page);
368+ put_page(page);
369369 if (error == -EEXIST)
370370 continue;
371371 break;
@@ -385,7 +385,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, · 13 unmodified lines
385385 * Now loop over the map and see if we need to start IO on any
386386 * pages, fill in the partial map, etc.
387387 */
388− index = *ppos >> PAGE_CACHE_SHIFT;
388+ index = *ppos >> PAGE_SHIFT;
389389 nr_pages = spd.nr_pages;
390390 spd.nr_pages = 0;
391391 for (page_nr = 0; page_nr < nr_pages; page_nr++) {
@@ -397,7 +397,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, · 5 unmodified lines
397397 /*
398398 * this_len is the max we'll use from this page
399399 */
400− this_len = min_t(unsigned long, len, PAGE_CACHE_SIZE - loff);
400+ this_len = min_t(unsigned long, len, PAGE_SIZE - loff);
401401 page = spd.pages[page_nr];
402402
403403 if (PageReadahead(page))
@@ -426,7 +426,7 @@ retry_lookup: · 22 unmodified lines
426426 error = -ENOMEM;
427427 break;
428428 }
429− page_cache_release(spd.pages[page_nr]);
429+ put_page(spd.pages[page_nr]);
430430 spd.pages[page_nr] = page;
431431 }
432432 /*
@@ -456,7 +456,7 @@ fill_it: · 23 unmodified lines
456456 * i_size must be checked after PageUptodate.
457457 */
458458 isize = i_size_read(mapping->host);
459− end_index = (isize - 1) >> PAGE_CACHE_SHIFT;
459+ end_index = (isize - 1) >> PAGE_SHIFT;
460460 if (unlikely(!isize || index > end_index))
461461 break;
462462
@@ -470,7 +470,7 @@ fill_it: · 7 unmodified lines
470470 /*
471471 * max good bytes in this page
472472 */
473− plen = ((isize - 1) & ~PAGE_CACHE_MASK) + 1;
473+ plen = ((isize - 1) & ~PAGE_MASK) + 1;
474474 if (plen <= loff)
475475 break;
476476
@@ -494,8 +494,8 @@ fill_it: · 17 unmodified lines
494494 * we got, 'nr_pages' is how many pages are in the map.
495495 */
496496 while (page_nr < nr_pages)
497− page_cache_release(spd.pages[page_nr++]);
498− in->f_ra.prev_pos = (loff_t)index << PAGE_CACHE_SHIFT;
497+ put_page(spd.pages[page_nr++]);
498+ in->f_ra.prev_pos = (loff_t)index << PAGE_SHIFT;
499499
500500 if (spd.nr_pages)
501501 error = splice_to_pipe(pipe, &spd);
@@ -636,8 +636,8 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos, · 134 unmodified lines
636636 goto shrink_ret;
637637 }
638638
639− offset = *ppos & ~PAGE_CACHE_MASK;
640− nr_pages = (len + offset + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
639+ offset = *ppos & ~PAGE_MASK;
640+ nr_pages = (len + offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
641641
642642 for (i = 0; i < nr_pages && i < spd.nr_pages_max && len; i++) {
643643 struct page *page;
@@ -647,7 +647,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos, · 3 unmodified lines
647647 if (!page)
648648 goto err;
649649
650− this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset);
650+ this_len = min_t(size_t, len, PAGE_SIZE - offset);
651651 vec[i].iov_base = (void __user *) page_address(page);
652652 vec[i].iov_len = this_len;
653653 spd.pages[i] = page;
fs/squashfs/block.c+2−2
@@ -181,11 +181,11 @@ int squashfs_read_data(struct super_block *sb, u64 index, int length, · 180 unmodified lines
181181 in = min(bytes, msblk->devblksize - offset);
182182 bytes -= in;
183183 while (in) {
184− if (pg_offset == PAGE_CACHE_SIZE) {
184+ if (pg_offset == PAGE_SIZE) {
185185 data = squashfs_next_page(output);
186186 pg_offset = 0;
187187 }
188− avail = min_t(int, in, PAGE_CACHE_SIZE -
188+ avail = min_t(int, in, PAGE_SIZE -
189189 pg_offset);
190190 memcpy(data + pg_offset, bh[k]->b_data + offset,
191191 avail);
fs/squashfs/cache.c+7−7
@@ -255,7 +255,7 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries, · 254 unmodified lines
255255 cache->unused = entries;
256256 cache->entries = entries;
257257 cache->block_size = block_size;
258− cache->pages = block_size >> PAGE_CACHE_SHIFT;
258+ cache->pages = block_size >> PAGE_SHIFT;
259259 cache->pages = cache->pages ? cache->pages : 1;
260260 cache->name = name;
261261 cache->num_waiters = 0;
@@ -275,7 +275,7 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries, · 13 unmodified lines
275275 }
276276
277277 for (j = 0; j < cache->pages; j++) {
278− entry->data[j] = kmalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
278+ entry->data[j] = kmalloc(PAGE_SIZE, GFP_KERNEL);
279279 if (entry->data[j] == NULL) {
280280 ERROR("Failed to allocate %s buffer\n", name);
281281 goto cleanup;
@@ -314,10 +314,10 @@ int squashfs_copy_data(void *buffer, struct squashfs_cache_entry *entry, · 32 unmodified lines
314314 return min(length, entry->length - offset);
315315
316316 while (offset < entry->length) {
317− void *buff = entry->data[offset / PAGE_CACHE_SIZE]
318− + (offset % PAGE_CACHE_SIZE);
317+ void *buff = entry->data[offset / PAGE_SIZE]
318+ + (offset % PAGE_SIZE);
319319 int bytes = min_t(int, entry->length - offset,
320− PAGE_CACHE_SIZE - (offset % PAGE_CACHE_SIZE));
320+ PAGE_SIZE - (offset % PAGE_SIZE));
321321
322322 if (bytes >= remaining) {
323323 memcpy(buffer, buff, remaining);
@@ -415,7 +415,7 @@ struct squashfs_cache_entry *squashfs_get_datablock(struct super_block *sb, · 91 unmodified lines
415415 */
416416 void *squashfs_read_table(struct super_block *sb, u64 block, int length)
417417 {
418− int pages = (length + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
418+ int pages = (length + PAGE_SIZE - 1) >> PAGE_SHIFT;
419419 int i, res;
420420 void *table, *buffer, **data;
421421 struct squashfs_page_actor *actor;
@@ -436,7 +436,7 @@ void *squashfs_read_table(struct super_block *sb, u64 block, int length) · 14 unmodified lines
436436 goto failed2;
437437 }
438438
439− for (i = 0; i < pages; i++, buffer += PAGE_CACHE_SIZE)
439+ for (i = 0; i < pages; i++, buffer += PAGE_SIZE)
440440 data[i] = buffer;
441441
442442 res = squashfs_read_data(sb, block, length |
fs/squashfs/decompressor.c+1−1
@@ -102,7 +102,7 @@ static void *get_comp_opts(struct super_block *sb, unsigned short flags) · 101 unmodified lines
102102 * Read decompressor specific options from file system if present
103103 */
104104 if (SQUASHFS_COMP_OPTS(flags)) {
105− buffer = kmalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
105+ buffer = kmalloc(PAGE_SIZE, GFP_KERNEL);
106106 if (buffer == NULL) {
107107 comp_opts = ERR_PTR(-ENOMEM);
108108 goto out;
fs/squashfs/file.c+11−11
@@ -175,7 +175,7 @@ static long long read_indexes(struct super_block *sb, int n, · 174 unmodified lines
175175 {
176176 int err, i;
177177 long long block = 0;
178− __le32 *blist = kmalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
178+ __le32 *blist = kmalloc(PAGE_SIZE, GFP_KERNEL);
179179
180180 if (blist == NULL) {
181181 ERROR("read_indexes: Failed to allocate block_list\n");
@@ -183,7 +183,7 @@ static long long read_indexes(struct super_block *sb, int n, · 1 unmodified line
183183 }
184184
185185 while (n) {
186− int blocks = min_t(int, n, PAGE_CACHE_SIZE >> 2);
186+ int blocks = min_t(int, n, PAGE_SIZE >> 2);
187187
188188 err = squashfs_read_metadata(sb, blist, start_block,
189189 offset, blocks << 2);
@@ -377,7 +377,7 @@ void squashfs_copy_cache(struct page *page, struct squashfs_cache_entry *buffer, · 187 unmodified lines
377377 struct inode *inode = page->mapping->host;
378378 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
379379 void *pageaddr;
380− int i, mask = (1 << (msblk->block_log - PAGE_CACHE_SHIFT)) - 1;
380+ int i, mask = (1 << (msblk->block_log - PAGE_SHIFT)) - 1;
381381 int start_index = page->index & ~mask, end_index = start_index | mask;
382382
383383 /*
@@ -387,9 +387,9 @@ void squashfs_copy_cache(struct page *page, struct squashfs_cache_entry *buffer, · 3 unmodified lines
387387 * been called to fill.
388388 */
389389 for (i = start_index; i <= end_index && bytes > 0; i++,
390− bytes -= PAGE_CACHE_SIZE, offset += PAGE_CACHE_SIZE) {
390+ bytes -= PAGE_SIZE, offset += PAGE_SIZE) {
391391 struct page *push_page;
392− int avail = buffer ? min_t(int, bytes, PAGE_CACHE_SIZE) : 0;
392+ int avail = buffer ? min_t(int, bytes, PAGE_SIZE) : 0;
393393
394394 TRACE("bytes %d, i %d, available_bytes %d\n", bytes, i, avail);
395395
@@ -404,14 +404,14 @@ void squashfs_copy_cache(struct page *page, struct squashfs_cache_entry *buffer, · 8 unmodified lines
404404
405405 pageaddr = kmap_atomic(push_page);
406406 squashfs_copy_data(pageaddr, buffer, offset, avail);
407− memset(pageaddr + avail, 0, PAGE_CACHE_SIZE - avail);
407+ memset(pageaddr + avail, 0, PAGE_SIZE - avail);
408408 kunmap_atomic(pageaddr);
409409 flush_dcache_page(push_page);
410410 SetPageUptodate(push_page);
411411 skip_page:
412412 unlock_page(push_page);
413413 if (i != page->index)
414− page_cache_release(push_page);
414+ put_page(push_page);
415415 }
416416 }
417417
@@ -454,7 +454,7 @@ static int squashfs_readpage(struct file *file, struct page *page) · 36 unmodified lines
454454 {
455455 struct inode *inode = page->mapping->host;
456456 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
457− int index = page->index >> (msblk->block_log - PAGE_CACHE_SHIFT);
457+ int index = page->index >> (msblk->block_log - PAGE_SHIFT);
458458 int file_end = i_size_read(inode) >> msblk->block_log;
459459 int res;
460460 void *pageaddr;
@@ -462,8 +462,8 @@ static int squashfs_readpage(struct file *file, struct page *page) · 1 unmodified line
462462 TRACE("Entered squashfs_readpage, page index %lx, start block %llx\n",
463463 page->index, squashfs_i(inode)->start);
464464
465− if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
466− PAGE_CACHE_SHIFT))
465+ if (page->index >= ((i_size_read(inode) + PAGE_SIZE - 1) >>
466+ PAGE_SHIFT))
467467 goto out;
468468
469469 if (index < file_end || squashfs_i(inode)->fragment_block ==
@@ -487,7 +487,7 @@ error_out: · 17 unmodified lines
487487 SetPageError(page);
488488 out:
489489 pageaddr = kmap_atomic(page);
490− memset(pageaddr, 0, PAGE_CACHE_SIZE);
490+ memset(pageaddr, 0, PAGE_SIZE);
491491 kunmap_atomic(pageaddr);
492492 flush_dcache_page(page);
493493 if (!PageError(page))
fs/squashfs/file_direct.c+11−11
@@ -30,8 +30,8 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize) · 29 unmodified lines
3030 struct inode *inode = target_page->mapping->host;
3131 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
3232
33− int file_end = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
34− int mask = (1 << (msblk->block_log - PAGE_CACHE_SHIFT)) - 1;
33+ int file_end = (i_size_read(inode) - 1) >> PAGE_SHIFT;
34+ int mask = (1 << (msblk->block_log - PAGE_SHIFT)) - 1;
3535 int start_index = target_page->index & ~mask;
3636 int end_index = start_index | mask;
3737 int i, n, pages, missing_pages, bytes, res = -ENOMEM;
@@ -68,7 +68,7 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize) · 30 unmodified lines
6868
6969 if (PageUptodate(page[i])) {
7070 unlock_page(page[i]);
71− page_cache_release(page[i]);
71+ put_page(page[i]);
7272 page[i] = NULL;
7373 missing_pages++;
7474 }
@@ -96,10 +96,10 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize) · 21 unmodified lines
9696 goto mark_errored;
9797
9898 /* Last page may have trailing bytes not filled */
99− bytes = res % PAGE_CACHE_SIZE;
99+ bytes = res % PAGE_SIZE;
100100 if (bytes) {
101101 pageaddr = kmap_atomic(page[pages - 1]);
102− memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
102+ memset(pageaddr + bytes, 0, PAGE_SIZE - bytes);
103103 kunmap_atomic(pageaddr);
104104 }
105105
@@ -109,7 +109,7 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize) · 3 unmodified lines
109109 SetPageUptodate(page[i]);
110110 unlock_page(page[i]);
111111 if (page[i] != target_page)
112− page_cache_release(page[i]);
112+ put_page(page[i]);
113113 }
114114
115115 kfree(actor);
@@ -127,7 +127,7 @@ mark_errored: · 11 unmodified lines
127127 flush_dcache_page(page[i]);
128128 SetPageError(page[i]);
129129 unlock_page(page[i]);
130− page_cache_release(page[i]);
130+ put_page(page[i]);
131131 }
132132
133133 out:
@@ -153,21 +153,21 @@ static int squashfs_read_cache(struct page *target_page, u64 block, int bsize, · 19 unmodified lines
153153 }
154154
155155 for (n = 0; n < pages && bytes > 0; n++,
156− bytes -= PAGE_CACHE_SIZE, offset += PAGE_CACHE_SIZE) {
157− int avail = min_t(int, bytes, PAGE_CACHE_SIZE);
156+ bytes -= PAGE_SIZE, offset += PAGE_SIZE) {
157+ int avail = min_t(int, bytes, PAGE_SIZE);
158158
159159 if (page[n] == NULL)
160160 continue;
161161
162162 pageaddr = kmap_atomic(page[n]);
163163 squashfs_copy_data(pageaddr, buffer, offset, avail);
164− memset(pageaddr + avail, 0, PAGE_CACHE_SIZE - avail);
164+ memset(pageaddr + avail, 0, PAGE_SIZE - avail);
165165 kunmap_atomic(pageaddr);
166166 flush_dcache_page(page[n]);
167167 SetPageUptodate(page[n]);
168168 unlock_page(page[n]);
169169 if (page[n] != target_page)
170− page_cache_release(page[n]);
170+ put_page(page[n]);
171171 }
172172
173173 out:
fs/squashfs/lz4_wrapper.c+4−4
@@ -117,13 +117,13 @@ static int lz4_uncompress(struct squashfs_sb_info *msblk, void *strm, · 116 unmodified lines
117117 data = squashfs_first_page(output);
118118 buff = stream->output;
119119 while (data) {
120− if (bytes <= PAGE_CACHE_SIZE) {
120+ if (bytes <= PAGE_SIZE) {
121121 memcpy(data, buff, bytes);
122122 break;
123123 }
124− memcpy(data, buff, PAGE_CACHE_SIZE);
125− buff += PAGE_CACHE_SIZE;
126− bytes -= PAGE_CACHE_SIZE;
124+ memcpy(data, buff, PAGE_SIZE);
125+ buff += PAGE_SIZE;
126+ bytes -= PAGE_SIZE;
127127 data = squashfs_next_page(output);
128128 }
129129 squashfs_finish_page(output);
fs/squashfs/lzo_wrapper.c+4−4
@@ -102,13 +102,13 @@ static int lzo_uncompress(struct squashfs_sb_info *msblk, void *strm, · 101 unmodified lines
102102 data = squashfs_first_page(output);
103103 buff = stream->output;
104104 while (data) {
105− if (bytes <= PAGE_CACHE_SIZE) {
105+ if (bytes <= PAGE_SIZE) {
106106 memcpy(data, buff, bytes);
107107 break;
108108 } else {
109− memcpy(data, buff, PAGE_CACHE_SIZE);
110− buff += PAGE_CACHE_SIZE;
111− bytes -= PAGE_CACHE_SIZE;
109+ memcpy(data, buff, PAGE_SIZE);
110+ buff += PAGE_SIZE;
111+ bytes -= PAGE_SIZE;
112112 data = squashfs_next_page(output);
113113 }
114114 }
fs/squashfs/page_actor.c+2−2
@@ -48,7 +48,7 @@ struct squashfs_page_actor *squashfs_page_actor_init(void **buffer, · 47 unmodified lines
4848 if (actor == NULL)
4949 return NULL;
5050
51− actor->length = length ? : pages * PAGE_CACHE_SIZE;
51+ actor->length = length ? : pages * PAGE_SIZE;
5252 actor->buffer = buffer;
5353 actor->pages = pages;
5454 actor->next_page = 0;
@@ -88,7 +88,7 @@ struct squashfs_page_actor *squashfs_page_actor_init_special(struct page **page, · 33 unmodified lines
8888 if (actor == NULL)
8989 return NULL;
9090
91− actor->length = length ? : pages * PAGE_CACHE_SIZE;
91+ actor->length = length ? : pages * PAGE_SIZE;
9292 actor->page = page;
9393 actor->pages = pages;
9494 actor->next_page = 0;
fs/squashfs/page_actor.h+1−1
@@ -24,7 +24,7 @@ static inline struct squashfs_page_actor *squashfs_page_actor_init(void **page, · 23 unmodified lines
2424 if (actor == NULL)
2525 return NULL;
2626
27− actor->length = length ? : pages * PAGE_CACHE_SIZE;
27+ actor->length = length ? : pages * PAGE_SIZE;
2828 actor->page = page;
2929 actor->pages = pages;
3030 actor->next_page = 0;
fs/squashfs/super.c+1−1
@@ -152,7 +152,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent) · 151 unmodified lines
152152 * Check the system page size is not larger than the filesystem
153153 * block size (by default 128K). This is currently not supported.
154154 */
155− if (PAGE_CACHE_SIZE > msblk->block_size) {
155+ if (PAGE_SIZE > msblk->block_size) {
156156 ERROR("Page size > filesystem block size (%d). This is "
157157 "currently not supported!\n", msblk->block_size);
158158 goto failed_mount;
fs/squashfs/symlink.c+3−3
@@ -48,10 +48,10 @@ static int squashfs_symlink_readpage(struct file *file, struct page *page) · 47 unmodified lines
4848 struct inode *inode = page->mapping->host;
4949 struct super_block *sb = inode->i_sb;
5050 struct squashfs_sb_info *msblk = sb->s_fs_info;
51− int index = page->index << PAGE_CACHE_SHIFT;
51+ int index = page->index << PAGE_SHIFT;
5252 u64 block = squashfs_i(inode)->start;
5353 int offset = squashfs_i(inode)->offset;
54− int length = min_t(int, i_size_read(inode) - index, PAGE_CACHE_SIZE);
54+ int length = min_t(int, i_size_read(inode) - index, PAGE_SIZE);
5555 int bytes, copied;
5656 void *pageaddr;
5757 struct squashfs_cache_entry *entry;
@@ -94,7 +94,7 @@ static int squashfs_symlink_readpage(struct file *file, struct page *page) · 36 unmodified lines
9494 copied = squashfs_copy_data(pageaddr + bytes, entry, offset,
9595 length - bytes);
9696 if (copied == length - bytes)
97− memset(pageaddr + length, 0, PAGE_CACHE_SIZE - length);
97+ memset(pageaddr + length, 0, PAGE_SIZE - length);
9898 else
9999 block = entry->next_index;
100100 kunmap_atomic(pageaddr);
fs/squashfs/xz_wrapper.c+2−2
@@ -141,7 +141,7 @@ static int squashfs_xz_uncompress(struct squashfs_sb_info *msblk, void *strm, · 140 unmodified lines
141141 stream->buf.in_pos = 0;
142142 stream->buf.in_size = 0;
143143 stream->buf.out_pos = 0;
144− stream->buf.out_size = PAGE_CACHE_SIZE;
144+ stream->buf.out_size = PAGE_SIZE;
145145 stream->buf.out = squashfs_first_page(output);
146146
147147 do {
@@ -158,7 +158,7 @@ static int squashfs_xz_uncompress(struct squashfs_sb_info *msblk, void *strm, · 10 unmodified lines
158158 stream->buf.out = squashfs_next_page(output);
159159 if (stream->buf.out != NULL) {
160160 stream->buf.out_pos = 0;
161− total += PAGE_CACHE_SIZE;
161+ total += PAGE_SIZE;
162162 }
163163 }
164164
fs/squashfs/zlib_wrapper.c+2−2
@@ -69,7 +69,7 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void *strm, · 68 unmodified lines
6969 int zlib_err, zlib_init = 0, k = 0;
7070 z_stream *stream = strm;
7171
72− stream->avail_out = PAGE_CACHE_SIZE;
72+ stream->avail_out = PAGE_SIZE;
7373 stream->next_out = squashfs_first_page(output);
7474 stream->avail_in = 0;
7575
@@ -85,7 +85,7 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void *strm, · 9 unmodified lines
8585 if (stream->avail_out == 0) {
8686 stream->next_out = squashfs_next_page(output);
8787 if (stream->next_out != NULL)
88− stream->avail_out = PAGE_CACHE_SIZE;
88+ stream->avail_out = PAGE_SIZE;
8989 }
9090
9191 if (!zlib_init) {
fs/sync.c+2−2
@@ -302,7 +302,7 @@ SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, · 301 unmodified lines
302302 goto out;
303303
304304 if (sizeof(pgoff_t) == 4) {
305− if (offset >= (0x100000000ULL << PAGE_CACHE_SHIFT)) {
305+ if (offset >= (0x100000000ULL << PAGE_SHIFT)) {
306306 /*
307307 * The range starts outside a 32 bit machine's
308308 * pagecache addressing capabilities. Let it "succeed"
@@ -310,7 +310,7 @@ SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, · 1 unmodified line
310310 ret = 0;
311311 goto out;
312312 }
313− if (endbyte >= (0x100000000ULL << PAGE_CACHE_SHIFT)) {
313+ if (endbyte >= (0x100000000ULL << PAGE_SHIFT)) {
314314 /*
315315 * Out to EOF
316316 */
fs/sysv/dir.c+9−9
@@ -30,7 +30,7 @@ const struct file_operations sysv_dir_operations = { · 29 unmodified lines
3030 static inline void dir_put_page(struct page *page)
3131 {
3232 kunmap(page);
33− page_cache_release(page);
33+ put_page(page);
3434 }
3535
3636 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len)
@@ -73,8 +73,8 @@ static int sysv_readdir(struct file *file, struct dir_context *ctx) · 36 unmodified lines
7373 if (pos >= inode->i_size)
7474 return 0;
7575
76− offset = pos & ~PAGE_CACHE_MASK;
77− n = pos >> PAGE_CACHE_SHIFT;
76+ offset = pos & ~PAGE_MASK;
77+ n = pos >> PAGE_SHIFT;
7878
7979 for ( ; n < npages; n++, offset = 0) {
8080 char *kaddr, *limit;
@@ -85,7 +85,7 @@ static int sysv_readdir(struct file *file, struct dir_context *ctx) · 4 unmodified lines
8585 continue;
8686 kaddr = (char *)page_address(page);
8787 de = (struct sysv_dir_entry *)(kaddr+offset);
88− limit = kaddr + PAGE_CACHE_SIZE - SYSV_DIRSIZE;
88+ limit = kaddr + PAGE_SIZE - SYSV_DIRSIZE;
8989 for ( ;(char*)de <= limit; de++, ctx->pos += sizeof(*de)) {
9090 char *name = de->name;
9191
@@ -146,7 +146,7 @@ struct sysv_dir_entry *sysv_find_entry(struct dentry *dentry, struct page **res_ · 54 unmodified lines
146146 if (!IS_ERR(page)) {
147147 kaddr = (char*)page_address(page);
148148 de = (struct sysv_dir_entry *) kaddr;
149− kaddr += PAGE_CACHE_SIZE - SYSV_DIRSIZE;
149+ kaddr += PAGE_SIZE - SYSV_DIRSIZE;
150150 for ( ; (char *) de <= kaddr ; de++) {
151151 if (!de->inode)
152152 continue;
@@ -190,7 +190,7 @@ int sysv_add_link(struct dentry *dentry, struct inode *inode) · 37 unmodified lines
190190 goto out;
191191 kaddr = (char*)page_address(page);
192192 de = (struct sysv_dir_entry *)kaddr;
193− kaddr += PAGE_CACHE_SIZE - SYSV_DIRSIZE;
193+ kaddr += PAGE_SIZE - SYSV_DIRSIZE;
194194 while ((char *)de <= kaddr) {
195195 if (!de->inode)
196196 goto got_it;
@@ -261,7 +261,7 @@ int sysv_make_empty(struct inode *inode, struct inode *dir) · 64 unmodified lines
261261 kmap(page);
262262
263263 base = (char*)page_address(page);
264− memset(base, 0, PAGE_CACHE_SIZE);
264+ memset(base, 0, PAGE_SIZE);
265265
266266 de = (struct sysv_dir_entry *) base;
267267 de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino);
@@ -273,7 +273,7 @@ int sysv_make_empty(struct inode *inode, struct inode *dir) · 5 unmodified lines
273273 kunmap(page);
274274 err = dir_commit_chunk(page, 0, 2 * SYSV_DIRSIZE);
275275 fail:
276− page_cache_release(page);
276+ put_page(page);
277277 return err;
278278 }
279279
@@ -296,7 +296,7 @@ int sysv_empty_dir(struct inode * inode) · 16 unmodified lines
296296
297297 kaddr = (char *)page_address(page);
298298 de = (struct sysv_dir_entry *)kaddr;
299− kaddr += PAGE_CACHE_SIZE-SYSV_DIRSIZE;
299+ kaddr += PAGE_SIZE-SYSV_DIRSIZE;
300300
301301 for ( ;(char *)de <= kaddr; de++) {
302302 if (!de->inode)
fs/sysv/namei.c+2−2
@@ -264,11 +264,11 @@ static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry, · 263 unmodified lines
264264 out_dir:
265265 if (dir_de) {
266266 kunmap(dir_page);
267− page_cache_release(dir_page);
267+ put_page(dir_page);
268268 }
269269 out_old:
270270 kunmap(old_page);
271− page_cache_release(old_page);
271+ put_page(old_page);
272272 out:
273273 return err;
274274 }
fs/ubifs/file.c+26−26
@@ -121,7 +121,7 @@ static int do_readpage(struct page *page) · 120 unmodified lines
121121 if (block >= beyond) {
122122 /* Reading beyond inode */
123123 SetPageChecked(page);
124− memset(addr, 0, PAGE_CACHE_SIZE);
124+ memset(addr, 0, PAGE_SIZE);
125125 goto out;
126126 }
127127
@@ -223,7 +223,7 @@ static int write_begin_slow(struct address_space *mapping, · 95 unmodified lines
223223 {
224224 struct inode *inode = mapping->host;
225225 struct ubifs_info *c = inode->i_sb->s_fs_info;
226− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
226+ pgoff_t index = pos >> PAGE_SHIFT;
227227 struct ubifs_budget_req req = { .new_page = 1 };
228228 int uninitialized_var(err), appending = !!(pos + len > inode->i_size);
229229 struct page *page;
@@ -254,13 +254,13 @@ static int write_begin_slow(struct address_space *mapping, · 24 unmodified lines
254254 }
255255
256256 if (!PageUptodate(page)) {
257− if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE)
257+ if (!(pos & ~PAGE_MASK) && len == PAGE_SIZE)
258258 SetPageChecked(page);
259259 else {
260260 err = do_readpage(page);
261261 if (err) {
262262 unlock_page(page);
263− page_cache_release(page);
263+ put_page(page);
264264 ubifs_release_budget(c, &req);
265265 return err;
266266 }
@@ -428,7 +428,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, · 161 unmodified lines
428428 struct inode *inode = mapping->host;
429429 struct ubifs_info *c = inode->i_sb->s_fs_info;
430430 struct ubifs_inode *ui = ubifs_inode(inode);
431− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
431+ pgoff_t index = pos >> PAGE_SHIFT;
432432 int uninitialized_var(err), appending = !!(pos + len > inode->i_size);
433433 int skipped_read = 0;
434434 struct page *page;
@@ -446,7 +446,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, · 11 unmodified lines
446446
447447 if (!PageUptodate(page)) {
448448 /* The page is not loaded from the flash */
449− if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) {
449+ if (!(pos & ~PAGE_MASK) && len == PAGE_SIZE) {
450450 /*
451451 * We change whole page so no need to load it. But we
452452 * do not know whether this page exists on the media or
@@ -462,7 +462,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, · 9 unmodified lines
462462 err = do_readpage(page);
463463 if (err) {
464464 unlock_page(page);
465− page_cache_release(page);
465+ put_page(page);
466466 return err;
467467 }
468468 }
@@ -494,7 +494,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, · 25 unmodified lines
494494 mutex_unlock(&ui->ui_mutex);
495495 }
496496 unlock_page(page);
497− page_cache_release(page);
497+ put_page(page);
498498
499499 return write_begin_slow(mapping, pos, len, pagep, flags);
500500 }
@@ -549,7 +549,7 @@ static int ubifs_write_end(struct file *file, struct address_space *mapping, · 48 unmodified lines
549549 dbg_gen("ino %lu, pos %llu, pg %lu, len %u, copied %d, i_size %lld",
550550 inode->i_ino, pos, page->index, len, copied, inode->i_size);
551551
552− if (unlikely(copied < len && len == PAGE_CACHE_SIZE)) {
552+ if (unlikely(copied < len && len == PAGE_SIZE)) {
553553 /*
554554 * VFS copied less data to the page that it intended and
555555 * declared in its '->write_begin()' call via the @len
@@ -593,7 +593,7 @@ static int ubifs_write_end(struct file *file, struct address_space *mapping, · 37 unmodified lines
593593
594594 out:
595595 unlock_page(page);
596− page_cache_release(page);
596+ put_page(page);
597597 return copied;
598598 }
599599
@@ -621,10 +621,10 @@ static int populate_page(struct ubifs_info *c, struct page *page, · 21 unmodified lines
621621
622622 addr = zaddr = kmap(page);
623623
624− end_index = (i_size - 1) >> PAGE_CACHE_SHIFT;
624+ end_index = (i_size - 1) >> PAGE_SHIFT;
625625 if (!i_size || page->index > end_index) {
626626 hole = 1;
627− memset(addr, 0, PAGE_CACHE_SIZE);
627+ memset(addr, 0, PAGE_SIZE);
628628 goto out_hole;
629629 }
630630
@@ -673,7 +673,7 @@ static int populate_page(struct ubifs_info *c, struct page *page, · 42 unmodified lines
673673 }
674674
675675 if (end_index == page->index) {
676− int len = i_size & (PAGE_CACHE_SIZE - 1);
676+ int len = i_size & (PAGE_SIZE - 1);
677677
678678 if (len && len < read)
679679 memset(zaddr + len, 0, read - len);
@@ -773,7 +773,7 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu, · 93 unmodified lines
773773 isize = i_size_read(inode);
774774 if (isize == 0)
775775 goto out_free;
776− end_index = ((isize - 1) >> PAGE_CACHE_SHIFT);
776+ end_index = ((isize - 1) >> PAGE_SHIFT);
777777
778778 for (page_idx = 1; page_idx < page_cnt; page_idx++) {
779779 pgoff_t page_offset = offset + page_idx;
@@ -788,7 +788,7 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu, · 8 unmodified lines
788788 if (!PageUptodate(page))
789789 err = populate_page(c, page, bu, &n);
790790 unlock_page(page);
791− page_cache_release(page);
791+ put_page(page);
792792 if (err)
793793 break;
794794 }
@@ -905,7 +905,7 @@ static int do_writepage(struct page *page, int len) · 110 unmodified lines
905905 #ifdef UBIFS_DEBUG
906906 struct ubifs_inode *ui = ubifs_inode(inode);
907907 spin_lock(&ui->ui_lock);
908− ubifs_assert(page->index <= ui->synced_i_size >> PAGE_CACHE_SHIFT);
908+ ubifs_assert(page->index <= ui->synced_i_size >> PAGE_SHIFT);
909909 spin_unlock(&ui->ui_lock);
910910 #endif
911911
@@ -1001,8 +1001,8 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc) · 89 unmodified lines
10011001 struct inode *inode = page->mapping->host;
10021002 struct ubifs_inode *ui = ubifs_inode(inode);
10031003 loff_t i_size = i_size_read(inode), synced_i_size;
1004− pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
1005− int err, len = i_size & (PAGE_CACHE_SIZE - 1);
1004+ pgoff_t end_index = i_size >> PAGE_SHIFT;
1005+ int err, len = i_size & (PAGE_SIZE - 1);
10061006 void *kaddr;
10071007
10081008 dbg_gen("ino %lu, pg %lu, pg flags %#lx",
@@ -1021,7 +1021,7 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc) · 12 unmodified lines
10211021
10221022 /* Is the page fully inside @i_size? */
10231023 if (page->index < end_index) {
1024− if (page->index >= synced_i_size >> PAGE_CACHE_SHIFT) {
1024+ if (page->index >= synced_i_size >> PAGE_SHIFT) {
10251025 err = inode->i_sb->s_op->write_inode(inode, NULL);
10261026 if (err)
10271027 goto out_unlock;
@@ -1034,7 +1034,7 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc) · 6 unmodified lines
10341034 * with this.
10351035 */
10361036 }
1037− return do_writepage(page, PAGE_CACHE_SIZE);
1037+ return do_writepage(page, PAGE_SIZE);
10381038 }
10391039
10401040 /*
@@ -1045,7 +1045,7 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc) · 4 unmodified lines
10451045 * writes to that region are not written out to the file."
10461046 */
10471047 kaddr = kmap_atomic(page);
1048− memset(kaddr + len, 0, PAGE_CACHE_SIZE - len);
1048+ memset(kaddr + len, 0, PAGE_SIZE - len);
10491049 flush_dcache_page(page);
10501050 kunmap_atomic(kaddr);
10511051
@@ -1138,7 +1138,7 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode, · 86 unmodified lines
11381138 truncate_setsize(inode, new_size);
11391139
11401140 if (offset) {
1141− pgoff_t index = new_size >> PAGE_CACHE_SHIFT;
1141+ pgoff_t index = new_size >> PAGE_SHIFT;
11421142 struct page *page;
11431143
11441144 page = find_lock_page(inode->i_mapping, index);
@@ -1157,9 +1157,9 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode, · 12 unmodified lines
11571157 clear_page_dirty_for_io(page);
11581158 if (UBIFS_BLOCKS_PER_PAGE_SHIFT)
11591159 offset = new_size &
1160− (PAGE_CACHE_SIZE - 1);
1160+ (PAGE_SIZE - 1);
11611161 err = do_writepage(page, offset);
1162− page_cache_release(page);
1162+ put_page(page);
11631163 if (err)
11641164 goto out_budg;
11651165 /*
@@ -1173,7 +1173,7 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode, · 7 unmodified lines
11731173 * having to read it.
11741174 */
11751175 unlock_page(page);
1176− page_cache_release(page);
1176+ put_page(page);
11771177 }
11781178 }
11791179 }
@@ -1285,7 +1285,7 @@ static void ubifs_invalidatepage(struct page *page, unsigned int offset, · 105 unmodified lines
12851285 struct ubifs_info *c = inode->i_sb->s_fs_info;
12861286
12871287 ubifs_assert(PagePrivate(page));
1288− if (offset || length < PAGE_CACHE_SIZE)
1288+ if (offset || length < PAGE_SIZE)
12891289 /* Partial page remains dirty */
12901290 return;
12911291
fs/ubifs/super.c+2−2
@@ -2240,9 +2240,9 @@ static int __init ubifs_init(void) · 2239 unmodified lines
22402240 * We require that PAGE_CACHE_SIZE is greater-than-or-equal-to
22412241 * UBIFS_BLOCK_SIZE. It is assumed that both are powers of 2.
22422242 */
2243− if (PAGE_CACHE_SIZE < UBIFS_BLOCK_SIZE) {
2243+ if (PAGE_SIZE < UBIFS_BLOCK_SIZE) {
22442244 pr_err("UBIFS error (pid %d): VFS page cache size is %u bytes, but UBIFS requires at least 4096 bytes",
2245− current->pid, (unsigned int)PAGE_CACHE_SIZE);
2245+ current->pid, (unsigned int)PAGE_SIZE);
22462246 return -EINVAL;
22472247 }
22482248
fs/ubifs/ubifs.h+2−2
@@ -46,8 +46,8 @@ · 45 unmodified lines
4646 #define UBIFS_SUPER_MAGIC 0x24051905
4747
4848 /* Number of UBIFS blocks per VFS page */
49−#define UBIFS_BLOCKS_PER_PAGE (PAGE_CACHE_SIZE / UBIFS_BLOCK_SIZE)
50−#define UBIFS_BLOCKS_PER_PAGE_SHIFT (PAGE_CACHE_SHIFT - UBIFS_BLOCK_SHIFT)
49+#define UBIFS_BLOCKS_PER_PAGE (PAGE_SIZE / UBIFS_BLOCK_SIZE)
50+#define UBIFS_BLOCKS_PER_PAGE_SHIFT (PAGE_SHIFT - UBIFS_BLOCK_SHIFT)
5151
5252 /* "File system end of life" sequence number watermark */
5353 #define SQNUM_WARN_WATERMARK 0xFFFFFFFF00000000ULL
fs/udf/file.c+3−3
@@ -46,7 +46,7 @@ static void __udf_adinicb_readpage(struct page *page) · 45 unmodified lines
4646
4747 kaddr = kmap(page);
4848 memcpy(kaddr, iinfo->i_ext.i_data + iinfo->i_lenEAttr, inode->i_size);
49− memset(kaddr + inode->i_size, 0, PAGE_CACHE_SIZE - inode->i_size);
49+ memset(kaddr + inode->i_size, 0, PAGE_SIZE - inode->i_size);
5050 flush_dcache_page(page);
5151 SetPageUptodate(page);
5252 kunmap(page);
@@ -87,14 +87,14 @@ static int udf_adinicb_write_begin(struct file *file, · 34 unmodified lines
8787 {
8888 struct page *page;
8989
90− if (WARN_ON_ONCE(pos >= PAGE_CACHE_SIZE))
90+ if (WARN_ON_ONCE(pos >= PAGE_SIZE))
9191 return -EIO;
9292 page = grab_cache_page_write_begin(mapping, 0, flags);
9393 if (!page)
9494 return -ENOMEM;
9595 *pagep = page;
9696
97− if (!PageUptodate(page) && len != PAGE_CACHE_SIZE)
97+ if (!PageUptodate(page) && len != PAGE_SIZE)
9898 __udf_adinicb_readpage(page);
9999 return 0;
100100 }
fs/udf/inode.c+2−2
@@ -287,7 +287,7 @@ int udf_expand_file_adinicb(struct inode *inode) · 286 unmodified lines
287287 if (!PageUptodate(page)) {
288288 kaddr = kmap(page);
289289 memset(kaddr + iinfo->i_lenAlloc, 0x00,
290− PAGE_CACHE_SIZE - iinfo->i_lenAlloc);
290+ PAGE_SIZE - iinfo->i_lenAlloc);
291291 memcpy(kaddr, iinfo->i_ext.i_data + iinfo->i_lenEAttr,
292292 iinfo->i_lenAlloc);
293293 flush_dcache_page(page);
@@ -319,7 +319,7 @@ int udf_expand_file_adinicb(struct inode *inode) · 25 unmodified lines
319319 inode->i_data.a_ops = &udf_adinicb_aops;
320320 up_write(&iinfo->i_data_sem);
321321 }
322− page_cache_release(page);
322+ put_page(page);
323323 mark_inode_dirty(inode);
324324
325325 return err;
fs/ufs/balloc.c+3−3
@@ -237,7 +237,7 @@ static void ufs_change_blocknr(struct inode *inode, sector_t beg, · 236 unmodified lines
237237 sector_t newb, struct page *locked_page)
238238 {
239239 const unsigned blks_per_page =
240− 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits);
240+ 1 << (PAGE_SHIFT - inode->i_blkbits);
241241 const unsigned mask = blks_per_page - 1;
242242 struct address_space * const mapping = inode->i_mapping;
243243 pgoff_t index, cur_index, last_index;
@@ -255,9 +255,9 @@ static void ufs_change_blocknr(struct inode *inode, sector_t beg, · 11 unmodified lines
255255
256256 cur_index = locked_page->index;
257257 end = count + beg;
258− last_index = end >> (PAGE_CACHE_SHIFT - inode->i_blkbits);
258+ last_index = end >> (PAGE_SHIFT - inode->i_blkbits);
259259 for (i = beg; i < end; i = (i | mask) + 1) {
260− index = i >> (PAGE_CACHE_SHIFT - inode->i_blkbits);
260+ index = i >> (PAGE_SHIFT - inode->i_blkbits);
261261
262262 if (likely(cur_index != index)) {
263263 page = ufs_get_locked_page(mapping, index);
fs/ufs/dir.c+16−16
@@ -62,7 +62,7 @@ static int ufs_commit_chunk(struct page *page, loff_t pos, unsigned len) · 61 unmodified lines
6262 static inline void ufs_put_page(struct page *page)
6363 {
6464 kunmap(page);
65− page_cache_release(page);
65+ put_page(page);
6666 }
6767
6868 ino_t ufs_inode_by_name(struct inode *dir, const struct qstr *qstr)
@@ -111,13 +111,13 @@ static void ufs_check_page(struct page *page) · 42 unmodified lines
111111 struct super_block *sb = dir->i_sb;
112112 char *kaddr = page_address(page);
113113 unsigned offs, rec_len;
114− unsigned limit = PAGE_CACHE_SIZE;
114+ unsigned limit = PAGE_SIZE;
115115 const unsigned chunk_mask = UFS_SB(sb)->s_uspi->s_dirblksize - 1;
116116 struct ufs_dir_entry *p;
117117 char *error;
118118
119− if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) {
120− limit = dir->i_size & ~PAGE_CACHE_MASK;
119+ if ((dir->i_size >> PAGE_SHIFT) == page->index) {
120+ limit = dir->i_size & ~PAGE_MASK;
121121 if (limit & chunk_mask)
122122 goto Ebadsize;
123123 if (!limit)
@@ -170,7 +170,7 @@ Einumber: · 46 unmodified lines
170170 bad_entry:
171171 ufs_error (sb, "ufs_check_page", "bad entry in directory #%lu: %s - "
172172 "offset=%lu, rec_len=%d, name_len=%d",
173− dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
173+ dir->i_ino, error, (page->index<<PAGE_SHIFT)+offs,
174174 rec_len, ufs_get_de_namlen(sb, p));
175175 goto fail;
176176 Eend:
@@ -178,7 +178,7 @@ Eend: · 1 unmodified line
178178 ufs_error(sb, __func__,
179179 "entry in directory #%lu spans the page boundary"
180180 "offset=%lu",
181− dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs);
181+ dir->i_ino, (page->index<<PAGE_SHIFT)+offs);
182182 fail:
183183 SetPageChecked(page);
184184 SetPageError(page);
@@ -211,9 +211,9 @@ ufs_last_byte(struct inode *inode, unsigned long page_nr) · 26 unmodified lines
211211 {
212212 unsigned last_byte = inode->i_size;
213213
214− last_byte -= page_nr << PAGE_CACHE_SHIFT;
215− if (last_byte > PAGE_CACHE_SIZE)
216− last_byte = PAGE_CACHE_SIZE;
214+ last_byte -= page_nr << PAGE_SHIFT;
215+ if (last_byte > PAGE_SIZE)
216+ last_byte = PAGE_SIZE;
217217 return last_byte;
218218 }
219219
@@ -341,7 +341,7 @@ int ufs_add_link(struct dentry *dentry, struct inode *inode) · 121 unmodified lines
341341 kaddr = page_address(page);
342342 dir_end = kaddr + ufs_last_byte(dir, n);
343343 de = (struct ufs_dir_entry *)kaddr;
344− kaddr += PAGE_CACHE_SIZE - reclen;
344+ kaddr += PAGE_SIZE - reclen;
345345 while ((char *)de <= kaddr) {
346346 if ((char *)de == dir_end) {
347347 /* We hit i_size */
@@ -432,8 +432,8 @@ ufs_readdir(struct file *file, struct dir_context *ctx) · 84 unmodified lines
432432 loff_t pos = ctx->pos;
433433 struct inode *inode = file_inode(file);
434434 struct super_block *sb = inode->i_sb;
435− unsigned int offset = pos & ~PAGE_CACHE_MASK;
436− unsigned long n = pos >> PAGE_CACHE_SHIFT;
435+ unsigned int offset = pos & ~PAGE_MASK;
436+ unsigned long n = pos >> PAGE_SHIFT;
437437 unsigned long npages = dir_pages(inode);
438438 unsigned chunk_mask = ~(UFS_SB(sb)->s_uspi->s_dirblksize - 1);
439439 int need_revalidate = file->f_version != inode->i_version;
@@ -454,14 +454,14 @@ ufs_readdir(struct file *file, struct dir_context *ctx) · 14 unmodified lines
454454 ufs_error(sb, __func__,
455455 "bad page in #%lu",
456456 inode->i_ino);
457− ctx->pos += PAGE_CACHE_SIZE - offset;
457+ ctx->pos += PAGE_SIZE - offset;
458458 return -EIO;
459459 }
460460 kaddr = page_address(page);
461461 if (unlikely(need_revalidate)) {
462462 if (offset) {
463463 offset = ufs_validate_entry(sb, kaddr, offset, chunk_mask);
464− ctx->pos = (n<<PAGE_CACHE_SHIFT) + offset;
464+ ctx->pos = (n<<PAGE_SHIFT) + offset;
465465 }
466466 file->f_version = inode->i_version;
467467 need_revalidate = 0;
@@ -574,7 +574,7 @@ int ufs_make_empty(struct inode * inode, struct inode *dir) · 106 unmodified lines
574574
575575 kmap(page);
576576 base = (char*)page_address(page);
577− memset(base, 0, PAGE_CACHE_SIZE);
577+ memset(base, 0, PAGE_SIZE);
578578
579579 de = (struct ufs_dir_entry *) base;
580580
@@ -594,7 +594,7 @@ int ufs_make_empty(struct inode * inode, struct inode *dir) · 13 unmodified lines
594594
595595 err = ufs_commit_chunk(page, 0, chunk_size);
596596 fail:
597− page_cache_release(page);
597+ put_page(page);
598598 return err;
599599 }
600600
fs/ufs/inode.c+2−2
@@ -1051,13 +1051,13 @@ static int ufs_alloc_lastblock(struct inode *inode, loff_t size) · 1050 unmodified lines
10511051 lastfrag--;
10521052
10531053 lastpage = ufs_get_locked_page(mapping, lastfrag >>
1054− (PAGE_CACHE_SHIFT - inode->i_blkbits));
1054+ (PAGE_SHIFT - inode->i_blkbits));
10551055 if (IS_ERR(lastpage)) {
10561056 err = -EIO;
10571057 goto out;
10581058 }
10591059
1060− end = lastfrag & ((1 << (PAGE_CACHE_SHIFT - inode->i_blkbits)) - 1);
1060+ end = lastfrag & ((1 << (PAGE_SHIFT - inode->i_blkbits)) - 1);
10611061 bh = page_buffers(lastpage);
10621062 for (i = 0; i < end; ++i)
10631063 bh = bh->b_this_page;
fs/ufs/namei.c+3−3
@@ -305,7 +305,7 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, · 304 unmodified lines
305305 ufs_set_link(old_inode, dir_de, dir_page, new_dir, 0);
306306 else {
307307 kunmap(dir_page);
308− page_cache_release(dir_page);
308+ put_page(dir_page);
309309 }
310310 inode_dec_link_count(old_dir);
311311 }
@@ -315,11 +315,11 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, · 3 unmodified lines
315315 out_dir:
316316 if (dir_de) {
317317 kunmap(dir_page);
318− page_cache_release(dir_page);
318+ put_page(dir_page);
319319 }
320320 out_old:
321321 kunmap(old_page);
322− page_cache_release(old_page);
322+ put_page(old_page);
323323 out:
324324 return err;
325325 }
fs/ufs/util.c+2−2
@@ -261,14 +261,14 @@ struct page *ufs_get_locked_page(struct address_space *mapping, · 260 unmodified lines
261261 if (unlikely(page->mapping == NULL)) {
262262 /* Truncate got there first */
263263 unlock_page(page);
264− page_cache_release(page);
264+ put_page(page);
265265 page = NULL;
266266 goto out;
267267 }
268268
269269 if (!PageUptodate(page) || PageError(page)) {
270270 unlock_page(page);
271− page_cache_release(page);
271+ put_page(page);
272272
273273 printk(KERN_ERR "ufs_change_blocknr: "
274274 "can not read page: ino %lu, index: %lu\n",
fs/ufs/util.h+1−1
@@ -283,7 +283,7 @@ extern struct page *ufs_get_locked_page(struct address_space *mapping, · 282 unmodified lines
283283 static inline void ufs_put_locked_page(struct page *page)
284284 {
285285 unlock_page(page);
286− page_cache_release(page);
286+ put_page(page);
287287 }
288288
289289
fs/xfs/libxfs/xfs_bmap.c+2−2
@@ -3742,11 +3742,11 @@ xfs_bmap_btalloc( · 3741 unmodified lines
37423742 args.prod = align;
37433743 if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod)))
37443744 args.mod = (xfs_extlen_t)(args.prod - args.mod);
3745− } else if (mp->m_sb.sb_blocksize >= PAGE_CACHE_SIZE) {
3745+ } else if (mp->m_sb.sb_blocksize >= PAGE_SIZE) {
37463746 args.prod = 1;
37473747 args.mod = 0;
37483748 } else {
3749− args.prod = PAGE_CACHE_SIZE >> mp->m_sb.sb_blocklog;
3749+ args.prod = PAGE_SIZE >> mp->m_sb.sb_blocklog;
37503750 if ((args.mod = (xfs_extlen_t)(do_mod(ap->offset, args.prod))))
37513751 args.mod = (xfs_extlen_t)(args.prod - args.mod);
37523752 }
fs/xfs/xfs_aops.c+9−9
@@ -704,7 +704,7 @@ next_buffer: · 703 unmodified lines
704704
705705 xfs_iunlock(ip, XFS_ILOCK_EXCL);
706706 out_invalidate:
707− xfs_vm_invalidatepage(page, 0, PAGE_CACHE_SIZE);
707+ xfs_vm_invalidatepage(page, 0, PAGE_SIZE);
708708 return;
709709 }
710710
@@ -925,9 +925,9 @@ xfs_do_writepage( · 214 unmodified lines
925925 * ---------------------------------^------------------|
926926 */
927927 offset = i_size_read(inode);
928− end_index = offset >> PAGE_CACHE_SHIFT;
928+ end_index = offset >> PAGE_SHIFT;
929929 if (page->index < end_index)
930− end_offset = (xfs_off_t)(page->index + 1) << PAGE_CACHE_SHIFT;
930+ end_offset = (xfs_off_t)(page->index + 1) << PAGE_SHIFT;
931931 else {
932932 /*
933933 * Check whether the page to write out is beyond or straddles
@@ -940,7 +940,7 @@ xfs_do_writepage( · 6 unmodified lines
940940 * | | Straddles |
941941 * ---------------------------------^-----------|--------|
942942 */
943− unsigned offset_into_page = offset & (PAGE_CACHE_SIZE - 1);
943+ unsigned offset_into_page = offset & (PAGE_SIZE - 1);
944944
945945 /*
946946 * Skip the page if it is fully outside i_size, e.g. due to a
@@ -971,7 +971,7 @@ xfs_do_writepage( · 24 unmodified lines
971971 * memory is zeroed when mapped, and writes to that region are
972972 * not written out to the file."
973973 */
974− zero_user_segment(page, offset_into_page, PAGE_CACHE_SIZE);
974+ zero_user_segment(page, offset_into_page, PAGE_SIZE);
975975
976976 /* Adjust the end_offset to the end of file */
977977 end_offset = offset;
@@ -1475,7 +1475,7 @@ xfs_vm_write_failed( · 497 unmodified lines
14751475 loff_t block_offset;
14761476 loff_t block_start;
14771477 loff_t block_end;
1478− loff_t from = pos & (PAGE_CACHE_SIZE - 1);
1478+ loff_t from = pos & (PAGE_SIZE - 1);
14791479 loff_t to = from + len;
14801480 struct buffer_head *bh, *head;
14811481 struct xfs_mount *mp = XFS_I(inode)->i_mount;
@@ -1491,7 +1491,7 @@ xfs_vm_write_failed( · 9 unmodified lines
14911491 * start of the page by using shifts rather than masks the mismatch
14921492 * problem.
14931493 */
1494− block_offset = (pos >> PAGE_CACHE_SHIFT) << PAGE_CACHE_SHIFT;
1494+ block_offset = (pos >> PAGE_SHIFT) << PAGE_SHIFT;
14951495
14961496 ASSERT(block_offset + from == pos);
14971497
@@ -1558,7 +1558,7 @@ xfs_vm_write_begin( · 60 unmodified lines
15581558 struct page **pagep,
15591559 void **fsdata)
15601560 {
1561− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
1561+ pgoff_t index = pos >> PAGE_SHIFT;
15621562 struct page *page;
15631563 int status;
15641564 struct xfs_mount *mp = XFS_I(mapping->host)->i_mount;
@@ -1592,7 +1592,7 @@ xfs_vm_write_begin( · 27 unmodified lines
15921592 truncate_pagecache_range(inode, start, pos + len);
15931593 }
15941594
1595− page_cache_release(page);
1595+ put_page(page);
15961596 page = NULL;
15971597 }
15981598
fs/xfs/xfs_bmap_util.c+2−2
@@ -1237,7 +1237,7 @@ xfs_free_file_space( · 1236 unmodified lines
12371237 /* wait for the completion of any pending DIOs */
12381238 inode_dio_wait(VFS_I(ip));
12391239
1240− rounding = max_t(xfs_off_t, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
1240+ rounding = max_t(xfs_off_t, 1 << mp->m_sb.sb_blocklog, PAGE_SIZE);
12411241 ioffset = round_down(offset, rounding);
12421242 iendoffset = round_up(offset + len, rounding) - 1;
12431243 error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, ioffset,
@@ -1466,7 +1466,7 @@ xfs_shift_file_space( · 222 unmodified lines
14661466 if (error)
14671467 return error;
14681468 error = invalidate_inode_pages2_range(VFS_I(ip)->i_mapping,
1469− offset >> PAGE_CACHE_SHIFT, -1);
1469+ offset >> PAGE_SHIFT, -1);
14701470 if (error)
14711471 return error;
14721472
fs/xfs/xfs_file.c+6−6
@@ -106,8 +106,8 @@ xfs_iozero( · 105 unmodified lines
106106 unsigned offset, bytes;
107107 void *fsdata;
108108
109− offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */
110− bytes = PAGE_CACHE_SIZE - offset;
109+ offset = (pos & (PAGE_SIZE -1)); /* Within page */
110+ bytes = PAGE_SIZE - offset;
111111 if (bytes > count)
112112 bytes = count;
113113
@@ -799,8 +799,8 @@ xfs_file_dio_aio_write( · 685 unmodified lines
799799 /* see generic_file_direct_write() for why this is necessary */
800800 if (mapping->nrpages) {
801801 invalidate_inode_pages2_range(mapping,
802− pos >> PAGE_CACHE_SHIFT,
803− end >> PAGE_CACHE_SHIFT);
802+ pos >> PAGE_SHIFT,
803+ end >> PAGE_SHIFT);
804804 }
805805
806806 if (ret > 0) {
@@ -1207,9 +1207,9 @@ xfs_find_get_desired_pgoff( · 400 unmodified lines
12071207
12081208 pagevec_init(&pvec, 0);
12091209
1210− index = startoff >> PAGE_CACHE_SHIFT;
1210+ index = startoff >> PAGE_SHIFT;
12111211 endoff = XFS_FSB_TO_B(mp, map->br_startoff + map->br_blockcount);
1212− end = endoff >> PAGE_CACHE_SHIFT;
1212+ end = endoff >> PAGE_SHIFT;
12131213 do {
12141214 int want;
12151215 unsigned nr_pages;
fs/xfs/xfs_linux.h+1−1
@@ -135,7 +135,7 @@ typedef __u32 xfs_nlink_t; · 134 unmodified lines
135135 * Size of block device i/o is parameterized here.
136136 * Currently the system supports page-sized i/o.
137137 */
138−#define BLKDEV_IOSHIFT PAGE_CACHE_SHIFT
138+#define BLKDEV_IOSHIFT PAGE_SHIFT
139139 #define BLKDEV_IOSIZE (1<<BLKDEV_IOSHIFT)
140140 /* number of BB's per block device block */
141141 #define BLKDEV_BB BTOBB(BLKDEV_IOSIZE)
fs/xfs/xfs_mount.c+1−1
@@ -171,7 +171,7 @@ xfs_sb_validate_fsb_count( · 170 unmodified lines
171171 ASSERT(sbp->sb_blocklog >= BBSHIFT);
172172
173173 /* Limited by ULONG_MAX of page cache index */
174− if (nblocks >> (PAGE_CACHE_SHIFT - sbp->sb_blocklog) > ULONG_MAX)
174+ if (nblocks >> (PAGE_SHIFT - sbp->sb_blocklog) > ULONG_MAX)
175175 return -EFBIG;
176176 return 0;
177177 }
fs/xfs/xfs_mount.h+2−2
@@ -231,12 +231,12 @@ static inline unsigned long · 230 unmodified lines
231231 xfs_preferred_iosize(xfs_mount_t *mp)
232232 {
233233 if (mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE)
234− return PAGE_CACHE_SIZE;
234+ return PAGE_SIZE;
235235 return (mp->m_swidth ?
236236 (mp->m_swidth << mp->m_sb.sb_blocklog) :
237237 ((mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) ?
238238 (1 << (int)MAX(mp->m_readio_log, mp->m_writeio_log)) :
239− PAGE_CACHE_SIZE));
239+ PAGE_SIZE));
240240 }
241241
242242 #define XFS_LAST_UNMOUNT_WAS_CLEAN(mp) \
fs/xfs/xfs_pnfs.c+2−2
@@ -293,8 +293,8 @@ xfs_fs_commit_blocks( · 292 unmodified lines
293293 * Make sure reads through the pagecache see the new data.
294294 */
295295 error = invalidate_inode_pages2_range(inode->i_mapping,
296− start >> PAGE_CACHE_SHIFT,
297− (end - 1) >> PAGE_CACHE_SHIFT);
296+ start >> PAGE_SHIFT,
297+ (end - 1) >> PAGE_SHIFT);
298298 WARN_ON_ONCE(error);
299299
300300 error = xfs_iomap_write_unwritten(ip, start, length);
fs/xfs/xfs_super.c+2−2
@@ -570,10 +570,10 @@ xfs_max_file_offset( · 569 unmodified lines
570570 #if BITS_PER_LONG == 32
571571 # if defined(CONFIG_LBDAF)
572572 ASSERT(sizeof(sector_t) == 8);
573− pagefactor = PAGE_CACHE_SIZE;
573+ pagefactor = PAGE_SIZE;
574574 bitshift = BITS_PER_LONG;
575575 # else
576− pagefactor = PAGE_CACHE_SIZE >> (PAGE_CACHE_SHIFT - blockshift);
576+ pagefactor = PAGE_SIZE >> (PAGE_SHIFT - blockshift);
577577 # endif
578578 #endif
579579
include/linux/bio.h+1−1
@@ -41,7 +41,7 @@ · 40 unmodified lines
4141 #endif
4242
4343 #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)
4545 #define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9)
4646
4747 /*
include/linux/blkdev.h+1−1
@@ -1372,7 +1372,7 @@ unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *); · 1371 unmodified lines
13721372
13731373 static inline void put_dev_sector(Sector p)
13741374 {
1375− page_cache_release(p.v);
1375+ put_page(p.v);
13761376 }
13771377
13781378 static inline bool __bvec_gap_to_prev(struct request_queue *q,
include/linux/buffer_head.h+2−2
@@ -43,7 +43,7 @@ enum bh_state_bits { · 42 unmodified lines
4343 */
4444 };
4545
46−#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
46+#define MAX_BUF_PER_PAGE (PAGE_SIZE / 512)
4747
4848 struct page;
4949 struct buffer_head;
@@ -263,7 +263,7 @@ void buffer_init(void); · 213 unmodified lines
263263 static inline void attach_page_buffers(struct page *page,
264264 struct buffer_head *head)
265265 {
266− page_cache_get(page);
266+ get_page(page);
267267 SetPagePrivate(page);
268268 set_page_private(page, (unsigned long)head);
269269 }
include/linux/ceph/libceph.h+2−2
@@ -176,8 +176,8 @@ extern void ceph_put_snap_context(struct ceph_snap_context *sc); · 175 unmodified lines
176176 */
177177 static inline int calc_pages_for(u64 off, u64 len)
178178 {
179− return ((off+len+PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT) -
180− (off >> PAGE_CACHE_SHIFT);
179+ return ((off+len+PAGE_SIZE-1) >> PAGE_SHIFT) -
180+ (off >> PAGE_SHIFT);
181181 }
182182
183183 extern struct kmem_cache *ceph_inode_cachep;
include/linux/f2fs_fs.h+2−2
@@ -262,7 +262,7 @@ struct f2fs_node { · 261 unmodified lines
262262 /*
263263 * For NAT entries
264264 */
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))
266266
267267 struct f2fs_nat_entry {
268268 __u8 version; /* latest version of cached nat entry */
@@ -282,7 +282,7 @@ struct f2fs_nat_block { · 13 unmodified lines
282282 * Not allow to change this.
283283 */
284284 #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))
286286
287287 /*
288288 * Note that f2fs_sit_entry->vblocks has the following bit-field information.
include/linux/fs.h+2−2
@@ -929,7 +929,7 @@ static inline struct file *get_file(struct file *f) · 928 unmodified lines
929929 /* Page cache limit. The filesystems should put that into their s_maxbytes
930930 limits, otherwise bad things can happen in VM. */
931931 #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)
933933 #elif BITS_PER_LONG==64
934934 #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL)
935935 #endif
@@ -2067,7 +2067,7 @@ extern int generic_update_time(struct inode *, struct timespec *, int); · 1131 unmodified lines
20672067 /* /sys/fs */
20682068 extern struct kobject *fs_kobj;
20692069
2070−#define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK)
2070+#define MAX_RW_COUNT (INT_MAX & PAGE_MASK)
20712071
20722072 #ifdef CONFIG_MANDATORY_FILE_LOCKING
20732073 extern int locks_mandatory_locked(struct file *);
include/linux/nfs_page.h+1−1
@@ -184,7 +184,7 @@ nfs_list_entry(struct list_head *head) · 183 unmodified lines
184184 static inline
185185 loff_t req_offset(struct nfs_page *req)
186186 {
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;
188188 }
189189
190190 #endif /* _LINUX_NFS_PAGE_H */
include/linux/pagemap.h+7−7
@@ -390,13 +390,13 @@ static inline pgoff_t page_to_pgoff(struct page *page) · 389 unmodified lines
390390 return page->index << compound_order(page);
391391
392392 if (likely(!PageTransTail(page)))
393− return page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
393+ return page->index;
394394
395395 /*
396396 * We don't initialize ->index for tail pages: calculate based on
397397 * head page
398398 */
399− pgoff = compound_head(page)->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
399+ pgoff = compound_head(page)->index;
400400 pgoff += page - compound_head(page);
401401 return pgoff;
402402 }
@@ -406,12 +406,12 @@ static inline pgoff_t page_to_pgoff(struct page *page) · 3 unmodified lines
406406 */
407407 static inline loff_t page_offset(struct page *page)
408408 {
409− return ((loff_t)page->index) << PAGE_CACHE_SHIFT;
409+ return ((loff_t)page->index) << PAGE_SHIFT;
410410 }
411411
412412 static inline loff_t page_file_offset(struct page *page)
413413 {
414− return ((loff_t)page_file_index(page)) << PAGE_CACHE_SHIFT;
414+ return ((loff_t)page_file_index(page)) << PAGE_SHIFT;
415415 }
416416
417417 extern 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, · 7 unmodified lines
425425 return linear_hugepage_index(vma, address);
426426 pgoff = (address - vma->vm_start) >> PAGE_SHIFT;
427427 pgoff += vma->vm_pgoff;
428− return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT);
428+ return pgoff;
429429 }
430430
431431 extern void __lock_page(struct page *page);
@@ -671,8 +671,8 @@ static inline int add_to_page_cache(struct page *page, · 239 unmodified lines
671671
672672 static inline unsigned long dir_pages(struct inode *inode)
673673 {
674− return (unsigned long)(inode->i_size + PAGE_CACHE_SIZE - 1) >>
675− PAGE_CACHE_SHIFT;
674+ return (unsigned long)(inode->i_size + PAGE_SIZE - 1) >>
675+ PAGE_SHIFT;
676676 }
677677
678678 #endif /* _LINUX_PAGEMAP_H */
include/linux/swap.h+1−1
@@ -435,7 +435,7 @@ struct backing_dev_info; · 434 unmodified lines
435435 /* only sparc can not include linux/pagemap.h in this file
436436 * so leave page_cache_release and release_pages undeclared... */
437437 #define free_page_and_swap_cache(page) \
438− page_cache_release(page)
438+ put_page(page)
439439 #define free_pages_and_swap_cache(pages, nr) \
440440 release_pages((pages), (nr), false);
441441
ipc/mqueue.c+2−2
@@ -307,8 +307,8 @@ static int mqueue_fill_super(struct super_block *sb, void *data, int silent) · 306 unmodified lines
307307 struct inode *inode;
308308 struct ipc_namespace *ns = data;
309309
310− sb->s_blocksize = PAGE_CACHE_SIZE;
311− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
310+ sb->s_blocksize = PAGE_SIZE;
311+ sb->s_blocksize_bits = PAGE_SHIFT;
312312 sb->s_magic = MQUEUE_MAGIC;
313313 sb->s_op = &mqueue_super_ops;
314314
kernel/events/uprobes.c+4−4
@@ -321,7 +321,7 @@ retry: · 320 unmodified lines
321321 copy_to_page(new_page, vaddr, &opcode, UPROBE_SWBP_INSN_SIZE);
322322
323323 ret = __replace_page(vma, vaddr, old_page, new_page);
324− page_cache_release(new_page);
324+ put_page(new_page);
325325 put_old:
326326 put_page(old_page);
327327
@@ -539,14 +539,14 @@ static int __copy_insn(struct address_space *mapping, struct file *filp, · 211 unmodified lines
539539 * see uprobe_register().
540540 */
541541 if (mapping->a_ops->readpage)
542− page = read_mapping_page(mapping, offset >> PAGE_CACHE_SHIFT, filp);
542+ page = read_mapping_page(mapping, offset >> PAGE_SHIFT, filp);
543543 else
544− page = shmem_read_mapping_page(mapping, offset >> PAGE_CACHE_SHIFT);
544+ page = shmem_read_mapping_page(mapping, offset >> PAGE_SHIFT);
545545 if (IS_ERR(page))
546546 return PTR_ERR(page);
547547
548548 copy_from_page(page, offset, insn, nbytes);
549− page_cache_release(page);
549+ put_page(page);
550550
551551 return 0;
552552 }
mm/fadvise.c+4−4
@@ -97,8 +97,8 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice) · 96 unmodified lines
9797 break;
9898 case POSIX_FADV_WILLNEED:
9999 /* First and last PARTIAL page! */
100− start_index = offset >> PAGE_CACHE_SHIFT;
101− end_index = endbyte >> PAGE_CACHE_SHIFT;
100+ start_index = offset >> PAGE_SHIFT;
101+ end_index = endbyte >> PAGE_SHIFT;
102102
103103 /* Careful about overflow on the "+1" */
104104 nrpages = end_index - start_index + 1;
@@ -124,8 +124,8 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice) · 19 unmodified lines
124124 * preserved on the expectation that it is better to preserve
125125 * needed memory than to discard unneeded memory.
126126 */
127− start_index = (offset+(PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT;
128− end_index = (endbyte >> PAGE_CACHE_SHIFT);
127+ start_index = (offset+(PAGE_SIZE-1)) >> PAGE_SHIFT;
128+ end_index = (endbyte >> PAGE_SHIFT);
129129
130130 if (end_index >= start_index) {
131131 unsigned long count = invalidate_mapping_pages(mapping,
mm/filemap.c+63−63
@@ -265,7 +265,7 @@ void delete_from_page_cache(struct page *page) · 264 unmodified lines
265265
266266 if (freepage)
267267 freepage(page);
268− page_cache_release(page);
268+ put_page(page);
269269 }
270270 EXPORT_SYMBOL(delete_from_page_cache);
271271
@@ -352,8 +352,8 @@ EXPORT_SYMBOL(filemap_flush); · 80 unmodified lines
352352 static int __filemap_fdatawait_range(struct address_space *mapping,
353353 loff_t start_byte, loff_t end_byte)
354354 {
355− pgoff_t index = start_byte >> PAGE_CACHE_SHIFT;
356− pgoff_t end = end_byte >> PAGE_CACHE_SHIFT;
355+ pgoff_t index = start_byte >> PAGE_SHIFT;
356+ pgoff_t end = end_byte >> PAGE_SHIFT;
357357 struct pagevec pvec;
358358 int nr_pages;
359359 int ret = 0;
@@ -550,7 +550,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask) · 190 unmodified lines
550550 pgoff_t offset = old->index;
551551 freepage = mapping->a_ops->freepage;
552552
553− page_cache_get(new);
553+ get_page(new);
554554 new->mapping = mapping;
555555 new->index = offset;
556556
@@ -572,7 +572,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask) · 15 unmodified lines
572572 radix_tree_preload_end();
573573 if (freepage)
574574 freepage(old);
575− page_cache_release(old);
575+ put_page(old);
576576 }
577577
578578 return error;
@@ -651,7 +651,7 @@ static int __add_to_page_cache_locked(struct page *page, · 72 unmodified lines
651651 return error;
652652 }
653653
654− page_cache_get(page);
654+ get_page(page);
655655 page->mapping = mapping;
656656 page->index = offset;
657657
@@ -675,7 +675,7 @@ err_insert: · 17 unmodified lines
675675 spin_unlock_irq(&mapping->tree_lock);
676676 if (!huge)
677677 mem_cgroup_cancel_charge(page, memcg, false);
678− page_cache_release(page);
678+ put_page(page);
679679 return error;
680680 }
681681
@@ -1083,7 +1083,7 @@ repeat: · 401 unmodified lines
10831083 * include/linux/pagemap.h for details.
10841084 */
10851085 if (unlikely(page != *pagep)) {
1086− page_cache_release(page);
1086+ put_page(page);
10871087 goto repeat;
10881088 }
10891089 }
@@ -1121,7 +1121,7 @@ repeat: · 31 unmodified lines
11211121 /* Has the page been truncated? */
11221122 if (unlikely(page->mapping != mapping)) {
11231123 unlock_page(page);
1124− page_cache_release(page);
1124+ put_page(page);
11251125 goto repeat;
11261126 }
11271127 VM_BUG_ON_PAGE(page->index != offset, page);
@@ -1168,7 +1168,7 @@ repeat: · 40 unmodified lines
11681168 if (fgp_flags & FGP_LOCK) {
11691169 if (fgp_flags & FGP_NOWAIT) {
11701170 if (!trylock_page(page)) {
1171− page_cache_release(page);
1171+ put_page(page);
11721172 return NULL;
11731173 }
11741174 } else {
@@ -1178,7 +1178,7 @@ repeat: · 3 unmodified lines
11781178 /* Has the page been truncated? */
11791179 if (unlikely(page->mapping != mapping)) {
11801180 unlock_page(page);
1181− page_cache_release(page);
1181+ put_page(page);
11821182 goto repeat;
11831183 }
11841184 VM_BUG_ON_PAGE(page->index != offset, page);
@@ -1209,7 +1209,7 @@ no_page: · 24 unmodified lines
12091209 err = add_to_page_cache_lru(page, mapping, offset,
12101210 gfp_mask & GFP_RECLAIM_MASK);
12111211 if (unlikely(err)) {
1212− page_cache_release(page);
1212+ put_page(page);
12131213 page = NULL;
12141214 if (err == -EEXIST)
12151215 goto repeat;
@@ -1278,7 +1278,7 @@ repeat: · 62 unmodified lines
12781278
12791279 /* Has the page moved? */
12801280 if (unlikely(page != *slot)) {
1281− page_cache_release(page);
1281+ put_page(page);
12821282 goto repeat;
12831283 }
12841284 export:
@@ -1343,7 +1343,7 @@ repeat: · 58 unmodified lines
13431343
13441344 /* Has the page moved? */
13451345 if (unlikely(page != *slot)) {
1346− page_cache_release(page);
1346+ put_page(page);
13471347 goto repeat;
13481348 }
13491349
@@ -1405,7 +1405,7 @@ repeat: · 55 unmodified lines
14051405
14061406 /* Has the page moved? */
14071407 if (unlikely(page != *slot)) {
1408− page_cache_release(page);
1408+ put_page(page);
14091409 goto repeat;
14101410 }
14111411
@@ -1415,7 +1415,7 @@ repeat: · 3 unmodified lines
14151415 * negatives, which is just confusing to the caller.
14161416 */
14171417 if (page->mapping == NULL || page->index != iter.index) {
1418− page_cache_release(page);
1418+ put_page(page);
14191419 break;
14201420 }
14211421
@@ -1482,7 +1482,7 @@ repeat: · 60 unmodified lines
14821482
14831483 /* Has the page moved? */
14841484 if (unlikely(page != *slot)) {
1485− page_cache_release(page);
1485+ put_page(page);
14861486 goto repeat;
14871487 }
14881488
@@ -1549,7 +1549,7 @@ repeat: · 60 unmodified lines
15491549
15501550 /* Has the page moved? */
15511551 if (unlikely(page != *slot)) {
1552− page_cache_release(page);
1552+ put_page(page);
15531553 goto repeat;
15541554 }
15551555 export:
@@ -1610,11 +1610,11 @@ static ssize_t do_generic_file_read(struct file *filp, loff_t *ppos, · 54 unmodified lines
16101610 unsigned int prev_offset;
16111611 int error = 0;
16121612
1613− index = *ppos >> PAGE_CACHE_SHIFT;
1614− prev_index = ra->prev_pos >> PAGE_CACHE_SHIFT;
1615− prev_offset = ra->prev_pos & (PAGE_CACHE_SIZE-1);
1616− last_index = (*ppos + iter->count + PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT;
1617− offset = *ppos & ~PAGE_CACHE_MASK;
1613+ index = *ppos >> PAGE_SHIFT;
1614+ prev_index = ra->prev_pos >> PAGE_SHIFT;
1615+ prev_offset = ra->prev_pos & (PAGE_SIZE-1);
1616+ last_index = (*ppos + iter->count + PAGE_SIZE-1) >> PAGE_SHIFT;
1617+ offset = *ppos & ~PAGE_MASK;
16181618
16191619 for (;;) {
16201620 struct page *page;
@@ -1648,7 +1648,7 @@ find_page: · 27 unmodified lines
16481648 if (PageUptodate(page))
16491649 goto page_ok;
16501650
1651− if (inode->i_blkbits == PAGE_CACHE_SHIFT ||
1651+ if (inode->i_blkbits == PAGE_SHIFT ||
16521652 !mapping->a_ops->is_partially_uptodate)
16531653 goto page_not_up_to_date;
16541654 if (!trylock_page(page))
@@ -1672,18 +1672,18 @@ page_ok: · 17 unmodified lines
16721672 */
16731673
16741674 isize = i_size_read(inode);
1675− end_index = (isize - 1) >> PAGE_CACHE_SHIFT;
1675+ end_index = (isize - 1) >> PAGE_SHIFT;
16761676 if (unlikely(!isize || index > end_index)) {
1677− page_cache_release(page);
1677+ put_page(page);
16781678 goto out;
16791679 }
16801680
16811681 /* nr is the maximum number of bytes to copy from this page */
1682− nr = PAGE_CACHE_SIZE;
1682+ nr = PAGE_SIZE;
16831683 if (index == end_index) {
1684− nr = ((isize - 1) & ~PAGE_CACHE_MASK) + 1;
1684+ nr = ((isize - 1) & ~PAGE_MASK) + 1;
16851685 if (nr <= offset) {
1686− page_cache_release(page);
1686+ put_page(page);
16871687 goto out;
16881688 }
16891689 }
@@ -1711,11 +1711,11 @@ page_ok: · 21 unmodified lines
17111711
17121712 ret = copy_page_to_iter(page, offset, nr, iter);
17131713 offset += ret;
1714− index += offset >> PAGE_CACHE_SHIFT;
1715− offset &= ~PAGE_CACHE_MASK;
1714+ index += offset >> PAGE_SHIFT;
1715+ offset &= ~PAGE_MASK;
17161716 prev_offset = offset;
17171717
1718− page_cache_release(page);
1718+ put_page(page);
17191719 written += ret;
17201720 if (!iov_iter_count(iter))
17211721 goto out;
@@ -1735,7 +1735,7 @@ page_not_up_to_date_locked: · 13 unmodified lines
17351735 /* Did it get truncated before we got the lock? */
17361736 if (!page->mapping) {
17371737 unlock_page(page);
1738− page_cache_release(page);
1738+ put_page(page);
17391739 continue;
17401740 }
17411741
@@ -1757,7 +1757,7 @@ readpage: · 15 unmodified lines
17571757
17581758 if (unlikely(error)) {
17591759 if (error == AOP_TRUNCATED_PAGE) {
1760− page_cache_release(page);
1760+ put_page(page);
17611761 error = 0;
17621762 goto find_page;
17631763 }
@@ -1774,7 +1774,7 @@ readpage: · 10 unmodified lines
17741774 * invalidate_mapping_pages got it
17751775 */
17761776 unlock_page(page);
1777− page_cache_release(page);
1777+ put_page(page);
17781778 goto find_page;
17791779 }
17801780 unlock_page(page);
@@ -1789,7 +1789,7 @@ readpage: · 8 unmodified lines
17891789
17901790 readpage_error:
17911791 /* UHHUH! A synchronous read error occurred. Report it */
1792− page_cache_release(page);
1792+ put_page(page);
17931793 goto out;
17941794
17951795 no_cached_page:
@@ -1805,7 +1805,7 @@ no_cached_page: · 9 unmodified lines
18051805 error = add_to_page_cache_lru(page, mapping, index,
18061806 mapping_gfp_constraint(mapping, GFP_KERNEL));
18071807 if (error) {
1808− page_cache_release(page);
1808+ put_page(page);
18091809 if (error == -EEXIST) {
18101810 error = 0;
18111811 goto find_page;
@@ -1817,10 +1817,10 @@ no_cached_page: · 5 unmodified lines
18171817
18181818 out:
18191819 ra->prev_pos = prev_index;
1820− ra->prev_pos <<= PAGE_CACHE_SHIFT;
1820+ ra->prev_pos <<= PAGE_SHIFT;
18211821 ra->prev_pos |= prev_offset;
18221822
1823− *ppos = ((loff_t)index << PAGE_CACHE_SHIFT) + offset;
1823+ *ppos = ((loff_t)index << PAGE_SHIFT) + offset;
18241824 file_accessed(filp);
18251825 return written ? written : error;
18261826 }
@@ -1912,7 +1912,7 @@ static int page_cache_read(struct file *file, pgoff_t offset, gfp_t gfp_mask) · 85 unmodified lines
19121912 else if (ret == -EEXIST)
19131913 ret = 0; /* losing race to add is OK */
19141914
1915− page_cache_release(page);
1915+ put_page(page);
19161916
19171917 } while (ret == AOP_TRUNCATED_PAGE);
19181918
@@ -2022,8 +2022,8 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 103 unmodified lines
20222022 loff_t size;
20232023 int ret = 0;
20242024
2025− size = round_up(i_size_read(inode), PAGE_CACHE_SIZE);
2026− if (offset >= size >> PAGE_CACHE_SHIFT)
2025+ size = round_up(i_size_read(inode), PAGE_SIZE);
2026+ if (offset >= size >> PAGE_SHIFT)
20272027 return VM_FAULT_SIGBUS;
20282028
20292029 /*
@@ -2049,7 +2049,7 @@ retry_find: · 19 unmodified lines
20492049 }
20502050
20512051 if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags)) {
2052− page_cache_release(page);
2052+ put_page(page);
20532053 return ret | VM_FAULT_RETRY;
20542054 }
20552055
@@ -2072,10 +2072,10 @@ retry_find: · 16 unmodified lines
20722072 * Found the page and have a reference on it.
20732073 * We must recheck i_size under page lock.
20742074 */
2075− size = round_up(i_size_read(inode), PAGE_CACHE_SIZE);
2076− if (unlikely(offset >= size >> PAGE_CACHE_SHIFT)) {
2075+ size = round_up(i_size_read(inode), PAGE_SIZE);
2076+ if (unlikely(offset >= size >> PAGE_SHIFT)) {
20772077 unlock_page(page);
2078− page_cache_release(page);
2078+ put_page(page);
20792079 return VM_FAULT_SIGBUS;
20802080 }
20812081
@@ -2120,7 +2120,7 @@ page_not_uptodate: · 38 unmodified lines
21202120 if (!PageUptodate(page))
21212121 error = -EIO;
21222122 }
2123− page_cache_release(page);
2123+ put_page(page);
21242124
21252125 if (!error || error == AOP_TRUNCATED_PAGE)
21262126 goto retry_find;
@@ -2164,7 +2164,7 @@ repeat: · 37 unmodified lines
21642164
21652165 /* Has the page moved? */
21662166 if (unlikely(page != *slot)) {
2167− page_cache_release(page);
2167+ put_page(page);
21682168 goto repeat;
21692169 }
21702170
@@ -2178,8 +2178,8 @@ repeat: · 7 unmodified lines
21782178 if (page->mapping != mapping || !PageUptodate(page))
21792179 goto unlock;
21802180
2181− size = round_up(i_size_read(mapping->host), PAGE_CACHE_SIZE);
2182− if (page->index >= size >> PAGE_CACHE_SHIFT)
2181+ size = round_up(i_size_read(mapping->host), PAGE_SIZE);
2182+ if (page->index >= size >> PAGE_SHIFT)
21832183 goto unlock;
21842184
21852185 pte = vmf->pte + page->index - vmf->pgoff;
@@ -2195,7 +2195,7 @@ repeat: · 9 unmodified lines
21952195 unlock:
21962196 unlock_page(page);
21972197 skip:
2198− page_cache_release(page);
2198+ put_page(page);
21992199 next:
22002200 if (iter.index == vmf->max_pgoff)
22012201 break;
@@ -2278,7 +2278,7 @@ static struct page *wait_on_page_read(struct page *page) · 76 unmodified lines
22782278 if (!IS_ERR(page)) {
22792279 wait_on_page_locked(page);
22802280 if (!PageUptodate(page)) {
2281− page_cache_release(page);
2281+ put_page(page);
22822282 page = ERR_PTR(-EIO);
22832283 }
22842284 }
@@ -2301,7 +2301,7 @@ repeat: · 16 unmodified lines
23012301 return ERR_PTR(-ENOMEM);
23022302 err = add_to_page_cache_lru(page, mapping, index, gfp);
23032303 if (unlikely(err)) {
2304− page_cache_release(page);
2304+ put_page(page);
23052305 if (err == -EEXIST)
23062306 goto repeat;
23072307 /* Presumably ENOMEM for radix tree node */
@@ -2311,7 +2311,7 @@ repeat: · 3 unmodified lines
23112311 filler:
23122312 err = filler(data, page);
23132313 if (err < 0) {
2314− page_cache_release(page);
2314+ put_page(page);
23152315 return ERR_PTR(err);
23162316 }
23172317
@@ -2364,7 +2364,7 @@ filler: · 46 unmodified lines
23642364 /* Case c or d, restart the operation */
23652365 if (!page->mapping) {
23662366 unlock_page(page);
2367− page_cache_release(page);
2367+ put_page(page);
23682368 goto repeat;
23692369 }
23702370
@@ -2511,7 +2511,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos) · 140 unmodified lines
25112511 struct iov_iter data;
25122512
25132513 write_len = iov_iter_count(from);
2514− end = (pos + write_len - 1) >> PAGE_CACHE_SHIFT;
2514+ end = (pos + write_len - 1) >> PAGE_SHIFT;
25152515
25162516 written = filemap_write_and_wait_range(mapping, pos, pos + write_len - 1);
25172517 if (written)
@@ -2525,7 +2525,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos) · 7 unmodified lines
25252525 */
25262526 if (mapping->nrpages) {
25272527 written = invalidate_inode_pages2_range(mapping,
2528− pos >> PAGE_CACHE_SHIFT, end);
2528+ pos >> PAGE_SHIFT, end);
25292529 /*
25302530 * If a page can not be invalidated, return 0 to fall back
25312531 * to buffered write.
@@ -2550,7 +2550,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos) · 18 unmodified lines
25502550 */
25512551 if (mapping->nrpages) {
25522552 invalidate_inode_pages2_range(mapping,
2553− pos >> PAGE_CACHE_SHIFT, end);
2553+ pos >> PAGE_SHIFT, end);
25542554 }
25552555
25562556 if (written > 0) {
@@ -2611,8 +2611,8 @@ ssize_t generic_perform_write(struct file *file, · 54 unmodified lines
26112611 size_t copied; /* Bytes copied from user */
26122612 void *fsdata;
26132613
2614− offset = (pos & (PAGE_CACHE_SIZE - 1));
2615− bytes = min_t(unsigned long, PAGE_CACHE_SIZE - offset,
2614+ offset = (pos & (PAGE_SIZE - 1));
2615+ bytes = min_t(unsigned long, PAGE_SIZE - offset,
26162616 iov_iter_count(i));
26172617
26182618 again:
@@ -2665,7 +2665,7 @@ again: · 46 unmodified lines
26652665 * because not all segments in the iov can be copied at
26662666 * once without a pagefault.
26672667 */
2668− bytes = min_t(unsigned long, PAGE_CACHE_SIZE - offset,
2668+ bytes = min_t(unsigned long, PAGE_SIZE - offset,
26692669 iov_iter_single_seg_count(i));
26702670 goto again;
26712671 }
@@ -2752,8 +2752,8 @@ ssize_t __generic_file_write_iter(struct kiocb *iocb, struct iov_iter *from) · 80 unmodified lines
27522752 iocb->ki_pos = endbyte + 1;
27532753 written += status;
27542754 invalidate_mapping_pages(mapping,
2755− pos >> PAGE_CACHE_SHIFT,
2756− endbyte >> PAGE_CACHE_SHIFT);
2755+ pos >> PAGE_SHIFT,
2756+ endbyte >> PAGE_SHIFT);
27572757 } else {
27582758 /*
27592759 * We don't know how much we wrote, so just return
mm/hugetlb.c+4−4
@@ -3346,7 +3346,7 @@ retry_avoidcopy: · 3345 unmodified lines
33463346 old_page != pagecache_page)
33473347 outside_reserve = 1;
33483348
3349− page_cache_get(old_page);
3349+ get_page(old_page);
33503350
33513351 /*
33523352 * Drop page table lock as buddy allocator may be called. It will
@@ -3364,7 +3364,7 @@ retry_avoidcopy: · 11 unmodified lines
33643364 * may get SIGKILLed if it later faults.
33653365 */
33663366 if (outside_reserve) {
3367− page_cache_release(old_page);
3367+ put_page(old_page);
33683368 BUG_ON(huge_pte_none(pte));
33693369 unmap_ref_private(mm, vma, old_page, address);
33703370 BUG_ON(huge_pte_none(pte));
@@ -3425,9 +3425,9 @@ retry_avoidcopy: · 54 unmodified lines
34253425 spin_unlock(ptl);
34263426 mmu_notifier_invalidate_range_end(mm, mmun_start, mmun_end);
34273427 out_release_all:
3428− page_cache_release(new_page);
3428+ put_page(new_page);
34293429 out_release_old:
3430− page_cache_release(old_page);
3430+ put_page(old_page);
34313431
34323432 spin_lock(ptl); /* Caller expects lock to be held */
34333433 return ret;
mm/madvise.c+3−3
@@ -170,7 +170,7 @@ static int swapin_walk_pmd_entry(pmd_t *pmd, unsigned long start, · 169 unmodified lines
170170 page = read_swap_cache_async(entry, GFP_HIGHUSER_MOVABLE,
171171 vma, index);
172172 if (page)
173− page_cache_release(page);
173+ put_page(page);
174174 }
175175
176176 return 0;
@@ -204,14 +204,14 @@ static void force_shm_swapin_readahead(struct vm_area_struct *vma, · 27 unmodified lines
204204 page = find_get_entry(mapping, index);
205205 if (!radix_tree_exceptional_entry(page)) {
206206 if (page)
207− page_cache_release(page);
207+ put_page(page);
208208 continue;
209209 }
210210 swap = radix_to_swp_entry(page);
211211 page = read_swap_cache_async(swap, GFP_HIGHUSER_MOVABLE,
212212 NULL, 0);
213213 if (page)
214− page_cache_release(page);
214+ put_page(page);
215215 }
216216
217217 lru_add_drain(); /* Push any new pages onto the LRU now */
mm/memory-failure.c+1−1
@@ -538,7 +538,7 @@ static int delete_from_lru_cache(struct page *p) · 537 unmodified lines
538538 /*
539539 * drop the page count elevated by isolate_lru_page()
540540 */
541− page_cache_release(p);
541+ put_page(p);
542542 return 0;
543543 }
544544 return -EIO;
mm/memory.c+27−27
@@ -2054,7 +2054,7 @@ static inline int wp_page_reuse(struct mm_struct *mm, · 2053 unmodified lines
20542054 VM_BUG_ON_PAGE(PageAnon(page), page);
20552055 mapping = page->mapping;
20562056 unlock_page(page);
2057− page_cache_release(page);
2057+ put_page(page);
20582058
20592059 if ((dirtied || page_mkwrite) && mapping) {
20602060 /*
@@ -2188,7 +2188,7 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma, · 127 unmodified lines
21882188 }
21892189
21902190 if (new_page)
2191− page_cache_release(new_page);
2191+ put_page(new_page);
21922192
21932193 pte_unmap_unlock(page_table, ptl);
21942194 mmu_notifier_invalidate_range_end(mm, mmun_start, mmun_end);
@@ -2203,14 +2203,14 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma, · 8 unmodified lines
22032203 munlock_vma_page(old_page);
22042204 unlock_page(old_page);
22052205 }
2206− page_cache_release(old_page);
2206+ put_page(old_page);
22072207 }
22082208 return page_copied ? VM_FAULT_WRITE : 0;
22092209 oom_free_new:
2210− page_cache_release(new_page);
2210+ put_page(new_page);
22112211 oom:
22122212 if (old_page)
2213− page_cache_release(old_page);
2213+ put_page(old_page);
22142214 return VM_FAULT_OOM;
22152215 }
22162216
@@ -2258,7 +2258,7 @@ static int wp_page_shared(struct mm_struct *mm, struct vm_area_struct *vma, · 41 unmodified lines
22582258 {
22592259 int page_mkwrite = 0;
22602260
2261− page_cache_get(old_page);
2261+ get_page(old_page);
22622262
22632263 if (vma->vm_ops && vma->vm_ops->page_mkwrite) {
22642264 int tmp;
@@ -2267,7 +2267,7 @@ static int wp_page_shared(struct mm_struct *mm, struct vm_area_struct *vma, · 2 unmodified lines
22672267 tmp = do_page_mkwrite(vma, old_page, address);
22682268 if (unlikely(!tmp || (tmp &
22692269 (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))) {
2270− page_cache_release(old_page);
2270+ put_page(old_page);
22712271 return tmp;
22722272 }
22732273 /*
@@ -2281,7 +2281,7 @@ static int wp_page_shared(struct mm_struct *mm, struct vm_area_struct *vma, · 7 unmodified lines
22812281 if (!pte_same(*page_table, orig_pte)) {
22822282 unlock_page(old_page);
22832283 pte_unmap_unlock(page_table, ptl);
2284− page_cache_release(old_page);
2284+ put_page(old_page);
22852285 return 0;
22862286 }
22872287 page_mkwrite = 1;
@@ -2341,7 +2341,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, · 53 unmodified lines
23412341 */
23422342 if (PageAnon(old_page) && !PageKsm(old_page)) {
23432343 if (!trylock_page(old_page)) {
2344− page_cache_get(old_page);
2344+ get_page(old_page);
23452345 pte_unmap_unlock(page_table, ptl);
23462346 lock_page(old_page);
23472347 page_table = pte_offset_map_lock(mm, pmd, address,
@@ -2349,10 +2349,10 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, · 1 unmodified line
23492349 if (!pte_same(*page_table, orig_pte)) {
23502350 unlock_page(old_page);
23512351 pte_unmap_unlock(page_table, ptl);
2352− page_cache_release(old_page);
2352+ put_page(old_page);
23532353 return 0;
23542354 }
2355− page_cache_release(old_page);
2355+ put_page(old_page);
23562356 }
23572357 if (reuse_swap_page(old_page)) {
23582358 /*
@@ -2375,7 +2375,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, · 16 unmodified lines
23752375 /*
23762376 * Ok, we need to copy. Oh, well..
23772377 */
2378− page_cache_get(old_page);
2378+ get_page(old_page);
23792379
23802380 pte_unmap_unlock(page_table, ptl);
23812381 return wp_page_copy(mm, vma, address, page_table, pmd,
@@ -2619,7 +2619,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, · 237 unmodified lines
26192619 * parallel locked swapcache.
26202620 */
26212621 unlock_page(swapcache);
2622− page_cache_release(swapcache);
2622+ put_page(swapcache);
26232623 }
26242624
26252625 if (flags & FAULT_FLAG_WRITE) {
@@ -2641,10 +2641,10 @@ out_nomap: · 15 unmodified lines
26412641 out_page:
26422642 unlock_page(page);
26432643 out_release:
2644− page_cache_release(page);
2644+ put_page(page);
26452645 if (page != swapcache) {
26462646 unlock_page(swapcache);
2647− page_cache_release(swapcache);
2647+ put_page(swapcache);
26482648 }
26492649 return ret;
26502650 }
@@ -2752,7 +2752,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, · 101 unmodified lines
27522752 if (userfaultfd_missing(vma)) {
27532753 pte_unmap_unlock(page_table, ptl);
27542754 mem_cgroup_cancel_charge(page, memcg, false);
2755− page_cache_release(page);
2755+ put_page(page);
27562756 return handle_userfault(vma, address, flags,
27572757 VM_UFFD_MISSING);
27582758 }
@@ -2771,10 +2771,10 @@ unlock: · 12 unmodified lines
27712771 return 0;
27722772 release:
27732773 mem_cgroup_cancel_charge(page, memcg, false);
2774− page_cache_release(page);
2774+ put_page(page);
27752775 goto unlock;
27762776 oom_free_page:
2777− page_cache_release(page);
2777+ put_page(page);
27782778 oom:
27792779 return VM_FAULT_OOM;
27802780 }
@@ -2807,7 +2807,7 @@ static int __do_fault(struct vm_area_struct *vma, unsigned long address, · 26 unmodified lines
28072807 if (unlikely(PageHWPoison(vmf.page))) {
28082808 if (ret & VM_FAULT_LOCKED)
28092809 unlock_page(vmf.page);
2810− page_cache_release(vmf.page);
2810+ put_page(vmf.page);
28112811 return VM_FAULT_HWPOISON;
28122812 }
28132813
@@ -2996,7 +2996,7 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma, · 182 unmodified lines
29962996 if (unlikely(!pte_same(*pte, orig_pte))) {
29972997 pte_unmap_unlock(pte, ptl);
29982998 unlock_page(fault_page);
2999− page_cache_release(fault_page);
2999+ put_page(fault_page);
30003000 return ret;
30013001 }
30023002 do_set_pte(vma, address, fault_page, pte, false, false);
@@ -3024,7 +3024,7 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, · 21 unmodified lines
30243024 return VM_FAULT_OOM;
30253025
30263026 if (mem_cgroup_try_charge(new_page, mm, GFP_KERNEL, &memcg, false)) {
3027− page_cache_release(new_page);
3027+ put_page(new_page);
30283028 return VM_FAULT_OOM;
30293029 }
30303030
@@ -3041,7 +3041,7 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, · 10 unmodified lines
30413041 pte_unmap_unlock(pte, ptl);
30423042 if (fault_page) {
30433043 unlock_page(fault_page);
3044− page_cache_release(fault_page);
3044+ put_page(fault_page);
30453045 } else {
30463046 /*
30473047 * The fault handler has no page to lock, so it holds
@@ -3057,7 +3057,7 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, · 9 unmodified lines
30573057 pte_unmap_unlock(pte, ptl);
30583058 if (fault_page) {
30593059 unlock_page(fault_page);
3060− page_cache_release(fault_page);
3060+ put_page(fault_page);
30613061 } else {
30623062 /*
30633063 * The fault handler has no page to lock, so it holds
@@ -3068,7 +3068,7 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, · 4 unmodified lines
30683068 return ret;
30693069 uncharge_out:
30703070 mem_cgroup_cancel_charge(new_page, memcg, false);
3071− page_cache_release(new_page);
3071+ put_page(new_page);
30723072 return ret;
30733073 }
30743074
@@ -3096,7 +3096,7 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma, · 21 unmodified lines
30963096 tmp = do_page_mkwrite(vma, fault_page, address);
30973097 if (unlikely(!tmp ||
30983098 (tmp & (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))) {
3099− page_cache_release(fault_page);
3099+ put_page(fault_page);
31003100 return tmp;
31013101 }
31023102 }
@@ -3105,7 +3105,7 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma, · 2 unmodified lines
31053105 if (unlikely(!pte_same(*pte, orig_pte))) {
31063106 pte_unmap_unlock(pte, ptl);
31073107 unlock_page(fault_page);
3108− page_cache_release(fault_page);
3108+ put_page(fault_page);
31093109 return ret;
31103110 }
31113111 do_set_pte(vma, address, fault_page, pte, true, false);
@@ -3736,7 +3736,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, · 624 unmodified lines
37363736 buf, maddr + offset, bytes);
37373737 }
37383738 kunmap(page);
3739− page_cache_release(page);
3739+ put_page(page);
37403740 }
37413741 len -= bytes;
37423742 buf += bytes;
mm/mincore.c+2−2
@@ -75,7 +75,7 @@ static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff) · 74 unmodified lines
7575 #endif
7676 if (page) {
7777 present = PageUptodate(page);
78− page_cache_release(page);
78+ put_page(page);
7979 }
8080
8181 return present;
@@ -226,7 +226,7 @@ SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len, · 144 unmodified lines
226226 unsigned char *tmp;
227227
228228 /* Check the start address: needs to be page-aligned.. */
229− if (start & ~PAGE_CACHE_MASK)
229+ if (start & ~PAGE_MASK)
230230 return -EINVAL;
231231
232232 /* ..and we need to be passed a valid user-space range */
mm/nommu.c+1−1
@@ -141,7 +141,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, · 140 unmodified lines
141141 if (pages) {
142142 pages[i] = virt_to_page(start);
143143 if (pages[i])
144− page_cache_get(pages[i]);
144+ get_page(pages[i]);
145145 }
146146 if (vmas)
147147 vmas[i] = vma;
mm/page-writeback.c+6−6
@@ -2176,8 +2176,8 @@ int write_cache_pages(struct address_space *mapping, · 2175 unmodified lines
21762176 cycled = 0;
21772177 end = -1;
21782178 } else {
2179− index = wbc->range_start >> PAGE_CACHE_SHIFT;
2180− end = wbc->range_end >> PAGE_CACHE_SHIFT;
2179+ index = wbc->range_start >> PAGE_SHIFT;
2180+ end = wbc->range_end >> PAGE_SHIFT;
21812181 if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
21822182 range_whole = 1;
21832183 cycled = 1; /* ignore range_cyclic tests */
@@ -2382,14 +2382,14 @@ int write_one_page(struct page *page, int wait) · 198 unmodified lines
23822382 wait_on_page_writeback(page);
23832383
23842384 if (clear_page_dirty_for_io(page)) {
2385− page_cache_get(page);
2385+ get_page(page);
23862386 ret = mapping->a_ops->writepage(page, &wbc);
23872387 if (ret == 0 && wait) {
23882388 wait_on_page_writeback(page);
23892389 if (PageError(page))
23902390 ret = -EIO;
23912391 }
2392− page_cache_release(page);
2392+ put_page(page);
23932393 } else {
23942394 unlock_page(page);
23952395 }
@@ -2431,7 +2431,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping) · 35 unmodified lines
24312431 __inc_zone_page_state(page, NR_DIRTIED);
24322432 __inc_wb_stat(wb, WB_RECLAIMABLE);
24332433 __inc_wb_stat(wb, WB_DIRTIED);
2434− task_io_account_write(PAGE_CACHE_SIZE);
2434+ task_io_account_write(PAGE_SIZE);
24352435 current->nr_dirtied++;
24362436 this_cpu_inc(bdp_ratelimits);
24372437 }
@@ -2450,7 +2450,7 @@ void account_page_cleaned(struct page *page, struct address_space *mapping, · 12 unmodified lines
24502450 mem_cgroup_dec_page_stat(page, MEM_CGROUP_STAT_DIRTY);
24512451 dec_zone_page_state(page, NR_FILE_DIRTY);
24522452 dec_wb_stat(wb, WB_RECLAIMABLE);
2453− task_io_account_cancelled_write(PAGE_CACHE_SIZE);
2453+ task_io_account_cancelled_write(PAGE_SIZE);
24542454 }
24552455 }
24562456
mm/page_io.c+1−1
@@ -252,7 +252,7 @@ out: · 251 unmodified lines
252252
253253 static sector_t swap_page_sector(struct page *page)
254254 {
255− return (sector_t)__page_file_index(page) << (PAGE_CACHE_SHIFT - 9);
255+ return (sector_t)__page_file_index(page) << (PAGE_SHIFT - 9);
256256 }
257257
258258 int __swap_writepage(struct page *page, struct writeback_control *wbc,
mm/readahead.c+10−10
@@ -47,11 +47,11 @@ static void read_cache_pages_invalidate_page(struct address_space *mapping, · 46 unmodified lines
4747 if (!trylock_page(page))
4848 BUG();
4949 page->mapping = mapping;
50− do_invalidatepage(page, 0, PAGE_CACHE_SIZE);
50+ do_invalidatepage(page, 0, PAGE_SIZE);
5151 page->mapping = NULL;
5252 unlock_page(page);
5353 }
54− page_cache_release(page);
54+ put_page(page);
5555 }
5656
5757 /*
@@ -93,14 +93,14 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages, · 35 unmodified lines
9393 read_cache_pages_invalidate_page(mapping, page);
9494 continue;
9595 }
96− page_cache_release(page);
96+ put_page(page);
9797
9898 ret = filler(data, page);
9999 if (unlikely(ret)) {
100100 read_cache_pages_invalidate_pages(mapping, pages);
101101 break;
102102 }
103− task_io_account_read(PAGE_CACHE_SIZE);
103+ task_io_account_read(PAGE_SIZE);
104104 }
105105 return ret;
106106 }
@@ -130,7 +130,7 @@ static int read_pages(struct address_space *mapping, struct file *filp, · 23 unmodified lines
130130 mapping_gfp_constraint(mapping, GFP_KERNEL))) {
131131 mapping->a_ops->readpage(filp, page);
132132 }
133− page_cache_release(page);
133+ put_page(page);
134134 }
135135 ret = 0;
136136
@@ -163,7 +163,7 @@ int __do_page_cache_readahead(struct address_space *mapping, struct file *filp, · 26 unmodified lines
163163 if (isize == 0)
164164 goto out;
165165
166− end_index = ((isize - 1) >> PAGE_CACHE_SHIFT);
166+ end_index = ((isize - 1) >> PAGE_SHIFT);
167167
168168 /*
169169 * Preallocate as many pages as we will need.
@@ -216,7 +216,7 @@ int force_page_cache_readahead(struct address_space *mapping, struct file *filp, · 46 unmodified lines
216216 while (nr_to_read) {
217217 int err;
218218
219− unsigned long this_chunk = (2 * 1024 * 1024) / PAGE_CACHE_SIZE;
219+ unsigned long this_chunk = (2 * 1024 * 1024) / PAGE_SIZE;
220220
221221 if (this_chunk > nr_to_read)
222222 this_chunk = nr_to_read;
@@ -425,7 +425,7 @@ ondemand_readahead(struct address_space *mapping, · 202 unmodified lines
425425 * trivial case: (offset - prev_offset) == 1
426426 * unaligned reads: (offset - prev_offset) == 0
427427 */
428− prev_offset = (unsigned long long)ra->prev_pos >> PAGE_CACHE_SHIFT;
428+ prev_offset = (unsigned long long)ra->prev_pos >> PAGE_SHIFT;
429429 if (offset - prev_offset <= 1UL)
430430 goto initial_readahead;
431431
@@ -558,8 +558,8 @@ SYSCALL_DEFINE3(readahead, int, fd, loff_t, offset, size_t, count) · 126 unmodified lines
558558 if (f.file) {
559559 if (f.file->f_mode & FMODE_READ) {
560560 struct address_space *mapping = f.file->f_mapping;
561− pgoff_t start = offset >> PAGE_CACHE_SHIFT;
562− pgoff_t end = (offset + count - 1) >> PAGE_CACHE_SHIFT;
561+ pgoff_t start = offset >> PAGE_SHIFT;
562+ pgoff_t end = (offset + count - 1) >> PAGE_SHIFT;
563563 unsigned long len = end - start + 1;
564564 ret = do_readahead(mapping, f.file, start, len);
565565 }
mm/rmap.c+1−1
@@ -1555,7 +1555,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, · 1554 unmodified lines
15551555
15561556 discard:
15571557 page_remove_rmap(page, PageHuge(page));
1558− page_cache_release(page);
1558+ put_page(page);
15591559
15601560 out_unmap:
15611561 pte_unmap_unlock(pte, ptl);
mm/shmem.c+65−65
@@ -75,8 +75,8 @@ static struct vfsmount *shm_mnt; · 74 unmodified lines
7575
7676 #include "internal.h"
7777
78−#define BLOCKS_PER_PAGE (PAGE_CACHE_SIZE/512)
79−#define VM_ACCT(size) (PAGE_CACHE_ALIGN(size) >> PAGE_SHIFT)
78+#define BLOCKS_PER_PAGE (PAGE_SIZE/512)
79+#define VM_ACCT(size) (PAGE_ALIGN(size) >> PAGE_SHIFT)
8080
8181 /* Pretend that each entry is of this size in directory's i_size */
8282 #define BOGO_DIRENT_SIZE 20
@@ -176,13 +176,13 @@ static inline int shmem_reacct_size(unsigned long flags, · 93 unmodified lines
176176 static inline int shmem_acct_block(unsigned long flags)
177177 {
178178 return (flags & VM_NORESERVE) ?
179− security_vm_enough_memory_mm(current->mm, VM_ACCT(PAGE_CACHE_SIZE)) : 0;
179+ security_vm_enough_memory_mm(current->mm, VM_ACCT(PAGE_SIZE)) : 0;
180180 }
181181
182182 static inline void shmem_unacct_blocks(unsigned long flags, long pages)
183183 {
184184 if (flags & VM_NORESERVE)
185− vm_unacct_memory(pages * VM_ACCT(PAGE_CACHE_SIZE));
185+ vm_unacct_memory(pages * VM_ACCT(PAGE_SIZE));
186186 }
187187
188188 static const struct super_operations shmem_ops;
@@ -300,7 +300,7 @@ static int shmem_add_to_page_cache(struct page *page, · 111 unmodified lines
300300 VM_BUG_ON_PAGE(!PageLocked(page), page);
301301 VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
302302
303− page_cache_get(page);
303+ get_page(page);
304304 page->mapping = mapping;
305305 page->index = index;
306306
@@ -318,7 +318,7 @@ static int shmem_add_to_page_cache(struct page *page, · 11 unmodified lines
318318 } else {
319319 page->mapping = NULL;
320320 spin_unlock_irq(&mapping->tree_lock);
321− page_cache_release(page);
321+ put_page(page);
322322 }
323323 return error;
324324 }
@@ -338,7 +338,7 @@ static void shmem_delete_from_page_cache(struct page *page, void *radswap) · 13 unmodified lines
338338 __dec_zone_page_state(page, NR_FILE_PAGES);
339339 __dec_zone_page_state(page, NR_SHMEM);
340340 spin_unlock_irq(&mapping->tree_lock);
341− page_cache_release(page);
341+ put_page(page);
342342 BUG_ON(error);
343343 }
344344
@@ -474,10 +474,10 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, · 129 unmodified lines
474474 {
475475 struct address_space *mapping = inode->i_mapping;
476476 struct shmem_inode_info *info = SHMEM_I(inode);
477− pgoff_t start = (lstart + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
478− pgoff_t end = (lend + 1) >> PAGE_CACHE_SHIFT;
479− unsigned int partial_start = lstart & (PAGE_CACHE_SIZE - 1);
480− unsigned int partial_end = (lend + 1) & (PAGE_CACHE_SIZE - 1);
477+ pgoff_t start = (lstart + PAGE_SIZE - 1) >> PAGE_SHIFT;
478+ pgoff_t end = (lend + 1) >> PAGE_SHIFT;
479+ unsigned int partial_start = lstart & (PAGE_SIZE - 1);
480+ unsigned int partial_end = (lend + 1) & (PAGE_SIZE - 1);
481481 struct pagevec pvec;
482482 pgoff_t indices[PAGEVEC_SIZE];
483483 long nr_swaps_freed = 0;
@@ -530,7 +530,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, · 46 unmodified lines
530530 struct page *page = NULL;
531531 shmem_getpage(inode, start - 1, &page, SGP_READ, NULL);
532532 if (page) {
533− unsigned int top = PAGE_CACHE_SIZE;
533+ unsigned int top = PAGE_SIZE;
534534 if (start > end) {
535535 top = partial_end;
536536 partial_end = 0;
@@ -538,7 +538,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, · 1 unmodified line
538538 zero_user_segment(page, partial_start, top);
539539 set_page_dirty(page);
540540 unlock_page(page);
541− page_cache_release(page);
541+ put_page(page);
542542 }
543543 }
544544 if (partial_end) {
@@ -548,7 +548,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, · 3 unmodified lines
548548 zero_user_segment(page, 0, partial_end);
549549 set_page_dirty(page);
550550 unlock_page(page);
551− page_cache_release(page);
551+ put_page(page);
552552 }
553553 }
554554 if (start >= end)
@@ -833,7 +833,7 @@ int shmem_unuse(swp_entry_t swap, struct page *page) · 278 unmodified lines
833833 mem_cgroup_commit_charge(page, memcg, true, false);
834834 out:
835835 unlock_page(page);
836− page_cache_release(page);
836+ put_page(page);
837837 return error;
838838 }
839839
@@ -1080,7 +1080,7 @@ static int shmem_replace_page(struct page **pagep, gfp_t gfp, · 240 unmodified lines
10801080 if (!newpage)
10811081 return -ENOMEM;
10821082
1083− page_cache_get(newpage);
1083+ get_page(newpage);
10841084 copy_highpage(newpage, oldpage);
10851085 flush_dcache_page(newpage);
10861086
@@ -1120,8 +1120,8 @@ static int shmem_replace_page(struct page **pagep, gfp_t gfp, · 33 unmodified lines
11201120 set_page_private(oldpage, 0);
11211121
11221122 unlock_page(oldpage);
1123− page_cache_release(oldpage);
1124− page_cache_release(oldpage);
1123+ put_page(oldpage);
1124+ put_page(oldpage);
11251125 return error;
11261126 }
11271127
@@ -1145,7 +1145,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index, · 17 unmodified lines
11451145 int once = 0;
11461146 int alloced = 0;
11471147
1148− if (index > (MAX_LFS_FILESIZE >> PAGE_CACHE_SHIFT))
1148+ if (index > (MAX_LFS_FILESIZE >> PAGE_SHIFT))
11491149 return -EFBIG;
11501150 repeat:
11511151 swap.val = 0;
@@ -1156,7 +1156,7 @@ repeat: · 4 unmodified lines
11561156 }
11571157
11581158 if (sgp != SGP_WRITE && sgp != SGP_FALLOC &&
1159− ((loff_t)index << PAGE_CACHE_SHIFT) >= i_size_read(inode)) {
1159+ ((loff_t)index << PAGE_SHIFT) >= i_size_read(inode)) {
11601160 error = -EINVAL;
11611161 goto unlock;
11621162 }
@@ -1169,7 +1169,7 @@ repeat: · 6 unmodified lines
11691169 if (sgp != SGP_READ)
11701170 goto clear;
11711171 unlock_page(page);
1172− page_cache_release(page);
1172+ put_page(page);
11731173 page = NULL;
11741174 }
11751175 if (page || (sgp == SGP_READ && !swap.val)) {
@@ -1327,7 +1327,7 @@ clear: · 151 unmodified lines
13271327
13281328 /* Perhaps the file has been truncated since we checked */
13291329 if (sgp != SGP_WRITE && sgp != SGP_FALLOC &&
1330− ((loff_t)index << PAGE_CACHE_SHIFT) >= i_size_read(inode)) {
1330+ ((loff_t)index << PAGE_SHIFT) >= i_size_read(inode)) {
13311331 if (alloced) {
13321332 ClearPageDirty(page);
13331333 delete_from_page_cache(page);
@@ -1355,7 +1355,7 @@ failed: · 21 unmodified lines
13551355 unlock:
13561356 if (page) {
13571357 unlock_page(page);
1358− page_cache_release(page);
1358+ put_page(page);
13591359 }
13601360 if (error == -ENOSPC && !once++) {
13611361 info = SHMEM_I(inode);
@@ -1577,7 +1577,7 @@ shmem_write_begin(struct file *file, struct address_space *mapping, · 215 unmodified lines
15771577 {
15781578 struct inode *inode = mapping->host;
15791579 struct shmem_inode_info *info = SHMEM_I(inode);
1580− pgoff_t index = pos >> PAGE_CACHE_SHIFT;
1580+ pgoff_t index = pos >> PAGE_SHIFT;
15811581
15821582 /* i_mutex is held by caller */
15831583 if (unlikely(info->seals)) {
@@ -1601,16 +1601,16 @@ shmem_write_end(struct file *file, struct address_space *mapping, · 17 unmodified lines
16011601 i_size_write(inode, pos + copied);
16021602
16031603 if (!PageUptodate(page)) {
1604− if (copied < PAGE_CACHE_SIZE) {
1605− unsigned from = pos & (PAGE_CACHE_SIZE - 1);
1604+ if (copied < PAGE_SIZE) {
1605+ unsigned from = pos & (PAGE_SIZE - 1);
16061606 zero_user_segments(page, 0, from,
1607− from + copied, PAGE_CACHE_SIZE);
1607+ from + copied, PAGE_SIZE);
16081608 }
16091609 SetPageUptodate(page);
16101610 }
16111611 set_page_dirty(page);
16121612 unlock_page(page);
1613− page_cache_release(page);
1613+ put_page(page);
16141614
16151615 return copied;
16161616 }
@@ -1635,8 +1635,8 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) · 18 unmodified lines
16351635 if (!iter_is_iovec(to))
16361636 sgp = SGP_DIRTY;
16371637
1638− index = *ppos >> PAGE_CACHE_SHIFT;
1639− offset = *ppos & ~PAGE_CACHE_MASK;
1638+ index = *ppos >> PAGE_SHIFT;
1639+ offset = *ppos & ~PAGE_MASK;
16401640
16411641 for (;;) {
16421642 struct page *page = NULL;
@@ -1644,11 +1644,11 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) · 1 unmodified line
16441644 unsigned long nr, ret;
16451645 loff_t i_size = i_size_read(inode);
16461646
1647− end_index = i_size >> PAGE_CACHE_SHIFT;
1647+ end_index = i_size >> PAGE_SHIFT;
16481648 if (index > end_index)
16491649 break;
16501650 if (index == end_index) {
1651− nr = i_size & ~PAGE_CACHE_MASK;
1651+ nr = i_size & ~PAGE_MASK;
16521652 if (nr <= offset)
16531653 break;
16541654 }
@@ -1666,14 +1666,14 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) · 11 unmodified lines
16661666 * We must evaluate after, since reads (unlike writes)
16671667 * are called without i_mutex protection against truncate
16681668 */
1669− nr = PAGE_CACHE_SIZE;
1669+ nr = PAGE_SIZE;
16701670 i_size = i_size_read(inode);
1671− end_index = i_size >> PAGE_CACHE_SHIFT;
1671+ end_index = i_size >> PAGE_SHIFT;
16721672 if (index == end_index) {
1673− nr = i_size & ~PAGE_CACHE_MASK;
1673+ nr = i_size & ~PAGE_MASK;
16741674 if (nr <= offset) {
16751675 if (page)
1676− page_cache_release(page);
1676+ put_page(page);
16771677 break;
16781678 }
16791679 }
@@ -1694,7 +1694,7 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) · 14 unmodified lines
16941694 mark_page_accessed(page);
16951695 } else {
16961696 page = ZERO_PAGE(0);
1697− page_cache_get(page);
1697+ get_page(page);
16981698 }
16991699
17001700 /*
@@ -1704,10 +1704,10 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) · 3 unmodified lines
17041704 ret = copy_page_to_iter(page, offset, nr, to);
17051705 retval += ret;
17061706 offset += ret;
1707− index += offset >> PAGE_CACHE_SHIFT;
1708− offset &= ~PAGE_CACHE_MASK;
1707+ index += offset >> PAGE_SHIFT;
1708+ offset &= ~PAGE_MASK;
17091709
1710− page_cache_release(page);
1710+ put_page(page);
17111711 if (!iov_iter_count(to))
17121712 break;
17131713 if (ret < nr) {
@@ -1717,7 +1717,7 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) · 3 unmodified lines
17171717 cond_resched();
17181718 }
17191719
1720− *ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset;
1720+ *ppos = ((loff_t) index << PAGE_SHIFT) + offset;
17211721 file_accessed(file);
17221722 return retval ? retval : error;
17231723 }
@@ -1755,9 +1755,9 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos, · 31 unmodified lines
17551755 if (splice_grow_spd(pipe, &spd))
17561756 return -ENOMEM;
17571757
1758− index = *ppos >> PAGE_CACHE_SHIFT;
1759− loff = *ppos & ~PAGE_CACHE_MASK;
1760− req_pages = (len + loff + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
1758+ index = *ppos >> PAGE_SHIFT;
1759+ loff = *ppos & ~PAGE_MASK;
1760+ req_pages = (len + loff + PAGE_SIZE - 1) >> PAGE_SHIFT;
17611761 nr_pages = min(req_pages, spd.nr_pages_max);
17621762
17631763 spd.nr_pages = find_get_pages_contig(mapping, index,
@@ -1774,7 +1774,7 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos, · 10 unmodified lines
17741774 index++;
17751775 }
17761776
1777− index = *ppos >> PAGE_CACHE_SHIFT;
1777+ index = *ppos >> PAGE_SHIFT;
17781778 nr_pages = spd.nr_pages;
17791779 spd.nr_pages = 0;
17801780
@@ -1784,7 +1784,7 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos, · 3 unmodified lines
17841784 if (!len)
17851785 break;
17861786
1787− this_len = min_t(unsigned long, len, PAGE_CACHE_SIZE - loff);
1787+ this_len = min_t(unsigned long, len, PAGE_SIZE - loff);
17881788 page = spd.pages[page_nr];
17891789
17901790 if (!PageUptodate(page) || page->mapping != mapping) {
@@ -1793,19 +1793,19 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos, · 2 unmodified lines
17931793 if (error)
17941794 break;
17951795 unlock_page(page);
1796− page_cache_release(spd.pages[page_nr]);
1796+ put_page(spd.pages[page_nr]);
17971797 spd.pages[page_nr] = page;
17981798 }
17991799
18001800 isize = i_size_read(inode);
1801− end_index = (isize - 1) >> PAGE_CACHE_SHIFT;
1801+ end_index = (isize - 1) >> PAGE_SHIFT;
18021802 if (unlikely(!isize || index > end_index))
18031803 break;
18041804
18051805 if (end_index == index) {
18061806 unsigned int plen;
18071807
1808− plen = ((isize - 1) & ~PAGE_CACHE_MASK) + 1;
1808+ plen = ((isize - 1) & ~PAGE_MASK) + 1;
18091809 if (plen <= loff)
18101810 break;
18111811
@@ -1822,7 +1822,7 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos, · 10 unmodified lines
18221822 }
18231823
18241824 while (page_nr < nr_pages)
1825− page_cache_release(spd.pages[page_nr++]);
1825+ put_page(spd.pages[page_nr++]);
18261826
18271827 if (spd.nr_pages)
18281828 error = splice_to_pipe(pipe, &spd);
@@ -1904,10 +1904,10 @@ static loff_t shmem_file_llseek(struct file *file, loff_t offset, int whence) · 75 unmodified lines
19041904 else if (offset >= inode->i_size)
19051905 offset = -ENXIO;
19061906 else {
1907− start = offset >> PAGE_CACHE_SHIFT;
1908− end = (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
1907+ start = offset >> PAGE_SHIFT;
1908+ end = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
19091909 new_offset = shmem_seek_hole_data(mapping, start, end, whence);
1910− new_offset <<= PAGE_CACHE_SHIFT;
1910+ new_offset <<= PAGE_SHIFT;
19111911 if (new_offset > offset) {
19121912 if (new_offset < inode->i_size)
19131913 offset = new_offset;
@@ -2203,8 +2203,8 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, · 289 unmodified lines
22032203 goto out;
22042204 }
22052205
2206− start = offset >> PAGE_CACHE_SHIFT;
2207− end = (offset + len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
2206+ start = offset >> PAGE_SHIFT;
2207+ end = (offset + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
22082208 /* Try to avoid a swapstorm if len is impossible to satisfy */
22092209 if (sbinfo->max_blocks && end - start > sbinfo->max_blocks) {
22102210 error = -ENOSPC;
@@ -2237,8 +2237,8 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, · 26 unmodified lines
22372237 if (error) {
22382238 /* Remove the !PageUptodate pages we added */
22392239 shmem_undo_range(inode,
2240− (loff_t)start << PAGE_CACHE_SHIFT,
2241− (loff_t)index << PAGE_CACHE_SHIFT, true);
2240+ (loff_t)start << PAGE_SHIFT,
2241+ (loff_t)index << PAGE_SHIFT, true);
22422242 goto undone;
22432243 }
22442244
@@ -2259,7 +2259,7 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, · 14 unmodified lines
22592259 */
22602260 set_page_dirty(page);
22612261 unlock_page(page);
2262− page_cache_release(page);
2262+ put_page(page);
22632263 cond_resched();
22642264 }
22652265
@@ -2280,7 +2280,7 @@ static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf) · 14 unmodified lines
22802280 struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb);
22812281
22822282 buf->f_type = TMPFS_MAGIC;
2283− buf->f_bsize = PAGE_CACHE_SIZE;
2283+ buf->f_bsize = PAGE_SIZE;
22842284 buf->f_namelen = NAME_MAX;
22852285 if (sbinfo->max_blocks) {
22862286 buf->f_blocks = sbinfo->max_blocks;
@@ -2523,7 +2523,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s · 236 unmodified lines
25232523 struct shmem_inode_info *info;
25242524
25252525 len = strlen(symname) + 1;
2526− if (len > PAGE_CACHE_SIZE)
2526+ if (len > PAGE_SIZE)
25272527 return -ENAMETOOLONG;
25282528
25292529 inode = shmem_get_inode(dir->i_sb, dir, S_IFLNK|S_IRWXUGO, 0, VM_NORESERVE);
@@ -2562,7 +2562,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s · 32 unmodified lines
25622562 SetPageUptodate(page);
25632563 set_page_dirty(page);
25642564 unlock_page(page);
2565− page_cache_release(page);
2565+ put_page(page);
25662566 }
25672567 dir->i_size += BOGO_DIRENT_SIZE;
25682568 dir->i_ctime = dir->i_mtime = CURRENT_TIME;
@@ -2835,7 +2835,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo, · 266 unmodified lines
28352835 if (*rest)
28362836 goto bad_val;
28372837 sbinfo->max_blocks =
2838− DIV_ROUND_UP(size, PAGE_CACHE_SIZE);
2838+ DIV_ROUND_UP(size, PAGE_SIZE);
28392839 } else if (!strcmp(this_char,"nr_blocks")) {
28402840 sbinfo->max_blocks = memparse(value, &rest);
28412841 if (*rest)
@@ -2940,7 +2940,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root) · 98 unmodified lines
29402940
29412941 if (sbinfo->max_blocks != shmem_default_max_blocks())
29422942 seq_printf(seq, ",size=%luk",
2943− sbinfo->max_blocks << (PAGE_CACHE_SHIFT - 10));
2943+ sbinfo->max_blocks << (PAGE_SHIFT - 10));
29442944 if (sbinfo->max_inodes != shmem_default_max_inodes())
29452945 seq_printf(seq, ",nr_inodes=%lu", sbinfo->max_inodes);
29462946 if (sbinfo->mode != (S_IRWXUGO | S_ISVTX))
@@ -3082,8 +3082,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) · 135 unmodified lines
30823082 sbinfo->free_inodes = sbinfo->max_inodes;
30833083
30843084 sb->s_maxbytes = MAX_LFS_FILESIZE;
3085− sb->s_blocksize = PAGE_CACHE_SIZE;
3086− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
3085+ sb->s_blocksize = PAGE_SIZE;
3086+ sb->s_blocksize_bits = PAGE_SHIFT;
30873087 sb->s_magic = TMPFS_MAGIC;
30883088 sb->s_op = &shmem_ops;
30893089 sb->s_time_gran = 1;
mm/swap.c+6−6
@@ -114,7 +114,7 @@ void put_pages_list(struct list_head *pages) · 113 unmodified lines
114114
115115 victim = list_entry(pages->prev, struct page, lru);
116116 list_del(&victim->lru);
117− page_cache_release(victim);
117+ put_page(victim);
118118 }
119119 }
120120 EXPORT_SYMBOL(put_pages_list);
@@ -142,7 +142,7 @@ int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write, · 21 unmodified lines
142142 return seg;
143143
144144 pages[seg] = kmap_to_page(kiov[seg].iov_base);
145− page_cache_get(pages[seg]);
145+ get_page(pages[seg]);
146146 }
147147
148148 return seg;
@@ -236,7 +236,7 @@ void rotate_reclaimable_page(struct page *page) · 87 unmodified lines
236236 struct pagevec *pvec;
237237 unsigned long flags;
238238
239− page_cache_get(page);
239+ get_page(page);
240240 local_irq_save(flags);
241241 pvec = this_cpu_ptr(&lru_rotate_pvecs);
242242 if (!pagevec_add(pvec, page))
@@ -294,7 +294,7 @@ void activate_page(struct page *page) · 51 unmodified lines
294294 if (PageLRU(page) && !PageActive(page) && !PageUnevictable(page)) {
295295 struct pagevec *pvec = &get_cpu_var(activate_page_pvecs);
296296
297− page_cache_get(page);
297+ get_page(page);
298298 if (!pagevec_add(pvec, page))
299299 pagevec_lru_move_fn(pvec, __activate_page, NULL);
300300 put_cpu_var(activate_page_pvecs);
@@ -389,7 +389,7 @@ static void __lru_cache_add(struct page *page) · 88 unmodified lines
389389 {
390390 struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
391391
392− page_cache_get(page);
392+ get_page(page);
393393 if (!pagevec_space(pvec))
394394 __pagevec_lru_add(pvec);
395395 pagevec_add(pvec, page);
@@ -646,7 +646,7 @@ void deactivate_page(struct page *page) · 250 unmodified lines
646646 if (PageLRU(page) && PageActive(page) && !PageUnevictable(page)) {
647647 struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs);
648648
649− page_cache_get(page);
649+ get_page(page);
650650 if (!pagevec_add(pvec, page))
651651 pagevec_lru_move_fn(pvec, lru_deactivate_fn, NULL);
652652 put_cpu_var(lru_deactivate_pvecs);
mm/swap_state.c+6−6
@@ -85,7 +85,7 @@ int __add_to_swap_cache(struct page *page, swp_entry_t entry) · 84 unmodified lines
8585 VM_BUG_ON_PAGE(PageSwapCache(page), page);
8686 VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
8787
88− page_cache_get(page);
88+ get_page(page);
8989 SetPageSwapCache(page);
9090 set_page_private(page, entry.val);
9191
@@ -109,7 +109,7 @@ int __add_to_swap_cache(struct page *page, swp_entry_t entry) · 17 unmodified lines
109109 VM_BUG_ON(error == -EEXIST);
110110 set_page_private(page, 0UL);
111111 ClearPageSwapCache(page);
112− page_cache_release(page);
112+ put_page(page);
113113 }
114114
115115 return error;
@@ -226,7 +226,7 @@ void delete_from_swap_cache(struct page *page) · 110 unmodified lines
226226 spin_unlock_irq(&address_space->tree_lock);
227227
228228 swapcache_free(entry);
229− page_cache_release(page);
229+ put_page(page);
230230 }
231231
232232 /*
@@ -252,7 +252,7 @@ static inline void free_swap_cache(struct page *page) · 19 unmodified lines
252252 void free_page_and_swap_cache(struct page *page)
253253 {
254254 free_swap_cache(page);
255− page_cache_release(page);
255+ put_page(page);
256256 }
257257
258258 /*
@@ -380,7 +380,7 @@ struct page *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, · 121 unmodified lines
380380 } while (err != -ENOMEM);
381381
382382 if (new_page)
383− page_cache_release(new_page);
383+ put_page(new_page);
384384 return found_page;
385385 }
386386
@@ -495,7 +495,7 @@ struct page *swapin_readahead(swp_entry_t entry, gfp_t gfp_mask, · 108 unmodified lines
495495 continue;
496496 if (offset != entry_offset)
497497 SetPageReadahead(page);
498− page_cache_release(page);
498+ put_page(page);
499499 }
500500 blk_finish_plug(&plug);
501501
mm/swapfile.c+6−6
@@ -119,7 +119,7 @@ __try_to_reclaim_swap(struct swap_info_struct *si, unsigned long offset) · 118 unmodified lines
119119 ret = try_to_free_swap(page);
120120 unlock_page(page);
121121 }
122− page_cache_release(page);
122+ put_page(page);
123123 return ret;
124124 }
125125
@@ -1000,7 +1000,7 @@ int free_swap_and_cache(swp_entry_t entry) · 874 unmodified lines
10001000 page = find_get_page(swap_address_space(entry),
10011001 entry.val);
10021002 if (page && !trylock_page(page)) {
1003− page_cache_release(page);
1003+ put_page(page);
10041004 page = NULL;
10051005 }
10061006 }
@@ -1017,7 +1017,7 @@ int free_swap_and_cache(swp_entry_t entry) · 10 unmodified lines
10171017 SetPageDirty(page);
10181018 }
10191019 unlock_page(page);
1020− page_cache_release(page);
1020+ put_page(page);
10211021 }
10221022 return p != NULL;
10231023 }
@@ -1518,7 +1518,7 @@ int try_to_unuse(unsigned int type, bool frontswap, · 494 unmodified lines
15181518 }
15191519 if (retval) {
15201520 unlock_page(page);
1521− page_cache_release(page);
1521+ put_page(page);
15221522 break;
15231523 }
15241524
@@ -1570,7 +1570,7 @@ int try_to_unuse(unsigned int type, bool frontswap, · 45 unmodified lines
15701570 */
15711571 SetPageDirty(page);
15721572 unlock_page(page);
1573− page_cache_release(page);
1573+ put_page(page);
15741574
15751575 /*
15761576 * Make sure that we aren't completely killing
@@ -2574,7 +2574,7 @@ bad_swap: · 997 unmodified lines
25742574 out:
25752575 if (page && !IS_ERR(page)) {
25762576 kunmap(page);
2577− page_cache_release(page);
2577+ put_page(page);
25782578 }
25792579 if (name)
25802580 putname(name);
mm/truncate.c+20−20
@@ -118,7 +118,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page) · 117 unmodified lines
118118 return -EIO;
119119
120120 if (page_has_private(page))
121− do_invalidatepage(page, 0, PAGE_CACHE_SIZE);
121+ do_invalidatepage(page, 0, PAGE_SIZE);
122122
123123 /*
124124 * Some filesystems seem to re-dirty the page even after
@@ -159,8 +159,8 @@ int truncate_inode_page(struct address_space *mapping, struct page *page) · 34 unmodified lines
159159 {
160160 if (page_mapped(page)) {
161161 unmap_mapping_range(mapping,
162− (loff_t)page->index << PAGE_CACHE_SHIFT,
163− PAGE_CACHE_SIZE, 0);
162+ (loff_t)page->index << PAGE_SHIFT,
163+ PAGE_SIZE, 0);
164164 }
165165 return truncate_complete_page(mapping, page);
166166 }
@@ -241,8 +241,8 @@ void truncate_inode_pages_range(struct address_space *mapping, · 74 unmodified lines
241241 return;
242242
243243 /* Offsets within partial pages */
244− partial_start = lstart & (PAGE_CACHE_SIZE - 1);
245− partial_end = (lend + 1) & (PAGE_CACHE_SIZE - 1);
244+ partial_start = lstart & (PAGE_SIZE - 1);
245+ partial_end = (lend + 1) & (PAGE_SIZE - 1);
246246
247247 /*
248248 * 'start' and 'end' always covers the range of pages to be fully
@@ -250,7 +250,7 @@ void truncate_inode_pages_range(struct address_space *mapping, · 1 unmodified line
250250 * start of the range and 'partial_end' at the end of the range.
251251 * Note that 'end' is exclusive while 'lend' is inclusive.
252252 */
253− start = (lstart + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
253+ start = (lstart + PAGE_SIZE - 1) >> PAGE_SHIFT;
254254 if (lend == -1)
255255 /*
256256 * lend == -1 indicates end-of-file so we have to set 'end'
@@ -259,7 +259,7 @@ void truncate_inode_pages_range(struct address_space *mapping, · 2 unmodified lines
259259 */
260260 end = -1;
261261 else
262− end = (lend + 1) >> PAGE_CACHE_SHIFT;
262+ end = (lend + 1) >> PAGE_SHIFT;
263263
264264 pagevec_init(&pvec, 0);
265265 index = start;
@@ -298,7 +298,7 @@ void truncate_inode_pages_range(struct address_space *mapping, · 32 unmodified lines
298298 if (partial_start) {
299299 struct page *page = find_lock_page(mapping, start - 1);
300300 if (page) {
301− unsigned int top = PAGE_CACHE_SIZE;
301+ unsigned int top = PAGE_SIZE;
302302 if (start > end) {
303303 /* Truncation within a single page */
304304 top = partial_end;
@@ -311,7 +311,7 @@ void truncate_inode_pages_range(struct address_space *mapping, · 6 unmodified lines
311311 do_invalidatepage(page, partial_start,
312312 top - partial_start);
313313 unlock_page(page);
314− page_cache_release(page);
314+ put_page(page);
315315 }
316316 }
317317 if (partial_end) {
@@ -324,7 +324,7 @@ void truncate_inode_pages_range(struct address_space *mapping, · 6 unmodified lines
324324 do_invalidatepage(page, 0,
325325 partial_end);
326326 unlock_page(page);
327− page_cache_release(page);
327+ put_page(page);
328328 }
329329 }
330330 /*
@@ -538,7 +538,7 @@ invalidate_complete_page2(struct address_space *mapping, struct page *page) · 207 unmodified lines
538538 if (mapping->a_ops->freepage)
539539 mapping->a_ops->freepage(page);
540540
541− page_cache_release(page); /* pagecache ref */
541+ put_page(page); /* pagecache ref */
542542 return 1;
543543 failed:
544544 spin_unlock_irqrestore(&mapping->tree_lock, flags);
@@ -608,18 +608,18 @@ int invalidate_inode_pages2_range(struct address_space *mapping, · 63 unmodified lines
608608 * Zap the rest of the file in one hit.
609609 */
610610 unmap_mapping_range(mapping,
611− (loff_t)index << PAGE_CACHE_SHIFT,
611+ (loff_t)index << PAGE_SHIFT,
612612 (loff_t)(1 + end - index)
613− << PAGE_CACHE_SHIFT,
614− 0);
613+ << PAGE_SHIFT,
614+ 0);
615615 did_range_unmap = 1;
616616 } else {
617617 /*
618618 * Just zap this page
619619 */
620620 unmap_mapping_range(mapping,
621− (loff_t)index << PAGE_CACHE_SHIFT,
622− PAGE_CACHE_SIZE, 0);
621+ (loff_t)index << PAGE_SHIFT,
622+ PAGE_SIZE, 0);
623623 }
624624 }
625625 BUG_ON(page_mapped(page));
@@ -744,14 +744,14 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) · 118 unmodified lines
744744
745745 WARN_ON(to > inode->i_size);
746746
747− if (from >= to || bsize == PAGE_CACHE_SIZE)
747+ if (from >= to || bsize == PAGE_SIZE)
748748 return;
749749 /* Page straddling @from will not have any hole block created? */
750750 rounded_from = round_up(from, bsize);
751− if (to <= rounded_from || !(rounded_from & (PAGE_CACHE_SIZE - 1)))
751+ if (to <= rounded_from || !(rounded_from & (PAGE_SIZE - 1)))
752752 return;
753753
754− index = from >> PAGE_CACHE_SHIFT;
754+ index = from >> PAGE_SHIFT;
755755 page = find_lock_page(inode->i_mapping, index);
756756 /* Page not cached? Nothing to do */
757757 if (!page)
@@ -763,7 +763,7 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) · 5 unmodified lines
763763 if (page_mkclean(page))
764764 set_page_dirty(page);
765765 unlock_page(page);
766− page_cache_release(page);
766+ put_page(page);
767767 }
768768 EXPORT_SYMBOL(pagecache_isize_extended);
769769
mm/userfaultfd.c+2−2
@@ -93,7 +93,7 @@ out_release_uncharge_unlock: · 92 unmodified lines
9393 pte_unmap_unlock(dst_pte, ptl);
9494 mem_cgroup_cancel_charge(page, memcg, false);
9595 out_release:
96− page_cache_release(page);
96+ put_page(page);
9797 goto out;
9898 }
9999
@@ -287,7 +287,7 @@ out_unlock: · 187 unmodified lines
287287 up_read(&dst_mm->mmap_sem);
288288 out:
289289 if (page)
290− page_cache_release(page);
290+ put_page(page);
291291 BUG_ON(copied < 0);
292292 BUG_ON(err > 0);
293293 BUG_ON(!copied && !err);
mm/zswap.c+2−2
@@ -869,7 +869,7 @@ static int zswap_writeback_entry(struct zpool *pool, unsigned long handle) · 868 unmodified lines
869869
870870 case ZSWAP_SWAPCACHE_EXIST:
871871 /* page is already in the swap cache, ignore for now */
872− page_cache_release(page);
872+ put_page(page);
873873 ret = -EEXIST;
874874 goto fail;
875875
@@ -897,7 +897,7 @@ static int zswap_writeback_entry(struct zpool *pool, unsigned long handle) · 21 unmodified lines
897897
898898 /* start writeback */
899899 __swap_writepage(page, &wbc, end_swap_bio_write);
900− page_cache_release(page);
900+ put_page(page);
901901 zswap_written_back_pages++;
902902
903903 spin_lock(&tree->lock);
net/ceph/messenger.c+3−3
@@ -269,7 +269,7 @@ static void _ceph_msgr_exit(void) · 268 unmodified lines
269269 }
270270
271271 BUG_ON(zero_page == NULL);
272− page_cache_release(zero_page);
272+ put_page(zero_page);
273273 zero_page = NULL;
274274
275275 ceph_msgr_slab_exit();
@@ -282,7 +282,7 @@ int ceph_msgr_init(void) · 6 unmodified lines
282282
283283 BUG_ON(zero_page != NULL);
284284 zero_page = ZERO_PAGE(0);
285− page_cache_get(zero_page);
285+ get_page(zero_page);
286286
287287 /*
288288 * The number of active work items is limited by the number of
@@ -1602,7 +1602,7 @@ static int write_partial_skip(struct ceph_connection *con) · 1313 unmodified lines
16021602
16031603 dout("%s %p %d left\n", __func__, con, con->out_skip);
16041604 while (con->out_skip > 0) {
1605− size_t size = min(con->out_skip, (int) PAGE_CACHE_SIZE);
1605+ size_t size = min(con->out_skip, (int) PAGE_SIZE);
16061606
16071607 ret = ceph_tcp_sendpage(con->sock, zero_page, 0, size, true);
16081608 if (ret <= 0)
net/ceph/pagelist.c+2−2
@@ -56,7 +56,7 @@ int ceph_pagelist_append(struct ceph_pagelist *pl, const void *buf, size_t len) · 55 unmodified lines
5656 size_t bit = pl->room;
5757 int ret;
5858
59− memcpy(pl->mapped_tail + (pl->length & ~PAGE_CACHE_MASK),
59+ memcpy(pl->mapped_tail + (pl->length & ~PAGE_MASK),
6060 buf, bit);
6161 pl->length += bit;
6262 pl->room -= bit;
@@ -67,7 +67,7 @@ int ceph_pagelist_append(struct ceph_pagelist *pl, const void *buf, size_t len) · 4 unmodified lines
6767 return ret;
6868 }
6969
70− memcpy(pl->mapped_tail + (pl->length & ~PAGE_CACHE_MASK), buf, len);
70+ memcpy(pl->mapped_tail + (pl->length & ~PAGE_MASK), buf, len);
7171 pl->length += len;
7272 pl->room -= len;
7373 return 0;
net/ceph/pagevec.c+15−15
@@ -95,19 +95,19 @@ int ceph_copy_user_to_page_vector(struct page **pages, · 94 unmodified lines
9595 loff_t off, size_t len)
9696 {
9797 int i = 0;
98− int po = off & ~PAGE_CACHE_MASK;
98+ int po = off & ~PAGE_MASK;
9999 int left = len;
100100 int l, bad;
101101
102102 while (left > 0) {
103− l = min_t(int, PAGE_CACHE_SIZE-po, left);
103+ l = min_t(int, PAGE_SIZE-po, left);
104104 bad = copy_from_user(page_address(pages[i]) + po, data, l);
105105 if (bad == l)
106106 return -EFAULT;
107107 data += l - bad;
108108 left -= l - bad;
109109 po += l - bad;
110− if (po == PAGE_CACHE_SIZE) {
110+ if (po == PAGE_SIZE) {
111111 po = 0;
112112 i++;
113113 }
@@ -121,17 +121,17 @@ void ceph_copy_to_page_vector(struct page **pages, · 7 unmodified lines
121121 loff_t off, size_t len)
122122 {
123123 int i = 0;
124− size_t po = off & ~PAGE_CACHE_MASK;
124+ size_t po = off & ~PAGE_MASK;
125125 size_t left = len;
126126
127127 while (left > 0) {
128− size_t l = min_t(size_t, PAGE_CACHE_SIZE-po, left);
128+ size_t l = min_t(size_t, PAGE_SIZE-po, left);
129129
130130 memcpy(page_address(pages[i]) + po, data, l);
131131 data += l;
132132 left -= l;
133133 po += l;
134− if (po == PAGE_CACHE_SIZE) {
134+ if (po == PAGE_SIZE) {
135135 po = 0;
136136 i++;
137137 }
@@ -144,17 +144,17 @@ void ceph_copy_from_page_vector(struct page **pages, · 6 unmodified lines
144144 loff_t off, size_t len)
145145 {
146146 int i = 0;
147− size_t po = off & ~PAGE_CACHE_MASK;
147+ size_t po = off & ~PAGE_MASK;
148148 size_t left = len;
149149
150150 while (left > 0) {
151− size_t l = min_t(size_t, PAGE_CACHE_SIZE-po, left);
151+ size_t l = min_t(size_t, PAGE_SIZE-po, left);
152152
153153 memcpy(data, page_address(pages[i]) + po, l);
154154 data += l;
155155 left -= l;
156156 po += l;
157− if (po == PAGE_CACHE_SIZE) {
157+ if (po == PAGE_SIZE) {
158158 po = 0;
159159 i++;
160160 }
@@ -168,25 +168,25 @@ EXPORT_SYMBOL(ceph_copy_from_page_vector); · 7 unmodified lines
168168 */
169169 void ceph_zero_page_vector_range(int off, int len, struct page **pages)
170170 {
171− int i = off >> PAGE_CACHE_SHIFT;
171+ int i = off >> PAGE_SHIFT;
172172
173− off &= ~PAGE_CACHE_MASK;
173+ off &= ~PAGE_MASK;
174174
175175 dout("zero_page_vector_page %u~%u\n", off, len);
176176
177177 /* leading partial page? */
178178 if (off) {
179− int end = min((int)PAGE_CACHE_SIZE, off + len);
179+ int end = min((int)PAGE_SIZE, off + len);
180180 dout("zeroing %d %p head from %d\n", i, pages[i],
181181 (int)off);
182182 zero_user_segment(pages[i], off, end);
183183 len -= (end - off);
184184 i++;
185185 }
186− while (len >= PAGE_CACHE_SIZE) {
186+ while (len >= PAGE_SIZE) {
187187 dout("zeroing %d %p len=%d\n", i, pages[i], len);
188− zero_user_segment(pages[i], 0, PAGE_CACHE_SIZE);
189− len -= PAGE_CACHE_SIZE;
188+ zero_user_segment(pages[i], 0, PAGE_SIZE);
189+ len -= PAGE_SIZE;
190190 i++;
191191 }
192192 /* trailing partial page? */
net/sunrpc/auth_gss/auth_gss.c+4−4
@@ -1728,8 +1728,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp) · 1727 unmodified lines
17281728 return 0;
17291729 }
17301730
1731− first = snd_buf->page_base >> PAGE_CACHE_SHIFT;
1732− last = (snd_buf->page_base + snd_buf->page_len - 1) >> PAGE_CACHE_SHIFT;
1731+ first = snd_buf->page_base >> PAGE_SHIFT;
1732+ last = (snd_buf->page_base + snd_buf->page_len - 1) >> PAGE_SHIFT;
17331733 rqstp->rq_enc_pages_num = last - first + 1 + 1;
17341734 rqstp->rq_enc_pages
17351735 = kmalloc(rqstp->rq_enc_pages_num * sizeof(struct page *),
@@ -1775,10 +1775,10 @@ gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, · 39 unmodified lines
17751775 status = alloc_enc_pages(rqstp);
17761776 if (status)
17771777 return status;
1778− first = snd_buf->page_base >> PAGE_CACHE_SHIFT;
1778+ first = snd_buf->page_base >> PAGE_SHIFT;
17791779 inpages = snd_buf->pages + first;
17801780 snd_buf->pages = rqstp->rq_enc_pages;
1781− snd_buf->page_base -= first << PAGE_CACHE_SHIFT;
1781+ snd_buf->page_base -= first << PAGE_SHIFT;
17821782 /*
17831783 * Give the tail its own page, in case we need extra space in the
17841784 * head when wrapping:
net/sunrpc/auth_gss/gss_krb5_crypto.c+1−1
@@ -465,7 +465,7 @@ encryptor(struct scatterlist *sg, void *data) · 464 unmodified lines
465465 page_pos = desc->pos - outbuf->head[0].iov_len;
466466 if (page_pos >= 0 && page_pos < outbuf->page_len) {
467467 /* pages are not in place: */
468− int i = (page_pos + outbuf->page_base) >> PAGE_CACHE_SHIFT;
468+ int i = (page_pos + outbuf->page_base) >> PAGE_SHIFT;
469469 in_page = desc->pages[i];
470470 } else {
471471 in_page = sg_page(sg);
net/sunrpc/auth_gss/gss_krb5_wrap.c+2−2
@@ -79,9 +79,9 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize) · 78 unmodified lines
7979 len -= buf->head[0].iov_len;
8080 if (len <= buf->page_len) {
8181 unsigned int last = (buf->page_base + len - 1)
82− >>PAGE_CACHE_SHIFT;
82+ >>PAGE_SHIFT;
8383 unsigned int offset = (buf->page_base + len - 1)
84− & (PAGE_CACHE_SIZE - 1);
84+ & (PAGE_SIZE - 1);
8585 ptr = kmap_atomic(buf->pages[last]);
8686 pad = *(ptr + offset);
8787 kunmap_atomic(ptr);
net/sunrpc/cache.c+2−2
@@ -881,7 +881,7 @@ static ssize_t cache_downcall(struct address_space *mapping, · 880 unmodified lines
881881 char *kaddr;
882882 ssize_t ret = -ENOMEM;
883883
884− if (count >= PAGE_CACHE_SIZE)
884+ if (count >= PAGE_SIZE)
885885 goto out_slow;
886886
887887 page = find_or_create_page(mapping, 0, GFP_KERNEL);
@@ -892,7 +892,7 @@ static ssize_t cache_downcall(struct address_space *mapping, · 4 unmodified lines
892892 ret = cache_do_downcall(kaddr, buf, count, cd);
893893 kunmap(page);
894894 unlock_page(page);
895− page_cache_release(page);
895+ put_page(page);
896896 return ret;
897897 out_slow:
898898 return cache_slow_downcall(buf, count, cd);
net/sunrpc/rpc_pipe.c+2−2
@@ -1390,8 +1390,8 @@ rpc_fill_super(struct super_block *sb, void *data, int silent) · 1389 unmodified lines
13901390 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
13911391 int err;
13921392
1393− sb->s_blocksize = PAGE_CACHE_SIZE;
1394− sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
1393+ sb->s_blocksize = PAGE_SIZE;
1394+ sb->s_blocksize_bits = PAGE_SHIFT;
13951395 sb->s_magic = RPCAUTH_GSSMAGIC;
13961396 sb->s_op = &s_ops;
13971397 sb->s_d_op = &simple_dentry_operations;
net/sunrpc/socklib.c+3−3
@@ -96,8 +96,8 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct · 95 unmodified lines
9696 if (base || xdr->page_base) {
9797 pglen -= base;
9898 base += xdr->page_base;
99− ppage += base >> PAGE_CACHE_SHIFT;
100− base &= ~PAGE_CACHE_MASK;
99+ ppage += base >> PAGE_SHIFT;
100+ base &= ~PAGE_MASK;
101101 }
102102 do {
103103 char *kaddr;
@@ -113,7 +113,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct · 9 unmodified lines
113113 }
114114 }
115115
116− len = PAGE_CACHE_SIZE;
116+ len = PAGE_SIZE;
117117 kaddr = kmap_atomic(*ppage);
118118 if (base) {
119119 len -= base;
net/sunrpc/xdr.c+24−24
@@ -181,20 +181,20 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base, · 180 unmodified lines
181181 pgto_base += len;
182182 pgfrom_base += len;
183183
184− pgto = pages + (pgto_base >> PAGE_CACHE_SHIFT);
185− pgfrom = pages + (pgfrom_base >> PAGE_CACHE_SHIFT);
184+ pgto = pages + (pgto_base >> PAGE_SHIFT);
185+ pgfrom = pages + (pgfrom_base >> PAGE_SHIFT);
186186
187− pgto_base &= ~PAGE_CACHE_MASK;
188− pgfrom_base &= ~PAGE_CACHE_MASK;
187+ pgto_base &= ~PAGE_MASK;
188+ pgfrom_base &= ~PAGE_MASK;
189189
190190 do {
191191 /* Are any pointers crossing a page boundary? */
192192 if (pgto_base == 0) {
193− pgto_base = PAGE_CACHE_SIZE;
193+ pgto_base = PAGE_SIZE;
194194 pgto--;
195195 }
196196 if (pgfrom_base == 0) {
197− pgfrom_base = PAGE_CACHE_SIZE;
197+ pgfrom_base = PAGE_SIZE;
198198 pgfrom--;
199199 }
200200
@@ -236,11 +236,11 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len) · 35 unmodified lines
236236 char *vto;
237237 size_t copy;
238238
239− pgto = pages + (pgbase >> PAGE_CACHE_SHIFT);
240− pgbase &= ~PAGE_CACHE_MASK;
239+ pgto = pages + (pgbase >> PAGE_SHIFT);
240+ pgbase &= ~PAGE_MASK;
241241
242242 for (;;) {
243− copy = PAGE_CACHE_SIZE - pgbase;
243+ copy = PAGE_SIZE - pgbase;
244244 if (copy > len)
245245 copy = len;
246246
@@ -253,7 +253,7 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len) · 6 unmodified lines
253253 break;
254254
255255 pgbase += copy;
256− if (pgbase == PAGE_CACHE_SIZE) {
256+ if (pgbase == PAGE_SIZE) {
257257 flush_dcache_page(*pgto);
258258 pgbase = 0;
259259 pgto++;
@@ -280,11 +280,11 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len) · 20 unmodified lines
280280 char *vfrom;
281281 size_t copy;
282282
283− pgfrom = pages + (pgbase >> PAGE_CACHE_SHIFT);
284− pgbase &= ~PAGE_CACHE_MASK;
283+ pgfrom = pages + (pgbase >> PAGE_SHIFT);
284+ pgbase &= ~PAGE_MASK;
285285
286286 do {
287− copy = PAGE_CACHE_SIZE - pgbase;
287+ copy = PAGE_SIZE - pgbase;
288288 if (copy > len)
289289 copy = len;
290290
@@ -293,7 +293,7 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len) · 2 unmodified lines
293293 kunmap_atomic(vfrom);
294294
295295 pgbase += copy;
296− if (pgbase == PAGE_CACHE_SIZE) {
296+ if (pgbase == PAGE_SIZE) {
297297 pgbase = 0;
298298 pgfrom++;
299299 }
@@ -1038,8 +1038,8 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf, · 738 unmodified lines
10381038 if (base < buf->page_len) {
10391039 subbuf->page_len = min(buf->page_len - base, len);
10401040 base += buf->page_base;
1041− subbuf->page_base = base & ~PAGE_CACHE_MASK;
1042− subbuf->pages = &buf->pages[base >> PAGE_CACHE_SHIFT];
1041+ subbuf->page_base = base & ~PAGE_MASK;
1042+ subbuf->pages = &buf->pages[base >> PAGE_SHIFT];
10431043 len -= subbuf->page_len;
10441044 base = 0;
10451045 } else {
@@ -1297,9 +1297,9 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base, · 251 unmodified lines
12971297 todo -= avail_here;
12981298
12991299 base += buf->page_base;
1300− ppages = buf->pages + (base >> PAGE_CACHE_SHIFT);
1301− base &= ~PAGE_CACHE_MASK;
1302− avail_page = min_t(unsigned int, PAGE_CACHE_SIZE - base,
1300+ ppages = buf->pages + (base >> PAGE_SHIFT);
1301+ base &= ~PAGE_MASK;
1302+ avail_page = min_t(unsigned int, PAGE_SIZE - base,
13031303 avail_here);
13041304 c = kmap(*ppages) + base;
13051305
@@ -1383,7 +1383,7 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base, · 77 unmodified lines
13831383 }
13841384
13851385 avail_page = min(avail_here,
1386− (unsigned int) PAGE_CACHE_SIZE);
1386+ (unsigned int) PAGE_SIZE);
13871387 }
13881388 base = buf->page_len; /* align to start of tail */
13891389 }
@@ -1479,9 +1479,9 @@ xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, · 89 unmodified lines
14791479 if (page_len > len)
14801480 page_len = len;
14811481 len -= page_len;
1482− page_offset = (offset + buf->page_base) & (PAGE_CACHE_SIZE - 1);
1483− i = (offset + buf->page_base) >> PAGE_CACHE_SHIFT;
1484− thislen = PAGE_CACHE_SIZE - page_offset;
1482+ page_offset = (offset + buf->page_base) & (PAGE_SIZE - 1);
1483+ i = (offset + buf->page_base) >> PAGE_SHIFT;
1484+ thislen = PAGE_SIZE - page_offset;
14851485 do {
14861486 if (thislen > page_len)
14871487 thislen = page_len;
@@ -1492,7 +1492,7 @@ xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, · 4 unmodified lines
14921492 page_len -= thislen;
14931493 i++;
14941494 page_offset = 0;
1495− thislen = PAGE_CACHE_SIZE;
1495+ thislen = PAGE_SIZE;
14961496 } while (page_len != 0);
14971497 offset = 0;
14981498 }