lkml.org 
[lkml]   [2014]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/5] swapfile: use ->read_iter and ->write_iter
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?


\
 
 \ /
  Last update: 2014-12-20 07:41    [W:0.228 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site