All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: jaxboe@fusionio.com, linux-kernel@vger.kernel.org
Subject: Re: loop warnings in current git HEAD
Date: Sun, 24 Oct 2010 12:02:39 +0200	[thread overview]
Message-ID: <4CC4043F.1070605@redhat.com> (raw)
In-Reply-To: <20101023155950.GA31946@lst.de>



On 10/23/2010 05:59 PM, Christoph Hellwig wrote:

> The loop driver in current git HEAD is rather unhappy when running
> xfstests.  I gets lots of warnings like the one below.  The most likely
> culprit seems to be:
>
> 	loop: add some basic read-only sysfs attributes
>
> (commit ee86273062cbb310665fe49e1f1937d2cf85b0b9) 
yes, seems I forgot bdev can be NULL in destructor (autoclear mode).
can you try if patch below helps?

Milan

loop: Properly clear sysfs in autoclear mode

Signed-off-by: Milan Broz <mbroz@redhat.com>

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 6c48b35..c21d4f3 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1049,9 +1049,9 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)
 	if (bdev)
 		invalidate_bdev(bdev);
 	set_capacity(lo->lo_disk, 0);
+	loop_sysfs_exit(lo);
 	if (bdev) {
 		bd_set_size(bdev, 0);
-		loop_sysfs_exit(lo);
 		/* let user-space know about this change */
 		kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE);
 	}



  reply	other threads:[~2010-10-24 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-23 15:59 loop warnings in current git HEAD Christoph Hellwig
2010-10-24 10:02 ` Milan Broz [this message]
2010-10-24 16:13   ` Christoph Hellwig
2010-10-24 16:18     ` Milan Broz
2010-10-25  7:11 ` [PATCH] loop: Properly clear sysfs in autoclear mode Milan Broz
2010-10-25 12:41   ` Jeff Chua

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=4CC4043F.1070605@redhat.com \
    --to=mbroz@redhat.com \
    --cc=hch@lst.de \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.