On Sun, Apr 26, 2020 at 05:26:31PM -0700, Matthew Wilcox wrote:
On Sun, Apr 26, 2020 at 11:49:22PM +0200, Guoqing Jiang wrote:I also find the pattern eather strange. A:
@@ -59,24 +59,18 @@ iomap_page_create(struct inode *inode, struct page *page)This cast is unnecessary. void * will be automatically cast to the
* migrate_page_move_mapping() assumes that pages with private data have
* their count elevated by 1.
*/
- get_page(page);
- set_page_private(page, (unsigned long)iop);
- SetPagePrivate(page);
- return iop;
+ return (struct iomap_page *)set_fs_page_private(page, iop);
}
appropriate pointer type.
attach_page_private(page, iop);
return iop;
explains the intent much better.