linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] fs: move i_wb_list out from under inode_lock
Date: Thu, 28 Oct 2010 10:19:49 -0400	[thread overview]
Message-ID: <20101028141949.GB19174@infradead.org> (raw)
In-Reply-To: <1288266161-28897-3-git-send-email-david@fromorbit.com>

> + * 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.

>  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.

> @@ -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.

> +	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.


  reply	other threads:[~2010-10-28 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28 11:42 [PATCH 0/3] fs: peel back the inode_lock some more Dave Chinner
2010-10-28 11:42 ` [PATCH 1/3] fs: move i_sb_list out from under inode_lock Dave Chinner
2010-10-28 14:11   ` Christoph Hellwig
2010-10-28 11:42 ` [PATCH 2/3] fs: move i_wb_list " Dave Chinner
2010-10-28 14:19   ` Christoph Hellwig [this message]
2010-10-28 21:47     ` Dave Chinner
2010-10-28 11:42 ` [PATCH 3/3] fs: move i_hash " Dave Chinner
2010-10-28 14:24   ` Christoph Hellwig
2010-10-28 12:00 ` [PATCH 0/3] fs: peel back the inode_lock some more Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101028141949.GB19174@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).