bsg: fix sysfs link remove warning (#787862)

This commit is contained in:
Dave Jones 2012-02-09 15:42:58 -05:00
parent 88335999c7
commit e16649a5ae
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff --git a/block/bsg.c b/block/bsg.c
index 4cf703f..ff64ae3 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -983,7 +983,8 @@ void bsg_unregister_queue(struct request_queue *q)
mutex_lock(&bsg_mutex);
idr_remove(&bsg_minor_idr, bcd->minor);
- sysfs_remove_link(&q->kobj, "bsg");
+ if (q->kobj.sd)
+ sysfs_remove_link(&q->kobj, "bsg");
device_unregister(bcd->class_dev);
bcd->class_dev = NULL;
kref_put(&bcd->ref, bsg_kref_release_function);
--
1.7.4.4

View File

@ -745,6 +745,8 @@ Patch12016: disable-i8042-check-on-apple-mac.patch
Patch12025: block-readahead-block-plug.patch
Patch12026: bsg-fix-sysfs-link-remove-warning.patch
Patch12030: epoll-limit-paths.patch
Patch12303: dmar-disable-when-ricoh-multifunction.patch
@ -1458,6 +1460,8 @@ ApplyPatch disable-i8042-check-on-apple-mac.patch
ApplyPatch epoll-limit-paths.patch
ApplyPatch block-readahead-block-plug.patch
ApplyPatch bsg-fix-sysfs-link-remove-warning.patch
# rhbz#605888
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
@ -2308,6 +2312,9 @@ fi
# and build.
%changelog
* Thu Feb 09 2012 Dave Jones <davej@redhat.com>
- bsg: fix sysfs link remove warning (#787862)
* Wed Feb 08 2012 Josh Boyer <jwboyer@redhat.com>
- Fix e1000e Tx hang check (rhbz 785806)
- CVE-2011-4086 jbd2: unmapped buffer with _Unwritten or _Delay flags set can