LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: dhowells@redhat.com, trond.myklebust@primarydata.com,
darrick.wong@oracle.com, hch@lst.de, jlayton@kernel.org,
sfrench@samba.org, torvalds@linux-foundation.org,
linux-nfs@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: Make swap_readpage() for SWP_FS_OPS use ->direct_IO() not ->readpage()
Date: Thu, 12 Aug 2021 14:23:08 +0100 [thread overview]
Message-ID: <3088327.1628774588@warthog.procyon.org.uk> (raw)
In-Reply-To: <YRUbXoMzWVX9X/Vf@casper.infradead.org>
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
next prev parent reply other threads:[~2021-08-12 13:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 11:57 [PATCH 0/2] mm: Fix NFS swapfiles and use DIO read for swapfiles David Howells
2021-08-12 11:57 ` [PATCH 1/2] nfs: Fix write to swapfile failure due to generic_write_checks() David Howells
2021-08-12 11:57 ` [PATCH 2/2] mm: Make swap_readpage() for SWP_FS_OPS use ->direct_IO() not ->readpage() David Howells
2021-08-12 12:21 ` Christoph Hellwig
2021-08-12 12:57 ` David Howells
2021-08-12 15:39 ` Matthew Wilcox
2021-08-12 17:02 ` Christoph Hellwig
2021-08-12 17:48 ` Darrick J. Wong
2021-08-12 18:14 ` Matthew Wilcox
2021-08-12 20:13 ` Theodore Ts'o
2021-08-13 6:54 ` Christoph Hellwig
2021-08-12 13:00 ` Matthew Wilcox
2021-08-12 13:23 ` David Howells [this message]
2021-08-12 13:37 ` David Howells
2021-08-12 13:50 ` Matthew Wilcox
2021-08-12 14:16 ` David Howells
2021-08-12 12:18 ` [PATCH 0/2] mm: Fix NFS swapfiles and use DIO read for swapfiles Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3088327.1628774588@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=sfrench@samba.org \
--cc=torvalds@linux-foundation.org \
--cc=trond.myklebust@primarydata.com \
--cc=willy@infradead.org \
--subject='Re: [PATCH 2/2] mm: Make swap_readpage() for SWP_FS_OPS use ->direct_IO() not ->readpage()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).