lkml.org 
[lkml]   [2012]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: The bug of iput() removal from flusher thread?
On Wed 21-11-12 09:37:41, Dave Chinner wrote:
> On Mon, Nov 19, 2012 at 08:41:02PM +0100, Jan Kara wrote:
> > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> > index 51ea267..ed7613b 100644
> > --- a/fs/fs-writeback.c
> > +++ b/fs/fs-writeback.c
> > @@ -227,6 +227,9 @@ static void requeue_io(struct inode *inode, struct bdi_writeback *wb)
> >
> > static void inode_sync_complete(struct inode *inode)
> > {
> > + /* If inode is clean an unused, put it into LRU now. */
> > + if (!(inode->i_state & I_DIRTY) && !atomic_read(&inode->i_count))
> > + inode_lru_list_add(inode);
>
> Unsafe. Has to avoid I_FREEING|I_WILL_FREE (see warnings at start of
> writeback_single_inode()).
>
> Also, if you do this after clearing the I_SYNC flag, you can use
> exactly the same logic as iput_final(). A helper function could be
> used for both cases at that point, and....
Agreed. That's what I do in the current version of the patch (not posted
yet).

Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2012-11-21 03:21    [W:2.082 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site