Commit ed9a0a9f authored by Linus Torvalds's avatar Linus Torvalds

umount: avoid racy block-size set

Setting the block size back to the original blocksize at umount time
is unnecessary, and can cause buffer errors and infinite loops in
__getblk_slow, and possibly other problems. 

Just getting bdev_lock instead causes other issues, namely AB-BA deadlocks
with /proc/meminfo etc. Just drop it, and replace with a "sync_blockdev()"
to cause a flush (which was a side effect of changing the blocksize before).

Debugging and testing by Jeff Mahoney <jeffm@suse.com>
parent 34ea9d86
......@@ -732,7 +732,7 @@ void kill_block_super(struct super_block *sb)
bdev_uevent(bdev, KOBJ_UMOUNT);
generic_shutdown_super(sb);
set_blocksize(bdev, sb->s_old_blocksize);
sync_blockdev(bdev);
close_bdev_excl(bdev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment