/[gentoo-x86]/net-wireless/bluez/files/bluez-4.95-high-cpu-usage.patch
Gentoo

Contents of /net-wireless/bluez/files/bluez-4.95-high-cpu-usage.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Aug 1 09:49:03 2011 UTC (2 years, 11 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Version bump and remove old (4.96 will be the next stable candidate if possible).

(Portage version: 2.1.10.7/cvs/Linux x86_64)

1 From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2 Date: Wed, 20 Jul 2011 09:12:22 +0000 (+0300)
3 Subject: Fix removing inotify watch whenever an adapter is removed
4 X-Git-Url: http://git.kernel.org/?p=bluetooth%2Fbluez.git;a=commitdiff_plain;h=e2482a5ee3626e426149558e27a8e50ad07d7dad;hp=9a7e2cc81cdea7a673a2cc29cd8eae43155122c0
5
6 Fix removing inotify watch whenever an adapter is removed
7
8 This sometimes cause bluetoothd to burn cpu when an adapter is removed
9 from the system.
10
11 Since the watch is not really bond to any adapter, in fact it is added on
12 plugin .init, its removal is now moved to plugin .exit.
13 ---
14
15 diff --git a/plugins/adaptername.c b/plugins/adaptername.c
16 index 2a54cc0..9e99e6a 100644
17 --- a/plugins/adaptername.c
18 +++ b/plugins/adaptername.c
19 @@ -262,10 +262,6 @@ static gboolean handle_inotify_cb(GIOChannel *channel, GIOCondition cond,
20
21 static void adaptername_remove(struct btd_adapter *adapter)
22 {
23 - if (watch_fd >= 0)
24 - close(watch_fd);
25 - if (inotify != NULL)
26 - g_io_channel_shutdown(inotify, FALSE, NULL);
27 }
28
29 static struct btd_adapter_driver adaptername_driver = {
30 @@ -314,6 +310,13 @@ static int adaptername_init(void)
31
32 static void adaptername_exit(void)
33 {
34 + if (watch_fd >= 0)
35 + close(watch_fd);
36 + if (inotify != NULL) {
37 + g_io_channel_shutdown(inotify, FALSE, NULL);
38 + g_io_channel_unref(inotify);
39 + }
40 +
41 btd_unregister_adapter_driver(&adaptername_driver);
42 }
43

  ViewVC Help
Powered by ViewVC 1.1.20