Messages in this thread | | | Date | Thu, 28 Aug 2008 00:45:11 +0400 | From | Alexey Dobriyan <> | Subject | Re: [PATCH, RFC] uio BKL removal |
| |
On Tue, Aug 26, 2008 at 05:15:32PM -0600, Jonathan Corbet wrote: > UIO: BKL removal > > Remove the BKL from the UIO driver, and add complete locking where needed > to serialize idr accesses.
> --- a/drivers/uio/uio.c > +++ b/drivers/uio/uio.c > @@ -47,6 +47,9 @@ static struct uio_class { > struct class *class; > } *uio_class; > > +/* Protect idr accesses */
You can rename it to uio_idr_mutex (it's mutex, dammit!) and put next to uio_idr and avoid comment ;-) Or if locking around _pre_get() isn't necessary you can actually make it spinlock ;-) Anyway, put it close.
> +static DEFINE_MUTEX(minor_lock);
Indeed, BKL protects nothing because of GFP_KERNEL allocation.
| |