Re: [PATCH] f2fs: use memcpy_{to,from}_page() where possible

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

 



On Fri, Aug 19, 2022 at 01:11:41PM +0200, Fabio M. De Francesco wrote:
> > -	src_addr = inline_data_addr(inode, ipage);
> > -	dst_addr = kmap_atomic(page);
> > -	memcpy(dst_addr, src_addr, MAX_INLINE_DATA(inode));
> > +	memcpy_to_page(page, 0, inline_data_addr(inode, ipage),
> > +		       MAX_INLINE_DATA(inode));
> >  	flush_dcache_page(page);
> 
> flush_dcache_page() is redundant here. memcpy_to_page() takes care to call it.

Done in v2.

> > -		kaddr = kmap_atomic(page);
> > -		memcpy(kaddr + offset, data, tocopy);
> > -		kunmap_atomic(kaddr);
> > +		memcpy_to_page(page, offset, data, tocopy);
> >  		flush_dcache_page(page);
> 
> Same here.

Likewise.

> 
> It looks like you forgot a conversion from kmap_atomic() in fs/f2fs/inline.c 
> at line 266.

Also done in v2.  I think I had skipped that one intentionally, but I must not
have looked closely because it converts just fine.  Thanks!

- Eric



[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