[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141222073234.GA14207@mew>
Date: Sun, 21 Dec 2014 23:32:34 -0800
From: Omar Sandoval <osandov@...ndov.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Trond Myklebust <trond.myklebust@...marydata.com>,
Christoph Hellwig <hch@...radead.org>,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH v2 4/5] swapfile: use ->read_iter and ->write_iter
On Sat, Dec 20, 2014 at 06:13:37AM +0000, Al Viro wrote:
> On Fri, Dec 19, 2014 at 07:18:28PM -0800, Omar Sandoval wrote:
>
> > + ret = swap_file->f_op->read_iter(&kiocb, &to);
> > + if (ret == PAGE_SIZE) {
> > + SetPageUptodate(page);
> > count_vm_event(PSWPIN);
> > + ret = 0;
> > + } else {
> > + ClearPageUptodate(page);
> > + SetPageError(page);
> > + }
> > + unlock_page(page);
>
> Umm... What's to guarantee that ->read_iter() won't try lock_page() on what
> turns out to be equal to page?
Ergh. I don't see why ->read_iter would be screwing around in the swap
cache or with the pages in the iterator, anything in particular you can
see happening?
--
Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists