login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
July
»
5
Re: [PATCH 7/8] soundcore_open: Reduce the area BKL coverage
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Takashi Iwai
Subject:
Re: [PATCH 7/8] soundcore_open: Reduce the area BKL coverage
Date: Monday, July 5, 2010 - 9:09 am
At Sun, 4 Jul 2010 00:02:31 +0200, Arnd Bergmann wrote:
quoted text
> > From: John Kacur <jkacur@redhat.com> > > Most of this function is protected by the sound_loader_lock. > We can push down the BKL to this call out err = file->f_op->open(inode,file); > > In order to build the sound core without the BKL, we > will need to push the lock_kernel() call into the ~20 > device drivers that register their file operations. > > Signed-off-by: John Kacur <jkacur@redhat.com> > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > Acked-by: Alan Cox <alan@linux.intel.com> > Cc: Takashi Iwai <tiwai@suse.de>
I applied this one to sound git tree now. Thanks! Takashi
quoted text
> --- > sound/sound_core.c | 13 ++++++++----- > 1 files changed, 8 insertions(+), 5 deletions(-) > > diff --git a/sound/sound_core.c b/sound/sound_core.c > index 7c2d677..c8627fc 100644 > --- a/sound/sound_core.c > +++ b/sound/sound_core.c > @@ -576,8 +576,6 @@ static int soundcore_open(struct inode *inode, struct file *file) > struct sound_unit *s; > const struct file_operations *new_fops = NULL; > > - lock_kernel (); > - > chain=unit&0x0F; > if(chain==4 || chain==5) /* dsp/audio/dsp16 */ > { > @@ -630,18 +628,23 @@ static int soundcore_open(struct inode *inode, struct file *file) > const struct file_operations *old_fops = file->f_op; > file->f_op = new_fops; > spin_unlock(&sound_loader_lock); > - if(file->f_op->open) > + > + if (file->f_op->open) { > + /* TODO: push down BKL into indivial open functions */ > + lock_kernel(); > err = file->f_op->open(inode,file); > + unlock_kernel(); > + } > + > if (err) { > fops_put(file->f_op); > file->f_op = fops_get(old_fops); > } > + > fops_put(old_fops); > - unlock_kernel(); > return err; > } > spin_unlock(&sound_loader_lock); > - unlock_kernel(); > return -ENODEV; > } > > -- > 1.7.1 >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH 7/8] soundcore_open: Reduce the area BKL coverage
, Arnd Bergmann
, (Sat Jul 3, 3:02 pm)
Re: [PATCH 7/8] soundcore_open: Reduce the area BKL coverage
, Takashi Iwai
, (Mon Jul 5, 9:09 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Michael Moore
Re: underage models, pre teen models, lolita porn, young preteens, little lolitas
Alex Riesen
Re: [PATCH 4/7] lib: Introduce strnstr()
Thomas Gleixner
[ANNOUNCE] 2.6.31-rc6-rt2
Mathieu Desnoyers
Re: Linux 2.6.25-rc2
git
:
Blaisorblade
git-unpack-objects < pack file in repository doesn't work!
Matthieu Moy
Re: Cloning empty repositories, was Re: What is the idea for bare repositories?
Linus Torvalds
Re: Untracked working tree files
Peter Karlsson
Re: CRLF problems with Git on Win32
Johannes Schindelin
Re: [PATCH 4/4] git-rebase -i: New option to support rebase with merges
linux-netdev
:
Alan Menegotto
Re: Linux networking implementation and packet capture
Andrew Morton
Re: [PATCH] PHYLIB: IRQ event workqueue handling fixes
Timo Teräs
ip xfrm policy semantics
Jarek Poplawski
Re: [PATCH]: Fix queueing return values...
David Miller
Re: [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x
git-commits-head
:
Linux Kernel Mailing List
Blackfin: don't give CPU its own line in traps output
Linux Kernel Mailing List
No need to do lock_super() for exclusion in generic_shutdown_super()
Linux Kernel Mailing List
x86, msr: Export the register-setting MSR functions via /dev/*/msr
Linux Kernel Mailing List
MIPS: SMTC: Fix lockup in smtc_distribute_timer
Linux Kernel Mailing List
powerpc: gamecube/wii: usbgecko bootwrapper console support
openbsd-misc
:
Aaron Mason
Re: Defending OpenBSD Performance
Henning Brauer
Re: Defending OpenBSD Performance
Henning Brauer
Re: Defending OpenBSD Performance
Christiano Farina Haesbaert
Re: Defending OpenBSD Performance
Nick Holland
Re: 1 out of 3 hunks failed--saving rejects to kerberosV/src/lib/krb5/crypto.c.rej
Colocation donated by:
Syndicate