lkml.org 
[lkml]   [2013]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] fuse: fix race in fuse_writepages()
From
On Thu, Aug 29, 2013 at 2:38 PM, Maxim Patlasov <mpatlasov@parallels.com> wrote:

>> Just one nit, why orig_pages? req->pages is already there, so why
>> duplicate it?
>
>
> req->pages is there, but it is already occupied by new pages (allocated by
> fuse_writepages_fill). We can't re-use req->pages for original pages because
> as soon as we put the request to bg_queue (in fuse_writepages_send) and
> released fc->lock, req->pages may be accessed w/o any delay. So we have two
> bunches of pointers to "struct page" to be stashed somewhere : original and
> new one. req->pages is for new pages, orig_pages[] is for original ones.

Yeah. Applied the original patch.

Thanks,
Miklos


\
 
 \ /
  Last update: 2013-08-29 19:21    [W:0.061 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site