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/video | |
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/video')
-rw-r--r-- | drivers/video/fbmem.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 776f7fcd2fbf..33ebdb198daf 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1326,20 +1326,27 @@ fb_open(struct inode *inode, struct file *file) | |||
1326 | 1326 | ||
1327 | if (fbidx >= FB_MAX) | 1327 | if (fbidx >= FB_MAX) |
1328 | return -ENODEV; | 1328 | return -ENODEV; |
1329 | lock_kernel(); | ||
1329 | #ifdef CONFIG_KMOD | 1330 | #ifdef CONFIG_KMOD |
1330 | if (!(info = registered_fb[fbidx])) | 1331 | if (!(info = registered_fb[fbidx])) |
1331 | try_to_load(fbidx); | 1332 | try_to_load(fbidx); |
1332 | #endif /* CONFIG_KMOD */ | 1333 | #endif /* CONFIG_KMOD */ |
1333 | if (!(info = registered_fb[fbidx])) | 1334 | if (!(info = registered_fb[fbidx])) { |
1334 | return -ENODEV; | 1335 | res = -ENODEV; |
1335 | if (!try_module_get(info->fbops->owner)) | 1336 | goto out; |
1336 | return -ENODEV; | 1337 | } |
1338 | if (!try_module_get(info->fbops->owner)) { | ||
1339 | res = -ENODEV; | ||
1340 | goto out; | ||
1341 | } | ||
1337 | file->private_data = info; | 1342 | file->private_data = info; |
1338 | if (info->fbops->fb_open) { | 1343 | if (info->fbops->fb_open) { |
1339 | res = info->fbops->fb_open(info,1); | 1344 | res = info->fbops->fb_open(info,1); |
1340 | if (res) | 1345 | if (res) |
1341 | module_put(info->fbops->owner); | 1346 | module_put(info->fbops->owner); |
1342 | } | 1347 | } |
1348 | out: | ||
1349 | unlock_kernel(); | ||
1343 | return res; | 1350 | return res; |
1344 | } | 1351 | } |
1345 | 1352 | ||