diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 17:48:31 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 17:48:31 -0400 |
| commit | d1794f2c5b5817eb79ccc5e00701ca748d1b073a (patch) | |
| tree | 5a4c98e694e88a8c82f342d0cc9edb2a4cbbef36 /drivers/gpu | |
| parent | a41eebab7537890409ea9dfe0fcda9b5fbdb090d (diff) | |
| parent | 2fceef397f9880b212a74c418290ce69e7ac00eb (diff) | |
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits)
IB/umad: BKL is not needed for ib_umad_open()
IB/uverbs: BKL is not needed for ib_uverbs_open()
bf561-coreb: BKL unneeded for open()
Call fasync() functions without the BKL
snd/PCM: fasync BKL pushdown
ipmi: fasync BKL pushdown
ecryptfs: fasync BKL pushdown
Bluetooth VHCI: fasync BKL pushdown
tty_io: fasync BKL pushdown
tun: fasync BKL pushdown
i2o: fasync BKL pushdown
mpt: fasync BKL pushdown
Remove BKL from remote_llseek v2
Make FAT users happier by not deadlocking
x86-mce: BKL pushdown
vmwatchdog: BKL pushdown
vmcp: BKL pushdown
via-pmu: BKL pushdown
uml-random: BKL pushdown
uml-mmapper: BKL pushdown
...
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/drm_fops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index d2e6da85f58a..851a53f1acce 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include "drmP.h" | 37 | #include "drmP.h" |
| 38 | #include "drm_sarea.h" | 38 | #include "drm_sarea.h" |
| 39 | #include <linux/poll.h> | 39 | #include <linux/poll.h> |
| 40 | #include <linux/smp_lock.h> | ||
| 40 | 41 | ||
| 41 | static int drm_open_helper(struct inode *inode, struct file *filp, | 42 | static int drm_open_helper(struct inode *inode, struct file *filp, |
| 42 | struct drm_device * dev); | 43 | struct drm_device * dev); |
| @@ -174,12 +175,14 @@ int drm_stub_open(struct inode *inode, struct file *filp) | |||
| 174 | 175 | ||
| 175 | DRM_DEBUG("\n"); | 176 | DRM_DEBUG("\n"); |
| 176 | 177 | ||
| 178 | /* BKL pushdown: note that nothing else serializes idr_find() */ | ||
| 179 | lock_kernel(); | ||
| 177 | minor = idr_find(&drm_minors_idr, minor_id); | 180 | minor = idr_find(&drm_minors_idr, minor_id); |
| 178 | if (!minor) | 181 | if (!minor) |
| 179 | return -ENODEV; | 182 | goto out; |
| 180 | 183 | ||
| 181 | if (!(dev = minor->dev)) | 184 | if (!(dev = minor->dev)) |
| 182 | return -ENODEV; | 185 | goto out; |
| 183 | 186 | ||
| 184 | old_fops = filp->f_op; | 187 | old_fops = filp->f_op; |
| 185 | filp->f_op = fops_get(&dev->driver->fops); | 188 | filp->f_op = fops_get(&dev->driver->fops); |
| @@ -189,6 +192,8 @@ int drm_stub_open(struct inode *inode, struct file *filp) | |||
| 189 | } | 192 | } |
| 190 | fops_put(old_fops); | 193 | fops_put(old_fops); |
| 191 | 194 | ||
| 195 | out: | ||
| 196 | unlock_kernel(); | ||
| 192 | return err; | 197 | return err; |
| 193 | } | 198 | } |
| 194 | 199 | ||
