The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Jason Baron <jbaron@redhat.com>
Cc: neilb@suse.de, arjan@infradead.org, mingo@redhat.com,
	axboe@suse.de, a.p.zijlstra@chello.nl,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block_dev.c mutex_lock_nested() fix
Date: Wed, 23 Aug 2006 11:02:13 -0700	[thread overview]
Message-ID: <20060823110213.90172799.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0608231104220.5899@dhcp83-20.boston.redhat.com>

On Wed, 23 Aug 2006 11:09:35 -0400 (EDT)
Jason Baron <jbaron@redhat.com> wrote:

> 
> Hi,
> 
> In the case below we are locking the whole disk not a partition. This 
> change simply brings the code in line with the piece above where when we 
> are the 'first' opener, and we are a partition.
> 
> thanks,
> 
> -Jason
> 
> Signed-off-by: Jason Baron <jbaron@redhat.com>
> 
> --- linux-2.6/fs/block_dev.c.bak
> +++ linux-2.6/fs/block_dev.c
> @@ -966,7 +966,7 @@ do_open(struct block_device *bdev, struc
>  				rescan_partitions(bdev->bd_disk, bdev);
>  		} else {
>  			mutex_lock_nested(&bdev->bd_contains->bd_mutex,
> -					  BD_MUTEX_PARTITION);
> +					  BD_MUTEX_WHOLE);
>  			bdev->bd_contains->bd_part_count++;
>  			mutex_unlock(&bdev->bd_contains->bd_mutex);
>  		}

This was allegedly (re-re-re-re-)fixed in 2.6.18-rc4-mm2. 
lockdep-fix-blkdev_open-warning.patch and
lockdep-fix-blkdev_open-warning-fix.patch.

Is this patch needed in that kernel?


  parent reply	other threads:[~2006-08-23 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23 15:09 [PATCH] block_dev.c mutex_lock_nested() fix Jason Baron
2006-08-23 16:48 ` Peter Zijlstra
2006-08-23 18:02 ` Andrew Morton [this message]
2006-08-23 17:51   ` Jason Baron

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=20060823110213.90172799.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=arjan@infradead.org \
    --cc=axboe@suse.de \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=neilb@suse.de \
    /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