diff options
Diffstat (limited to 'trunk/2.6.22/20025_80-blk-teardown.patch1')
-rw-r--r-- | trunk/2.6.22/20025_80-blk-teardown.patch1 | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/trunk/2.6.22/20025_80-blk-teardown.patch1 b/trunk/2.6.22/20025_80-blk-teardown.patch1 new file mode 100644 index 0000000..7c5899d --- /dev/null +++ b/trunk/2.6.22/20025_80-blk-teardown.patch1 @@ -0,0 +1,57 @@ +# HG changeset 80 patch +# User kfraser@localhost.localdomain +# Date 1183377939 -3600 +# Node ID 4a284f968015fa4cd50d9d4c7695534c87c7bce6 +# Parent 57ab8dd47580c2f726556fe1c46b5401f2bddb1e +Subject: blktap/blkback: Tear down sysfs nodes before freeing blkdev structures. +Signed-off-by: Keir Fraser <keir@xensource.com> + +Acked-by: jbeulich@novell.com + +--- + drivers/xen/blkback/xenbus.c | 6 +++--- + drivers/xen/blktap/xenbus.c | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/xen/blkback/xenbus.c 2007-08-27 14:01:25.000000000 -0400 ++++ b/drivers/xen/blkback/xenbus.c 2007-08-27 14:01:50.000000000 -0400 +@@ -173,6 +173,9 @@ static int blkback_remove(struct xenbus_ + + DPRINTK(""); + ++ if (be->major || be->minor) ++ xenvbd_sysfs_delif(dev); ++ + if (be->backend_watch.node) { + unregister_xenbus_watch(&be->backend_watch); + kfree(be->backend_watch.node); +@@ -186,9 +189,6 @@ static int blkback_remove(struct xenbus_ + be->blkif = NULL; + } + +- if (be->major || be->minor) +- xenvbd_sysfs_delif(dev); +- + kfree(be); + dev->dev.driver_data = NULL; + return 0; +--- a/drivers/xen/blktap/xenbus.c 2007-08-27 14:01:25.000000000 -0400 ++++ b/drivers/xen/blktap/xenbus.c 2007-08-27 14:01:50.000000000 -0400 +@@ -168,6 +168,8 @@ static int blktap_remove(struct xenbus_d + { + struct backend_info *be = dev->dev.driver_data; + ++ if (be->group_added) ++ xentap_sysfs_delif(be->dev); + if (be->backend_watch.node) { + unregister_xenbus_watch(&be->backend_watch); + kfree(be->backend_watch.node); +@@ -180,8 +182,6 @@ static int blktap_remove(struct xenbus_d + tap_blkif_free(be->blkif); + be->blkif = NULL; + } +- if (be->group_added) +- xentap_sysfs_delif(be->dev); + kfree(be); + dev->dev.driver_data = NULL; + return 0; |