summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/write.c6
-rw-r--r--include/linux/pagemap.h2
-rw-r--r--mm/page_io.c4
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;