This patch adds the BKL to each character device's open() function. The BKL will remain in chrdev_open() until the module unload races are fixed, but this makes it unnecessary there for any other reason. I'm reasonably confident that I found all of the character devices' open()s if the device used register_chrdev or devfs_register_chrdev. I _think_ this covers them all. I'm also reasonably confident that I added all of the #includes correctly this time. It is hard to say if it compiles or not because half the kernel doesn't compile right now anyway :( I'm posting this to give any of the driver writers a chance to scream before I send it elsewhere. However, before you scream too loudly, remember, I didn't _add_ the BKL to your driver. It was already being held there, you just may not have known it. Adding it explicitly to your driver changes nothing but semantics. If you _know_ that you don't need it, I'll make sure not to touch your driver in the patch that I ultimately submit. If you would like some pamphlets, magazines, or videos on how to remove the BKL from your driver, I can provide those too. I'll also update Documentation/filesystems/Locking somewhat like this: -instances of ->open() - will be called without the BKL. +instances of ->open() - will be called without the BKL. BKL has been +pushed into each chardev ->open(), so module races are all that is +keeping BKL in chrdev_open() Patch attached against the latest Linus BK tree. I'll hopefully have it in a public BK tree soon, ripe for pulling. -- Dave Hansen haveblue@us.ibm.com