lkml.org 
[lkml]   [2021]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] mm: Make swap_readpage() for SWP_FS_OPS use ->direct_IO() not ->readpage()
Date
Matthew Wilcox <willy@infradead.org> wrote:

> After submitting the IO here ...
>
> > + if (ret != -EIOCBQUEUED)
> > + swapfile_read_complete(&ki->iocb, ret, 0);
>
> We only touch the 'ki' here ... if the caller didn't call read_complete
>
> > + swapfile_put_kiocb(ki);
>
> Except for here, which is only touched in order to put the refcount.
>
> So why can't swapfile_read_complete() do the work of freeing the ki?

When I was doing something similar for cachefiles, I couldn't get it to work
like that. I'll have another look at that.

David

\
 
 \ /
  Last update: 2021-08-12 15:42    [W:0.111 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site