Re: [RFC PATCH 1/9] include/linux/pagemap.h: introduce set/clear_fs_page_private

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Why not attach_page_private and clear_page_private as that conveys
the use case a little better?

> +static inline void *set_fs_page_private(struct page *page, void *data)
> +{
> +	get_page(page);
> +	set_page_private(page, (unsigned long)data);
> +	SetPagePrivate(page);
> +
> +	return data;
> +}
> +
> +static inline void *clear_fs_page_private(struct page *page)
> +{
> +	void *data = (void *)page_private(page);
> +
> +	if (!PagePrivate(page))
> +		return NULL;
> +	ClearPagePrivate(page);
> +	set_page_private(page, 0);
> +	put_page(page);
> +
> +	return data;
> +}

Can you add kerneldoc comments describing them, including why we
take the refernces?  Also what is the point of the return value
of set_fs_page_private?



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux