Re: [PATCH 04/13] [blackfin] changed ioctls to unlocked

From: Mike Frysinger
Date: Tue Mar 24 2009 - 22:31:37 EST


On Tue, Mar 24, 2009 at 17:12, <stoyboyker@xxxxxxxxx> wrote:
> --- a/arch/blackfin/mach-bf561/coreb.c
> +++ b/arch/blackfin/mach-bf561/coreb.c
> @@ -220,9 +220,10 @@ static int coreb_release(struct inode *inode, struct file *file)
> Â Â Â Âreturn 0;
> Â}
>
> -static int coreb_ioctl(struct inode *inode, struct file *file,
> - Â Â Â Â Â Â Â Â Â Â Âunsigned int cmd, unsigned long arg)
> +static long coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> Â{
> + Â Â Â lock_kernel();
> +
> Â Â Â Âint retval = 0;
> Â Â Â Âint coreb_index = 0;
>
> @@ -289,6 +290,7 @@ static int coreb_ioctl(struct inode *inode, struct file *file,
> Â#endif
> Â Â Â Â}
>
> + Â Â Â unlock_kernel();
> Â Â Â Âreturn retval;
> Â}

there is no need to lock the kernel in here. people have asked in the
past and we've told them that it's pointless. simply change it to use
unlocked_ioctl.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/