lkml.org 
[lkml]   [2020]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 6/9] iomap: use set/clear_fs_page_private
From
Date
On 4/27/20 7:55 AM, Christoph Hellwig wrote:
> 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:
>>> @@ -59,24 +59,18 @@ iomap_page_create(struct inode *inode, struct page *page)
>>> * 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);
>>> }
>> This cast is unnecessary. void * will be automatically cast to the
>> appropriate pointer type.
> I also find the pattern eather strange. A:
>
> attach_page_private(page, iop);
> return iop;
>
> explains the intent much better.

Thanks for the review, will do it.

Thanks,
Guoqing

\
 
 \ /
  Last update: 2020-04-27 10:15    [W:0.070 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site