* [patch] sound: remove BKL from sound/core/info.c
@ 2006-01-07 12:42 Ingo Molnar
0 siblings, 0 replies; only message in thread
From: Ingo Molnar @ 2006-01-07 12:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
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.
built and booted on x86.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
----
sound/core/info.c | 33 +++++++++++----------------------
1 files changed, 11 insertions(+), 22 deletions(-)
Index: linux/sound/core/info.c
===================================================================
--- linux.orig/sound/core/info.c
+++ linux/sound/core/info.c
@@ -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,
};
/**
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-07 12:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-07 12:42 [patch] sound: remove BKL from sound/core/info.c Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®