diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2020-04-11 14:44:43 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2020-04-11 16:17:34 -0400 |
commit | d80f6dd912904b261010b14928b8ba89d8dd88bd (patch) | |
tree | 1e1e631660ac0a4293b27ead6ac387c9d7ac820e | |
parent | ac640390ff8147c26821ea243d9be7388b18032a (diff) |
fs: Rename page_file_offset() to page_file_pos()page_pos
By analogy with the previous patch to rename page_offset() to page_pos(),
rename page_file_offset() to page_file_pos().
Conversion performed automatically by Coccinelle with this script:
@@ expression a; @@
- page_file_offset(a)
+ page_file_pos(a)
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
-rw-r--r-- | fs/nfs/write.c | 6 | ||||
-rw-r--r-- | include/linux/pagemap.h | 2 | ||||
-rw-r--r-- | mm/page_io.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index df4b87c30ac9..9742232586d5 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -285,7 +285,7 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int c end_index = (i_size - 1) >> PAGE_SHIFT; if (i_size > 0 && page_index(page) < end_index) goto out; - end = page_file_offset(page) + ((loff_t)offset+count); + end = page_file_pos(page) + ((loff_t)offset+count); if (i_size >= end) goto out; i_size_write(inode, end); @@ -1361,7 +1361,7 @@ int nfs_updatepage(struct file *file, struct page *page, nfs_inc_stats(inode, NFSIOS_VFSUPDATEPAGE); dprintk("NFS: nfs_updatepage(%pD2 %d@%lld)\n", - file, count, (long long)(page_file_offset(page) + offset)); + file, count, (long long)(page_file_pos(page) + offset)); if (!count) goto out; @@ -2065,7 +2065,7 @@ int nfs_wb_page_cancel(struct inode *inode, struct page *page) */ int nfs_wb_page(struct inode *inode, struct page *page) { - loff_t range_start = page_file_offset(page); + loff_t range_start = page_file_pos(page); loff_t range_end = range_start + (loff_t)(PAGE_SIZE - 1); struct writeback_control wbc = { .sync_mode = WB_SYNC_ALL, diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 7726b186aad6..5b35d28cc08a 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -437,7 +437,7 @@ static inline loff_t page_pos(struct page *page) return ((loff_t)page->index) << PAGE_SHIFT; } -static inline loff_t page_file_offset(struct page *page) +static inline loff_t page_file_pos(struct page *page) { return ((loff_t)page_index(page)) << PAGE_SHIFT; } diff --git a/mm/page_io.c b/mm/page_io.c index 76965be1d40e..4f12cf11f675 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -299,7 +299,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, iov_iter_bvec(&from, WRITE, &bv, 1, PAGE_SIZE); init_sync_kiocb(&kiocb, swap_file); - kiocb.ki_pos = page_file_offset(page); + kiocb.ki_pos = page_file_pos(page); set_page_writeback(page); unlock_page(page); @@ -321,7 +321,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, set_page_dirty(page); ClearPageReclaim(page); pr_err_ratelimited("Write error on dio swapfile (%llu)\n", - page_file_offset(page)); + page_file_pos(page)); } end_page_writeback(page); return ret; |