lkml.org 
[lkml]   [2019]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] writeback, memcg: Implement cgroup_writeback_by_id()
On Thu, Aug 15, 2019 at 04:54:21PM +0200, Jan Kara wrote:
> > + /* and find the associated wb */
> > + wb = wb_get_create(bdi, memcg_css, GFP_NOWAIT | __GFP_NOWARN);
> > + if (!wb) {
> > + ret = -ENOMEM;
> > + goto out_css_put;
> > + }
>
> One more thought: You don't want the "_create" part here, do you? If
> there's any point in writing back using this wb, it must be attached to
> some inode and thus it must exist. In the normal case wb_get_create() will
> just fetch the reference and be done with it but when you feed garbage into
> this function due to id going stale or frn structures getting corrupted due
> to concurrent access, you can be creating bogus wb structures in bdi...

Yeah, it can create wbs unnecessarily which isn't critical but also is
easy to fix. Will update.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2019-08-15 18:14    [W:0.822 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site