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

[Xen-changelog] [linux-2.6.18-xen] blkfront: adjustment for c/s 1189:e09f03f312e5


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
  • Date: Wed, 26 Sep 2012 09:33:03 +0000
  • Delivery-date: Wed, 26 Sep 2012 09:33:13 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1348651657 -7200
# Node ID 2491acc045e4b5a228dd133da9bb7cf443560a1d
# Parent  50245ed8527a266e614a233102b0994fc86f0151
blkfront: adjustment for c/s 1189:e09f03f312e5

Didn't handle the frontend block device being mounted.

Based on an upstream patch from David.

Reported-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r 50245ed8527a -r 2491acc045e4 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c   Tue Sep 25 11:49:44 2012 +0200
+++ b/drivers/xen/blkfront/blkfront.c   Wed Sep 26 11:27:37 2012 +0200
@@ -544,9 +544,16 @@ int blkif_release(struct inode *inode, s
                if (!dev) {
                        blkfront_closing(info);
                        kfree(info);
-               } else if (xenbus_read_driver_state(dev->otherend)
-                          == XenbusStateClosing && info->is_ready)
-                       blkfront_closing(info);
+               } else
+                       switch (xenbus_read_driver_state(dev->otherend)) {
+                       case XenbusStateClosing:
+                       case XenbusStateClosed:
+                               if (info->is_ready)
+                                       blkfront_closing(info);
+                               break;
+                       default:
+                               break;
+                       }
        }
        return 0;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.