WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] blktap/blkback: Tear down sysfs nodes

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] blktap/blkback: Tear down sysfs nodes before freeing blkdev structures.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 03 Jul 2007 13:37:29 -0700
Delivery-date: Tue, 03 Jul 2007 13:35:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] blktap/blkback: Tear down sysfs nodes before freeing blkdev structures., Xen patchbot-linux-2.6.18-xen <=