[GIT PULL] fix for loop warning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jens Axboe
Date: Tuesday, October 26, 2010 - 9:18 pm

Hi Linus,

One-liner fix for a warning regression introduced with the
loop changes pulled for 2.6.37-rc1

Please pull.

The following changes since commit 9db59aff3fb32b05a7e2464dd543de03b2b3cebc:

  loop: Properly clear sysfs in autoclear mode (2010-10-26 22:13:27 -0600)

are available in the git repository at:

  git://git.kernel.dk/linux-2.6-block.git for-linus

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 1e5284e..450c958 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);
 	}

-- 
Jens Axboe

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL] fix for loop warning, Jens Axboe, (Tue Oct 26, 9:18 pm)
Re: [GIT PULL] fix for loop warning, Linus Torvalds, (Wed Oct 27, 6:47 pm)
Re: [GIT PULL] fix for loop warning, Christoph Hellwig, (Thu Oct 28, 4:38 am)
Re: [GIT PULL] fix for loop warning, Jens Axboe, (Thu Oct 28, 6:32 am)