lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101028214744.GF2715@dastard>
Date:	Fri, 29 Oct 2010 08:47:44 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	viro@...IV.linux.org.uk, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] fs: move i_wb_list out from under inode_lock

On Thu, Oct 28, 2010 at 10:19:49AM -0400, Christoph Hellwig wrote:
> > + * Write out an inode's dirty pages.  Called under inode_wb_list_lock.  Either
> > + * the caller has ref on the inode (either via __iget or via syscall against an
> > + * fd) or the inode has I_WILL_FREE set.
> 
> Just drop mentioning of how we got the reference ,it's rather pointless.

OK.

> >  writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
> > @@ -354,7 +368,7 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
> >  	inode->i_state |= I_SYNC;
> >  	inode->i_state &= ~I_DIRTY_PAGES;
> >  	spin_unlock(&inode->i_lock);
> > -	spin_unlock(&inode_lock);
> > +	spin_unlock(&inode_wb_list_lock);
> 
> We don't actually need inode_wb_list_lock here.  But I guess we can
> fix this later and be conservative for now.

Hmmm - I think you are right. However, there are lots of
opportunities for cleaning up the locking in this areaş so leaving
it for later is probably best.

> > @@ -963,63 +976,62 @@ void __mark_inode_dirty(struct inode *inode, int flags)
> 
> I think the __mark_inode_dirty cleanup should be a separate patch,
> it's rather confusing in the current form.

Ok. I'll leave it out for now - there's various other cleanups
needed here now as well (e.g. the unlocked flags check is not needed
to avoid a global lock anymore) so I'll leave that for later, too.

> > +	if (was_dirty) {
> > +out_unlock_inode:
> >  		spin_unlock(&inode->i_lock);
> > +		return;
> > +	}
> 
> Please just move the label to the end of the function and add another
> goto here.

Will do.

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ