From: Ingo Molnar Remove the final instance of BKL use within the sound code, by converting snd_info_entry_ioctl to an unlocked ioctl. It is obviously safe, because the sound code already dropped the BKL in this function. Signed-off-by: Ingo Molnar Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Andrew Morton --- sound/core/info.c | 33 +++++++++++---------------------- 1 files changed, 11 insertions(+), 22 deletions(-) diff -puN sound/core/info.c~sound-remove-bkl-from-sound-core-infoc sound/core/info.c --- devel/sound/core/info.c~sound-remove-bkl-from-sound-core-infoc 2006-01-08 01:29:32.000000000 -0800 +++ devel-akpm/sound/core/info.c 2006-01-08 01:29:32.000000000 -0800 @@ -444,8 +444,8 @@ static unsigned int snd_info_entry_poll( return mask; } -static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static long snd_info_entry_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) { struct snd_info_private_data *data; struct snd_info_entry *entry; @@ -465,17 +465,6 @@ static inline int _snd_info_entry_ioctl( return -ENOTTY; } -/* FIXME: need to unlock BKL to allow preemption */ -static int snd_info_entry_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - int err; - unlock_kernel(); - err = _snd_info_entry_ioctl(inode, file, cmd, arg); - lock_kernel(); - return err; -} - static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) { struct inode *inode = file->f_dentry->d_inode; @@ -499,15 +488,15 @@ static int snd_info_entry_mmap(struct fi static struct file_operations snd_info_entry_operations = { - .owner = THIS_MODULE, - .llseek = snd_info_entry_llseek, - .read = snd_info_entry_read, - .write = snd_info_entry_write, - .poll = snd_info_entry_poll, - .ioctl = snd_info_entry_ioctl, - .mmap = snd_info_entry_mmap, - .open = snd_info_entry_open, - .release = snd_info_entry_release, + .owner = THIS_MODULE, + .llseek = snd_info_entry_llseek, + .read = snd_info_entry_read, + .write = snd_info_entry_write, + .poll = snd_info_entry_poll, + .unlocked_ioctl = snd_info_entry_ioctl, + .mmap = snd_info_entry_mmap, + .open = snd_info_entry_open, + .release = snd_info_entry_release, }; /** _