diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0047-bsg-fix-sysfs-link-remove-warning.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0047-bsg-fix-sysfs-link-remove-warning.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0047-bsg-fix-sysfs-link-remove-warning.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0047-bsg-fix-sysfs-link-remove-warning.patch new file mode 100644 index 00000000..fbb6e9cd --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0047-bsg-fix-sysfs-link-remove-warning.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 5edb7ce56b7a8c2332fdce83ddbb208aba2ea484 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stanislaw Gruszka <sgruszka@redhat.com> | ||
3 | Date: Wed, 8 Feb 2012 20:02:03 +0100 | ||
4 | Subject: [PATCH 47/95] bsg: fix sysfs link remove warning | ||
5 | |||
6 | commit 37b40adf2d1b4a5e51323be73ccf8ddcf3f15dd3 upstream. | ||
7 | |||
8 | We create "bsg" link if q->kobj.sd is not NULL, so remove it only | ||
9 | when the same condition is true. | ||
10 | |||
11 | Fixes: | ||
12 | |||
13 | WARNING: at fs/sysfs/inode.c:323 sysfs_hash_and_remove+0x2b/0x77() | ||
14 | sysfs: can not remove 'bsg', no directory | ||
15 | Call Trace: | ||
16 | [<c0429683>] warn_slowpath_common+0x6a/0x7f | ||
17 | [<c0537a68>] ? sysfs_hash_and_remove+0x2b/0x77 | ||
18 | [<c042970b>] warn_slowpath_fmt+0x2b/0x2f | ||
19 | [<c0537a68>] sysfs_hash_and_remove+0x2b/0x77 | ||
20 | [<c053969a>] sysfs_remove_link+0x20/0x23 | ||
21 | [<c05d88f1>] bsg_unregister_queue+0x40/0x6d | ||
22 | [<c0692263>] __scsi_remove_device+0x31/0x9d | ||
23 | [<c069149f>] scsi_forget_host+0x41/0x52 | ||
24 | [<c0689fa9>] scsi_remove_host+0x71/0xe0 | ||
25 | [<f7de5945>] quiesce_and_remove_host+0x51/0x83 [usb_storage] | ||
26 | [<f7de5a1e>] usb_stor_disconnect+0x18/0x22 [usb_storage] | ||
27 | [<c06c29de>] usb_unbind_interface+0x4e/0x109 | ||
28 | [<c067a80f>] __device_release_driver+0x6b/0xa6 | ||
29 | [<c067a861>] device_release_driver+0x17/0x22 | ||
30 | [<c067a46a>] bus_remove_device+0xd6/0xe6 | ||
31 | [<c06785e2>] device_del+0xf2/0x137 | ||
32 | [<c06c101f>] usb_disable_device+0x94/0x1a0 | ||
33 | |||
34 | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> | ||
35 | Signed-off-by: Jens Axboe <axboe@kernel.dk> | ||
36 | Signed-off-by: Tim Gardner <tim.gardner@canonical.com> | ||
37 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
38 | --- | ||
39 | block/bsg.c | 3 ++- | ||
40 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
41 | |||
42 | diff --git a/block/bsg.c b/block/bsg.c | ||
43 | index 702f131..c0ab25c 100644 | ||
44 | --- a/block/bsg.c | ||
45 | +++ b/block/bsg.c | ||
46 | @@ -985,7 +985,8 @@ void bsg_unregister_queue(struct request_queue *q) | ||
47 | |||
48 | mutex_lock(&bsg_mutex); | ||
49 | idr_remove(&bsg_minor_idr, bcd->minor); | ||
50 | - sysfs_remove_link(&q->kobj, "bsg"); | ||
51 | + if (q->kobj.sd) | ||
52 | + sysfs_remove_link(&q->kobj, "bsg"); | ||
53 | device_unregister(bcd->class_dev); | ||
54 | bcd->class_dev = NULL; | ||
55 | kref_put(&bcd->ref, bsg_kref_release_function); | ||
56 | -- | ||
57 | 1.7.9.4 | ||
58 | |||