]> git.neil.brown.name Git - history.git/commit
[PATCH] loop device broken in 2.5.38
authorTheodore Y. Ts'o <tytso@mit.edu>
Wed, 25 Sep 2002 04:11:23 +0000 (21:11 -0700)
committerIngo Molnar <mingo@elte.hu>
Wed, 25 Sep 2002 04:11:23 +0000 (21:11 -0700)
commit86b18ae35b371af729b08f5c0342d3131c50e61f
tree7d45b61b9b1bee42bc70dedbb6d986b0a807ae6d
parent0de4d503ea73fa7e8fa2669f5fc3e95640af2866
[PATCH] loop device broken in 2.5.38

The loop device driver was broken in 2.5.38 when it was converted over
to use gendisk.  I discovered this while doing final regression testing
on the ext3 htree code.

The problem is that figure_loop_size() is setting the capacity of the
loop device in kilobytes (because that's what compute_loop_size()
returns), but set_capacity() expects the size in 512 byte sectors.

I've enclosed a patch which fixes the problem, as well as simplifying
the code by eliminating compute_loop_size(), since it is a static
function is only used once by figure_loop_size().
drivers/block/loop.c