Re: [PATCH 4/7] udf: Convert udf_adinicb_readpage() to udf_adinicb_read_folio()

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

 



On Wed 17-04-24 16:04:10, Matthew Wilcox (Oracle) wrote:
> Now that all three callers have a folio, convert this function to
> take a folio, and use the folio APIs.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

One comment below:

> -static void udf_adinicb_readpage(struct page *page)
> +static void udf_adinicb_read_folio(struct folio *folio)
>  {
> -	struct inode *inode = page->mapping->host;
> -	char *kaddr;
> +	struct inode *inode = folio->mapping->host;
>  	struct udf_inode_info *iinfo = UDF_I(inode);
>  	loff_t isize = i_size_read(inode);
>  
> -	kaddr = kmap_local_page(page);
> -	memcpy(kaddr, iinfo->i_data + iinfo->i_lenEAttr, isize);
> -	memset(kaddr + isize, 0, PAGE_SIZE - isize);
> -	flush_dcache_page(page);

So where did the flush_dcache_page() call go? AFAIU we should be calling
flush_dcache_folio(folio) here, shouldn't we?

> -	SetPageUptodate(page);
> -	kunmap_local(kaddr);
> +	folio_fill_tail(folio, 0, iinfo->i_data + iinfo->i_lenEAttr, isize);
> +	folio_mark_uptodate(folio);
>  }

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




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

  Powered by Linux