Re: [PATCH v3 5/6] netfs, 9p, afs, ceph: Use folios

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

 



Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> > +	len = (size >= start + gran) ? gran : size - start;
> 
> This seems like the most complicated way to write this ... how about:
> 
>         size_t len = min_t(loff_t, isize - start, folio_size(folio));

I was trying to hedge against isize-start going negative.  Can this code race
against truncate?  truncate_setsize() changes i_size *before* invalidating the
pages.

> >  static int afs_symlink_readpage(struct file *file, struct page *page)
> >  {
> > -	struct afs_vnode *vnode = AFS_FS_I(page->mapping->host);
> > +	struct afs_vnode *vnode = AFS_FS_I(page_mapping(page)->host);
> 
> How does swap end up calling readpage on a symlink?

Um - readpage is called to read the symlink.

> > -	page_endio(page, false, ret);
> > +	page_endio(&folio->page, false, ret);
> 
> We need a folio_endio() ...

I think we mentioned this before and I think you said you had or would make a
patch for it.  I can just create a wrapper for it if that'll do.

David




[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