All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
	Mel Gorman <mel@linux.vnet.ibm.com>,
	Dave Chinner <david@fromorbit.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	Itaru Kitayama <kitayama@cl.bb4u.ne.jp>,
	Minchan Kim <minchan.kim@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock
Date: Tue, 26 Apr 2011 14:42:09 -0700	[thread overview]
Message-ID: <20110426144209.06317674.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110426144218.GA14862@localhost>

On Tue, 26 Apr 2011 22:42:19 +0800
Wu Fengguang <fengguang.wu@intel.com> wrote:

> @@ -55,13 +55,16 @@ EXPORT_SYMBOL(I_BDEV);
>  static void bdev_inode_switch_bdi(struct inode *inode,
>  			struct backing_dev_info *dst)
>  {
> -	spin_lock(&inode_wb_list_lock);
> +	struct backing_dev_info *old = inode->i_data.backing_dev_info;
> +
> +	bdi_lock_two(&old->wb, &dst->wb);
>  	spin_lock(&inode->i_lock);
>  	inode->i_data.backing_dev_info = dst;
>  	if (inode->i_state & I_DIRTY)
>  		list_move(&inode->i_wb_list, &dst->wb.b_dirty);
>  	spin_unlock(&inode->i_lock);
> -	spin_unlock(&inode_wb_list_lock);
> +	spin_unlock(&old->wb.list_lock);
> +	spin_unlock(&dst->wb.list_lock);
>  }

Has this patch been well tested under lockdep?

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
	Mel Gorman <mel@linux.vnet.ibm.com>,
	Dave Chinner <david@fromorbit.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	Itaru Kitayama <kitayama@cl.bb4u.ne.jp>,
	Minchan Kim <minchan.kim@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock
Date: Tue, 26 Apr 2011 14:42:09 -0700	[thread overview]
Message-ID: <20110426144209.06317674.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110426144218.GA14862@localhost>

On Tue, 26 Apr 2011 22:42:19 +0800
Wu Fengguang <fengguang.wu@intel.com> wrote:

> @@ -55,13 +55,16 @@ EXPORT_SYMBOL(I_BDEV);
>  static void bdev_inode_switch_bdi(struct inode *inode,
>  			struct backing_dev_info *dst)
>  {
> -	spin_lock(&inode_wb_list_lock);
> +	struct backing_dev_info *old = inode->i_data.backing_dev_info;
> +
> +	bdi_lock_two(&old->wb, &dst->wb);
>  	spin_lock(&inode->i_lock);
>  	inode->i_data.backing_dev_info = dst;
>  	if (inode->i_state & I_DIRTY)
>  		list_move(&inode->i_wb_list, &dst->wb.b_dirty);
>  	spin_unlock(&inode->i_lock);
> -	spin_unlock(&inode_wb_list_lock);
> +	spin_unlock(&old->wb.list_lock);
> +	spin_unlock(&dst->wb.list_lock);
>  }

Has this patch been well tested under lockdep?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2011-04-26 21:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 14:42 [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock Wu Fengguang
2011-04-26 14:42 ` Wu Fengguang
2011-04-26 14:44 ` [PATCH 2/2] writeback: elevate queue_io() into wb_writeback() Wu Fengguang
2011-04-26 14:44   ` Wu Fengguang
2011-05-04 11:08   ` Christoph Hellwig
2011-05-04 11:08     ` Christoph Hellwig
2011-05-04 11:15     ` Wu Fengguang
2011-05-04 11:15       ` Wu Fengguang
2011-05-04 11:17       ` Christoph Hellwig
2011-05-04 11:17         ` Christoph Hellwig
2011-04-26 21:42 ` Andrew Morton [this message]
2011-04-26 21:42   ` [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock Andrew Morton
2011-04-27  2:34   ` Wu Fengguang
2011-04-27  2:34     ` Wu Fengguang
2011-04-27  6:06   ` Christoph Hellwig
2011-04-27  6:06     ` 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=20110426144209.06317674.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=david@fromorbit.com \
    --cc=fengguang.wu@intel.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=kitayama@cl.bb4u.ne.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@linux.vnet.ibm.com \
    --cc=minchan.kim@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.