[Cluster-devel] [PATCH v8 06/10] iomap: Add page_write_end iomap hook

Andreas Grünbacher andreas.gruenbacher at gmail.com
Tue Jun 5 12:50:41 UTC 2018


2018-06-05 14:29 GMT+02:00 David Sterba <dsterba at suse.cz>:
> On Tue, Jun 05, 2018 at 02:17:38PM +0200, Andreas Grünbacher wrote:
>> 2018-06-05 14:07 GMT+02:00 David Sterba <dsterba at suse.cz>:
>> > On Mon, Jun 04, 2018 at 09:31:19PM +0200, Andreas Gruenbacher wrote:
>> >> --- a/fs/iomap.c
>> >> +++ b/fs/iomap.c
>> >> @@ -181,16 +181,22 @@ iomap_write_begin(struct inode *inode, loff_t pos, unsigned len, unsigned flags,
>> >>
>> >>  static int
>> >>  iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
>> >> -             unsigned copied, struct page *page, struct iomap *iomap)
>> >> +             unsigned copied, struct page *page, struct iomap *iomap,
>> >> +             const struct iomap_ops *ops)
>> >>  {
>> >> +     typeof(ops->page_write_end) page_write_end = ops->page_write_end;
>> >
>> > Is the reason to use typeof is to avoid repeating the type of
>> > page_write_end?
>>
>> Yes, the type is void (*)(struct inode *, loff_t, unsigned, struct
>> page *, struct iomap *), which is a bit bulky.
>
> Agreed, so why don't you simply use ops->page_write_end ?

Alright.

Thanks,
Andreas




More information about the Cluster-devel mailing list