[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] blktap/blkback: Tear down sysfs nodes before freeing blkdev structures.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1183377939 -3600
# Node ID 4a284f968015fa4cd50d9d4c7695534c87c7bce6
# Parent  57ab8dd47580c2f726556fe1c46b5401f2bddb1e
blktap/blkback: Tear down sysfs nodes before freeing blkdev structures.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 drivers/xen/blkback/xenbus.c |    6 +++---
 drivers/xen/blktap/xenbus.c  |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -r 57ab8dd47580 -r 4a284f968015 drivers/xen/blkback/xenbus.c
--- a/drivers/xen/blkback/xenbus.c      Sun Jul 01 22:07:32 2007 +0100
+++ b/drivers/xen/blkback/xenbus.c      Mon Jul 02 13:05:39 2007 +0100
@@ -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);
@@ -185,9 +188,6 @@ static int blkback_remove(struct xenbus_
                blkif_free(be->blkif);
                be->blkif = NULL;
        }
-
-       if (be->major || be->minor)
-               xenvbd_sysfs_delif(dev);
 
        kfree(be);
        dev->dev.driver_data = NULL;
diff -r 57ab8dd47580 -r 4a284f968015 drivers/xen/blktap/xenbus.c
--- a/drivers/xen/blktap/xenbus.c       Sun Jul 01 22:07:32 2007 +0100
+++ b/drivers/xen/blktap/xenbus.c       Mon Jul 02 13:05:39 2007 +0100
@@ -170,6 +170,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);
@@ -182,8 +184,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;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.