Moving BKL from generic code into drivers

David C. Hansen (haveblue@us.ibm.com)
Tue, 04 Dec 2001 19:20:47 -0800


As a first step toward removing the BKL from some block device drivers,
I'm planning on moving the BKL out of the generic code and into the
drivers themselves.

I plan on doing this indiscriminately. All block devices will have a
lock_kernel() at the top of their open() and an unlock_kernel() at the
bottom. Later on, we can remove it from individual drivers as we see fit.

Now the big question:
In block_dev.c:do_open(), the BKL is held in addition to bdev->bd_sem.
Why is the BKL held here, other than to protect all of the drivers' open
functions? What doesn't the semaphore provide?

This kind of action, moving the BKL from generic code into drivers isn't
a first:
http://marc.theaimsgroup.com/?l=linux-kernel&m=96346538231916&w=2

-- 
Dave Hansen
haveblue@us.ibm.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/