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

[Xen-changelog] [linux-2.6.18-xen] blkback, blktap: Fix potential resource leak.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1227697833 0
# Node ID 5012c470f8757e97c2e0f7eccfafcb1e2367443e
# Parent  f236d7def9944909bf40015ff4a08817b0803ed9
blkback, blktap: Fix potential resource leak.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 drivers/xen/blkback/blkback.c |   10 +++++-----
 drivers/xen/blktap/blktap.c   |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff -r f236d7def994 -r 5012c470f875 drivers/xen/blkback/blkback.c
--- a/drivers/xen/blkback/blkback.c     Tue Nov 25 11:22:04 2008 +0000
+++ b/drivers/xen/blkback/blkback.c     Wed Nov 26 11:10:33 2008 +0000
@@ -317,14 +317,14 @@ static int do_block_io_op(blkif_t *blkif
                if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc))
                        break;
 
+               if (kthread_should_stop()) {
+                       more_to_do = 1;
+                       break;
+               }
+
                pending_req = alloc_req();
                if (NULL == pending_req) {
                        blkif->st_oo_req++;
-                       more_to_do = 1;
-                       break;
-               }
-
-               if (kthread_should_stop()) {
                        more_to_do = 1;
                        break;
                }
diff -r f236d7def994 -r 5012c470f875 drivers/xen/blktap/blktap.c
--- a/drivers/xen/blktap/blktap.c       Tue Nov 25 11:22:04 2008 +0000
+++ b/drivers/xen/blktap/blktap.c       Wed Nov 26 11:10:33 2008 +0000
@@ -1286,14 +1286,14 @@ static int do_block_io_op(blkif_t *blkif
                        break;          
                }
 
+               if (kthread_should_stop()) {
+                       more_to_do = 1;
+                       break;
+               }
+
                pending_req = alloc_req();
                if (NULL == pending_req) {
                        blkif->st_oo_req++;
-                       more_to_do = 1;
-                       break;
-               }
-
-               if (kthread_should_stop()) {
                        more_to_do = 1;
                        break;
                }

_______________________________________________
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®.